Commit 0e45dad8 authored by antti's avatar antti
Browse files

Reviewed by Geoff.

        Fix http://bugs.webkit.org/show_bug.cgi?id=13060
        REGRESSION: Repro ASSERT failure in Cache::adjustSize running layout tests
        <rdar://5060208>
        
        Script evaluation may have dereffed the CachedScript object already, causing double deref and
        eventually m_liveResourcesSize underflow.

        * html/HTMLScriptElement.cpp:
        (WebCore::HTMLScriptElement::notifyFinished):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a21aa1a7
2007-03-14 Antti Koivisto <antti@apple.com>
Reviewed by Geoff.
Fix http://bugs.webkit.org/show_bug.cgi?id=13060
REGRESSION: Repro ASSERT failure in Cache::adjustSize running layout tests
<rdar://5060208>
Script evaluation may have dereffed the CachedScript object already, causing double deref and
eventually m_liveResourcesSize underflow.
* html/HTMLScriptElement.cpp:
(WebCore::HTMLScriptElement::notifyFinished):
2007-03-14 Adele Peterson <adele@apple.com>
 
Reviewed by Darin.
......
......@@ -155,8 +155,11 @@ void HTMLScriptElement::notifyFinished(CachedResource* o)
dispatchHTMLEvent(loadEvent, false, false);
}
cs->deref(this);
m_cachedScript = 0;
// script evaluation may have dereffed it already
if (m_cachedScript) {
m_cachedScript->deref(this);
m_cachedScript = 0;
}
}
bool HTMLScriptElement::shouldExecuteAsJavaScript()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment