Title: [105189] branches/safari-534.54-branch
Diff
Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (105188 => 105189)
--- branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-17 21:31:18 UTC (rev 105188)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog 2012-01-17 21:37:21 UTC (rev 105189)
@@ -1,3 +1,22 @@
+2012-01-17 Mark Rowe <[email protected]>
+
+ Merge r99982.
+
+ 2011-11-11 Gavin Peters <[email protected]>
+
+ Protect Document during error responses
+ https://bugs.webkit.org/show_bug.cgi?id=72068
+
+ Add a Document protector to the error response code handler, just
+ as exists for other ends of requests.
+
+ Reviewed by Nate Chapin.
+
+ * http/tests/misc/resources/xslt-bad-import-uri.xml: Added.
+ * http/tests/misc/resources/xslt-bad-import-uri.xsl: Added.
+ * http/tests/misc/xslt-bad-import-expected.txt: Added.
+ * http/tests/misc/xslt-bad-import.html: Added.
+
2011-1-17 Lucas Forschler <[email protected]>
Merge 91148
Added: branches/safari-534.54-branch/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml (0 => 105189)
--- branches/safari-534.54-branch/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xml 2012-01-17 21:37:21 UTC (rev 105189)
@@ -0,0 +1,4 @@
+<?xml version='1.0' encoding="UTF-8" ?>
+<?xml-stylesheet type="text/xsl" href=""
+<catalog>
+</catalog>
Added: branches/safari-534.54-branch/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl (0 => 105189)
--- branches/safari-534.54-branch/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/http/tests/misc/resources/xslt-bad-import-uri.xsl 2012-01-17 21:37:21 UTC (rev 105189)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:import href=""
+<xsl:template match="/">
+ <xsl:apply-imports/>
+</xsl:template>
+</xsl:stylesheet>
Added: branches/safari-534.54-branch/LayoutTests/http/tests/misc/xslt-bad-import.html (0 => 105189)
--- branches/safari-534.54-branch/LayoutTests/http/tests/misc/xslt-bad-import.html (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/http/tests/misc/xslt-bad-import.html 2012-01-17 21:37:21 UTC (rev 105189)
@@ -0,0 +1,17 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+window._onload_ = function() {
+ document.getElementById('d').innerHTML=''
+}
+</script>
+</head>
+<body>
+<span id="d">
+ <iframe src=""
+</span>
+<p>This test passes if it does not crash.</p>
+</body>
+</html>
Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (105188 => 105189)
--- branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-17 21:31:18 UTC (rev 105188)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog 2012-01-17 21:37:21 UTC (rev 105189)
@@ -1,3 +1,22 @@
+2012-01-17 Mark Rowe <[email protected]>
+
+ Merge r99982.
+
+ 2011-11-11 Gavin Peters <[email protected]>
+
+ Protect Document during error responses
+ https://bugs.webkit.org/show_bug.cgi?id=72068
+
+ Add a Document protector to the error response code handler, just
+ as exists for other ends of requests.
+
+ Reviewed by Nate Chapin.
+
+ Test: http/tests/misc/xslt-bad-import.html
+
+ * loader/cache/CachedResourceRequest.cpp:
+ (WebCore::CachedResourceRequest::didReceiveData):
+
2011-1-17 Lucas Forschler <[email protected]>
Merge 91148
Modified: branches/safari-534.54-branch/Source/WebCore/loader/cache/CachedResourceRequest.cpp (105188 => 105189)
--- branches/safari-534.54-branch/Source/WebCore/loader/cache/CachedResourceRequest.cpp 2012-01-17 21:31:18 UTC (rev 105188)
+++ branches/safari-534.54-branch/Source/WebCore/loader/cache/CachedResourceRequest.cpp 2012-01-17 21:37:21 UTC (rev 105189)
@@ -268,8 +268,12 @@
return;
if (m_resource->response().httpStatusCode() >= 400) {
- if (!m_resource->shouldIgnoreHTTPStatusCodeErrors())
+ if (!m_resource->shouldIgnoreHTTPStatusCodeErrors()) {
+ // 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());
m_resource->error(CachedResource::LoadError);
+ }
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes