Title: [88993] branches/chromium/782

Diff

Copied: branches/chromium/782/LayoutTests/fast/dom/body-clone-link-decl-parent-crash-expected.txt (from rev 88987, trunk/LayoutTests/fast/dom/body-clone-link-decl-parent-crash-expected.txt) (0 => 88993)


--- branches/chromium/782/LayoutTests/fast/dom/body-clone-link-decl-parent-crash-expected.txt	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/dom/body-clone-link-decl-parent-crash-expected.txt	2011-06-16 02:07:45 UTC (rev 88993)
@@ -0,0 +1,5 @@
+Test passes if it does not crash.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/chromium/782/LayoutTests/fast/dom/body-clone-link-decl-parent-crash.html (from rev 88987, trunk/LayoutTests/fast/dom/body-clone-link-decl-parent-crash.html) (0 => 88993)


--- branches/chromium/782/LayoutTests/fast/dom/body-clone-link-decl-parent-crash.html	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/dom/body-clone-link-decl-parent-crash.html	2011-06-16 02:07:45 UTC (rev 88993)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+Test passes if it does not crash.
+<div id="console"></div>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+iframe1 = document.createElement('iframe');
+document.body.appendChild(iframe1);
+document1 = iframe1.contentDocument.implementation.createHTMLDocument("document");
+var body1 = document1.body;
+document1.alinkColor = "blue";
+var body2 = body1.cloneNode(true);
+document1.body = document1.createElement('body');
+delete document1;
+gc();
+body2.vLink = 1;
+
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>

Copied: branches/chromium/782/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash-expected.txt (from rev 88987, trunk/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash-expected.txt) (0 => 88993)


--- branches/chromium/782/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash-expected.txt	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash-expected.txt	2011-06-16 02:07:45 UTC (rev 88993)
@@ -0,0 +1,5 @@
+Test passes if it does not crash.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/chromium/782/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash.html (from rev 88987, trunk/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash.html) (0 => 88993)


--- branches/chromium/782/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash.html	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/dom/styled-clone-inline-style-decl-parent-crash.html	2011-06-16 02:07:45 UTC (rev 88993)
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+Test passes if it does not crash.
+<div id="console"></div>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+iframe1 = document.createElement('iframe');
+document.body.appendChild(iframe1);
+document1 = iframe1.contentDocument.implementation.createHTMLDocument("document");
+var div1 = document1.createElement('div');
+document1.body.appendChild(div1);
+div1.style.color = "blue";
+var div2 = div1.cloneNode(true);
+document1.body.removeChild(div1);
+delete document1;
+gc();
+div2.style.color = "red";
+
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>

Copied: branches/chromium/782/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash-expected.txt (from rev 88987, trunk/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash-expected.txt) (0 => 88993)


--- branches/chromium/782/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash-expected.txt	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash-expected.txt	2011-06-16 02:07:45 UTC (rev 88993)
@@ -0,0 +1,5 @@
+Test passes if it does not crash.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Copied: branches/chromium/782/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html (from rev 88987, trunk/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html) (0 => 88993)


--- branches/chromium/782/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html	                        (rev 0)
+++ branches/chromium/782/LayoutTests/fast/dom/styled-not-in-document-clone-inline-style-decl-parent-crash.html	2011-06-16 02:07:45 UTC (rev 88993)
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+</head>
+<body>
+Test passes if it does not crash.
+<div id="console"></div>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+iframe1 = document.createElement('iframe');
+document.body.appendChild(iframe1);
+document1 = iframe1.contentDocument.implementation.createHTMLDocument("document");
+var div1 = document1.createElement('div');
+div1.style.color = "blue";
+var div2 = div1.cloneNode(true);
+delete document1;
+gc();
+div2.style.color = "red";
+
+var successfullyParsed = true;
+</script>
+<script src=""
+</body>
+</html>

Modified: branches/chromium/782/Source/WebCore/dom/Document.cpp (88992 => 88993)


--- branches/chromium/782/Source/WebCore/dom/Document.cpp	2011-06-16 02:06:04 UTC (rev 88992)
+++ branches/chromium/782/Source/WebCore/dom/Document.cpp	2011-06-16 02:07:45 UTC (rev 88993)
@@ -571,12 +571,6 @@
 #if ENABLE(FULLSCREEN_API)
         m_fullScreenElement = 0;
 #endif
-        m_styleSelector.clear();
-        m_styleSheets.clear();
-        m_elemSheet.clear();
-        m_mappedElementSheet.clear();
-        m_pageUserSheet.clear();
-        m_pageGroupUserSheets.clear();
 
         // removeAllChildren() doesn't always unregister IDs,
         // so tear down scope information upfront to avoid having stale references in the map.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to