示例#1
0
void ScriptLoader::cancel(Document* contextDocument)
{
    if (!m_resource)
        return;
    finishLoading(contextDocument, FinishWithErrorOrCancel);
    stopLoadRequest();
}
示例#2
0
void ScriptElementData::notifyFinished(CachedResource* o)
{
    CachedScript* cs = static_cast<CachedScript*>(o);
    ASSERT(cs == m_cachedScript);

    // Evaluating the script could lead to a garbage collection which can
    // delete the script element so we need to protect it and us with it!
    RefPtr<Element> protector(m_element);

    if (cs->errorOccurred())
        m_scriptElement->dispatchErrorEvent();
    else {
        evaluateScript(ScriptSourceCode(cs));
        m_scriptElement->dispatchLoadEvent();
    }

    stopLoadRequest();
}
示例#3
0
ScriptElementData::~ScriptElementData()
{
    stopLoadRequest();
}