Title: [94021] branches/safari-534.51-branch/Source/WebCore
Revision
94021
Author
[email protected]
Date
2011-08-29 15:41:45 -0700 (Mon, 29 Aug 2011)

Log Message

Merge r93717.

Modified Paths

Diff

Modified: branches/safari-534.51-branch/Source/WebCore/ChangeLog (94020 => 94021)


--- branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-08-29 22:30:22 UTC (rev 94020)
+++ branches/safari-534.51-branch/Source/WebCore/ChangeLog	2011-08-29 22:41:45 UTC (rev 94021)
@@ -1,3 +1,26 @@
+2011-08-29  Lucas Forschler  <[email protected]>
+
+    Merged 93717
+
+    2011-08-24  Sam Weinig  <[email protected]>
+
+            JSHTMLImageElement (and associated Node) is abandoned when image load is canceled
+            <rdar://problem/9925630>
+            https://bugs.webkit.org/show_bug.cgi?id=66864
+
+            Reviewed by Anders Carlsson.
+
+            In the JSC bindings, we use HTMLImageElement::hasPendingActivity() (which in turn calls
+            HTMLImageLoader::haveFiredLoadEvent()) to reason about the liveness of JSHTMLImageElements.
+            In the case that an image load is canceled, the haveFiredLoadEvent never true, so the
+            JSHTMLImageElement is kept alive forever (and since it references the global object, it
+            keeps the entire graph alive as well).
+
+            * loader/ImageLoader.cpp:
+            (WebCore::ImageLoader::notifyFinished):
+            Set m_firedLoad to true in the case of a canceled load, to reset the state back to
+            its initial values.
+
 2011-08-24  Mark Rowe  <[email protected]>
 
         Merge r93376.

Modified: branches/safari-534.51-branch/Source/WebCore/loader/ImageLoader.cpp (94020 => 94021)


--- branches/safari-534.51-branch/Source/WebCore/loader/ImageLoader.cpp	2011-08-29 22:30:22 UTC (rev 94020)
+++ branches/safari-534.51-branch/Source/WebCore/loader/ImageLoader.cpp	2011-08-29 22:41:45 UTC (rev 94021)
@@ -225,8 +225,10 @@
     if (m_firedLoad)
         return;
 
-    if (resource->wasCanceled())
+    if (resource->wasCanceled()) {
+        m_firedLoad = true;
         return;
+    }
 
     loadEventSender().dispatchEventSoon(this);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to