Title: [105182] branches/safari-534.54-branch

Diff

Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (105181 => 105182)


--- branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-17 19:59:27 UTC (rev 105181)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-17 20:14:45 UTC (rev 105182)
@@ -1,3 +1,19 @@
+2012-01-17  Mark Rowe  <[email protected]>
+
+        Merge r101543.
+
+    2011-11-30  James Simonsen  <[email protected]>
+
+        Fix valgrind issue in SubresourceLoader::didFinishLoading
+        https://bugs.webkit.org/show_bug.cgi?id=72787
+
+        Hang on to CachedResource until finish() is called.
+
+        Reviewed by Nate Chapin.
+
+        * fast/loader/subresource-load-failed-crash-expected.txt: Added.
+        * fast/loader/subresource-load-failed-crash.html: Added.
+
 2011-1-16  Lucas Forschler  <[email protected]>
 
     Merge 100471

Added: branches/safari-534.54-branch/LayoutTests/fast/loader/subresource-load-failed-crash-expected.txt (0 => 105182)


--- branches/safari-534.54-branch/LayoutTests/fast/loader/subresource-load-failed-crash-expected.txt	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/loader/subresource-load-failed-crash-expected.txt	2012-01-17 20:14:45 UTC (rev 105182)
@@ -0,0 +1 @@
+PASS

Added: branches/safari-534.54-branch/LayoutTests/fast/loader/subresource-load-failed-crash.html (0 => 105182)


--- branches/safari-534.54-branch/LayoutTests/fast/loader/subresource-load-failed-crash.html	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/loader/subresource-load-failed-crash.html	2012-01-17 20:14:45 UTC (rev 105182)
@@ -0,0 +1,27 @@
+<html>
+<body id='console'>
+<script>
+if (window.layoutTestController) {
+    layoutTestController.dumpAsText();
+    layoutTestController.waitUntilDone();
+}
+
+var xhr = new XMLHttpRequest;
+function secondRequest()
+{
+    xhr._onreadystatechange_ = function()
+    {
+        if (xhr.readyState == xhr.DONE) {
+            document.getElementById('console').appendChild(document.createTextNode("PASS"));
+            layoutTestController.notifyDone();
+        }
+    }
+    xhr.open("GET", "", true);
+    xhr.send();
+}
+window.addEventListener("DOMSubtreeModified", secondRequest, true);
+
+document.head.appendChild(document.createTextNode('X'));
+</script>
+</body>
+</html>

Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (105181 => 105182)


--- branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-17 19:59:27 UTC (rev 105181)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-17 20:14:45 UTC (rev 105182)
@@ -1,5 +1,24 @@
 2012-01-17  Mark Rowe  <[email protected]>
 
+        Merge r101543.
+
+    2011-11-30  James Simonsen  <[email protected]>
+
+        Fix valgrind issue in SubresourceLoader::didFinishLoading
+        https://bugs.webkit.org/show_bug.cgi?id=72787
+
+        Hang on to CachedResource until finish() is called.
+
+        Reviewed by Nate Chapin.
+
+        Test: fast/loader/subresource-load-failed-crash.html (under asan)
+
+        * loader/SubresourceLoader.cpp:
+        (WebCore::SubresourceLoader::didFinishLoading):
+        (WebCore::SubresourceLoader::didFail):
+
+2012-01-17  Mark Rowe  <[email protected]>
+
         Merge r103118.
 
     2011-12-16  Tim Horton  <[email protected]>

Modified: branches/safari-534.54-branch/Source/WebCore/loader/cache/CachedResourceRequest.cpp (105181 => 105182)


--- branches/safari-534.54-branch/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2012-01-17 19:59:27 UTC (rev 105181)
+++ branches/safari-534.54-branch/Source/WebCore/loader/cache/CachedResourceRequest.cpp	2012-01-17 20:14:45 UTC (rev 105182)
@@ -156,6 +156,8 @@
     // Prevent the document from being destroyed before we are done with
     // the cachedResourceLoader that it will delete when the document gets deleted.
     RefPtr<Document> protector(m_cachedResourceLoader->document());
+    CachedResourceHandle<CachedResource> protectResource(m_resource);
+
     if (!m_multipart)
         m_cachedResourceLoader->decrementRequestCount(m_resource);
     m_finishing = true;
@@ -188,6 +190,8 @@
     // Prevent the document from being destroyed before we are done with
     // the cachedResourceLoader that it will delete when the document gets deleted.
     RefPtr<Document> protector(m_cachedResourceLoader->document());
+    CachedResourceHandle<CachedResource> protectResource(m_resource);
+
     if (!m_multipart)
         m_cachedResourceLoader->decrementRequestCount(m_resource);
     m_finishing = true;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to