Title: [106818] trunk
- Revision
- 106818
- Author
- [email protected]
- Date
- 2012-02-06 10:23:01 -0800 (Mon, 06 Feb 2012)
Log Message
Crash in SubframeLoader::loadSubframe.
https://bugs.webkit.org/show_bug.cgi?id=77345
Reviewed by Nate Chapin.
Source/WebCore:
Mutation event when loading subframe can blow away the
main frame. Add a RefPtr to protect against that.
Test: fast/frames/subframe-load-crash-main.html
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
LayoutTests:
* fast/frames/resources/subframe-load-crash.svg: Added.
* fast/frames/subframe-load-crash-main-expected.txt: Added.
* fast/frames/subframe-load-crash-main.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (106817 => 106818)
--- trunk/LayoutTests/ChangeLog 2012-02-06 18:20:33 UTC (rev 106817)
+++ trunk/LayoutTests/ChangeLog 2012-02-06 18:23:01 UTC (rev 106818)
@@ -1,3 +1,14 @@
+2012-02-06 Abhishek Arya <[email protected]>
+
+ Crash in SubframeLoader::loadSubframe.
+ https://bugs.webkit.org/show_bug.cgi?id=77345
+
+ Reviewed by Nate Chapin.
+
+ * fast/frames/resources/subframe-load-crash.svg: Added.
+ * fast/frames/subframe-load-crash-main-expected.txt: Added.
+ * fast/frames/subframe-load-crash-main.html: Added.
+
2012-02-06 Jesus Sanchez-Palencia <[email protected]>
[Qt][WK2] http/tests/loading/state-object-security-exception.html fails
Added: trunk/LayoutTests/fast/frames/resources/subframe-load-crash.svg (0 => 106818)
--- trunk/LayoutTests/fast/frames/resources/subframe-load-crash.svg (rev 0)
+++ trunk/LayoutTests/fast/frames/resources/subframe-load-crash.svg 2012-02-06 18:23:01 UTC (rev 106818)
@@ -0,0 +1,2 @@
+<g id="test"></g>
+
Property changes on: trunk/LayoutTests/fast/frames/resources/subframe-load-crash.svg
___________________________________________________________________
Added: svn:executable
Added: trunk/LayoutTests/fast/frames/subframe-load-crash-main-expected.txt (0 => 106818)
--- trunk/LayoutTests/fast/frames/subframe-load-crash-main-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/frames/subframe-load-crash-main-expected.txt 2012-02-06 18:23:01 UTC (rev 106818)
@@ -0,0 +1 @@
+PASS
Added: trunk/LayoutTests/fast/frames/subframe-load-crash-main.html (0 => 106818)
--- trunk/LayoutTests/fast/frames/subframe-load-crash-main.html (rev 0)
+++ trunk/LayoutTests/fast/frames/subframe-load-crash-main.html 2012-02-06 18:23:01 UTC (rev 106818)
@@ -0,0 +1,18 @@
+<html>
+<object data="" id="root" _onload_="runTest()"></object>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+}
+function runTest() {
+ root = document.getElementById('root').contentDocument;
+ root.addEventListener('load', function() { document.open(); document.write("PASS"); document.close(); }, 1);
+ setTimeout(function() {
+ root.getElementById('test').appendChild(document.createElement('iframe'));
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }, 0);
+}
+</script>
+</html>
Property changes on: trunk/LayoutTests/fast/frames/subframe-load-crash-main.html
___________________________________________________________________
Added: svn:executable
Modified: trunk/Source/WebCore/ChangeLog (106817 => 106818)
--- trunk/Source/WebCore/ChangeLog 2012-02-06 18:20:33 UTC (rev 106817)
+++ trunk/Source/WebCore/ChangeLog 2012-02-06 18:23:01 UTC (rev 106818)
@@ -1,3 +1,18 @@
+2012-02-06 Abhishek Arya <[email protected]>
+
+ Crash in SubframeLoader::loadSubframe.
+ https://bugs.webkit.org/show_bug.cgi?id=77345
+
+ Reviewed by Nate Chapin.
+
+ Mutation event when loading subframe can blow away the
+ main frame. Add a RefPtr to protect against that.
+
+ Test: fast/frames/subframe-load-crash-main.html
+
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::loadSubframe):
+
2012-02-06 ChangSeok Oh <[email protected]>
Initial implementation of GraphicsContext3DOpenGLES.cpp
Modified: trunk/Source/WebCore/loader/SubframeLoader.cpp (106817 => 106818)
--- trunk/Source/WebCore/loader/SubframeLoader.cpp 2012-02-06 18:20:33 UTC (rev 106817)
+++ trunk/Source/WebCore/loader/SubframeLoader.cpp 2012-02-06 18:23:01 UTC (rev 106818)
@@ -244,6 +244,8 @@
Frame* SubframeLoader::loadSubframe(HTMLFrameOwnerElement* ownerElement, const KURL& url, const String& name, const String& referrer)
{
+ RefPtr<Frame> protect(m_frame);
+
bool allowsScrolling = true;
int marginWidth = -1;
int marginHeight = -1;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes