示例#1
0
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());
}
示例#2
0
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);
}
示例#3
0
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();
}
示例#4
0
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
}
示例#6
0
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;
}
示例#7
0
PendingScript::PendingScript(Element* element, ScriptResource* resource)
    : m_watchingForLoad(false)
    , m_element(element)
{
    setScriptResource(resource);
}