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: https://svn.webkit.org/repository/webkit/trunk@20194
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+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.
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()