PendingScript::PendingScript(const PendingScript& other) : ResourceOwner(other) , m_watchingForLoad(other.m_watchingForLoad) , m_element(other.m_element) , m_startingPosition(other.m_startingPosition) , m_streamer(other.m_streamer) { setScriptResource(other.resource()); }
PendingScript::PendingScript(Element* element, ScriptResource* resource) : m_watchingForLoad(false), m_element(element), m_integrityFailure(false), m_parserBlockingLoadStartTime(0), m_client(nullptr) { setScriptResource(resource); ThreadState::current()->registerPreFinalizer(this); MemoryCoordinator::instance().registerClient(this); }
PassRefPtrWillBeRawPtr<Element> PendingScript::releaseElementAndClear() { setScriptResource(0); m_watchingForLoad = false; m_startingPosition = TextPosition::belowRangePosition(); if (m_streamer) m_streamer->cancel(); m_streamer.release(); return m_element.release(); }
Element* PendingScript::releaseElementAndClear() { setScriptResource(0); m_watchingForLoad = false; m_startingPosition = TextPosition::belowRangePosition(); m_integrityFailure = false; m_parserBlockingLoadStartTime = 0; if (m_streamer) m_streamer->cancel(); m_streamer.release(); return m_element.release(); }
PendingScript::PendingScript(Element* element, ScriptResource* resource) : m_watchingForLoad(false) , m_element(element) , m_integrityFailure(false) , m_parserBlockingLoadStartTime(0) , m_client(nullptr) { setScriptResource(resource); #if ENABLE(OILPAN) ThreadState::current()->registerPreFinalizer(this); #endif }
void PendingScript::dispose() { stopWatchingForLoad(); DCHECK(!m_client); DCHECK(!m_watchingForLoad); setScriptResource(nullptr); m_startingPosition = TextPosition::belowRangePosition(); m_integrityFailure = false; m_parserBlockingLoadStartTime = 0; if (m_streamer) m_streamer->cancel(); m_streamer = nullptr; m_element = nullptr; }
PendingScript::PendingScript(Element* element, ScriptResource* resource) : m_watchingForLoad(false) , m_element(element) { setScriptResource(resource); }