void HTMLDocumentParser::watchForLoad(PendingScript& pendingScript) { ASSERT(!pendingScript.isLoaded()); // setClient would call notifyFinished if the load were complete. // Callers do not expect to be re-entered from this call, so they should // not an already-loaded PendingScript. pendingScript.setClient(this); }
bool HTMLScriptRunner::isPendingScriptReady(const PendingScript& script) { if (!m_document) return false; m_hasScriptsWaitingForStylesheets = !m_document->haveStylesheetsLoaded(); if (m_hasScriptsWaitingForStylesheets) return false; if (script.needsLoading() && !script.isLoaded()) return false; return true; }