Title: [87737] trunk
Revision
87737
Author
[email protected]
Date
2011-05-31 09:51:09 -0700 (Tue, 31 May 2011)

Log Message

2011-05-31  Abhishek Arya  <[email protected]>

        Reviewed by Dimitri Glazkov.

        Convert raw ptr to RefPtr for documentElement.
        https://bugs.webkit.org/show_bug.cgi?id=61688

        Test: fast/dom/xml-parser-error-message-crash.svg

        * dom/XMLDocumentParser.cpp:
        (WebCore::XMLDocumentParser::insertErrorMessageBlock):
2011-05-31  Abhishek Arya  <[email protected]>

        Reviewed by Dimitri Glazkov.

        Test that we do not crash when a DOMNodeInsertedIntoDocument event
        is fired while generating a error message block in xml parsing.
        https://bugs.webkit.org/show_bug.cgi?id=61688

        * fast/dom/xml-parser-error-message-crash-expected.txt: Added.
        * fast/dom/xml-parser-error-message-crash.svg: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (87736 => 87737)


--- trunk/LayoutTests/ChangeLog	2011-05-31 16:28:33 UTC (rev 87736)
+++ trunk/LayoutTests/ChangeLog	2011-05-31 16:51:09 UTC (rev 87737)
@@ -1,3 +1,14 @@
+2011-05-31  Abhishek Arya  <[email protected]>
+
+        Reviewed by Dimitri Glazkov.
+
+        Test that we do not crash when a DOMNodeInsertedIntoDocument event
+        is fired while generating a error message block in xml parsing.
+        https://bugs.webkit.org/show_bug.cgi?id=61688
+
+        * fast/dom/xml-parser-error-message-crash-expected.txt: Added.
+        * fast/dom/xml-parser-error-message-crash.svg: Added.
+
 2011-05-31  Andreas Kling  <[email protected]>
 
         Reviewed by Antti Koivisto.

Added: trunk/LayoutTests/fast/dom/xml-parser-error-message-crash-expected.txt (0 => 87737)


--- trunk/LayoutTests/fast/dom/xml-parser-error-message-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/xml-parser-error-message-crash-expected.txt	2011-05-31 16:51:09 UTC (rev 87737)
@@ -0,0 +1 @@
+PASS

Added: trunk/LayoutTests/fast/dom/xml-parser-error-message-crash.svg (0 => 87737)


--- trunk/LayoutTests/fast/dom/xml-parser-error-message-crash.svg	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/xml-parser-error-message-crash.svg	2011-05-31 16:51:09 UTC (rev 87737)
@@ -0,0 +1,13 @@
+<svg xmlns="http://www.w3.org/2000/svg">
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+function runTest()
+{
+    document.firstChild.innerHTML = "PASS";
+}
+
+document.addEventListener("DOMNodeInsertedIntoDocument", runTest, true);
+</script>
+

Modified: trunk/Source/WebCore/ChangeLog (87736 => 87737)


--- trunk/Source/WebCore/ChangeLog	2011-05-31 16:28:33 UTC (rev 87736)
+++ trunk/Source/WebCore/ChangeLog	2011-05-31 16:51:09 UTC (rev 87737)
@@ -1,3 +1,15 @@
+2011-05-31  Abhishek Arya  <[email protected]>
+
+        Reviewed by Dimitri Glazkov.
+
+        Convert raw ptr to RefPtr for documentElement.
+        https://bugs.webkit.org/show_bug.cgi?id=61688
+
+        Test: fast/dom/xml-parser-error-message-crash.svg
+
+        * dom/XMLDocumentParser.cpp:
+        (WebCore::XMLDocumentParser::insertErrorMessageBlock):
+
 2011-05-31  Andreas Kling  <[email protected]>
 
         Reviewed by Antti Koivisto.

Modified: trunk/Source/WebCore/dom/XMLDocumentParser.cpp (87736 => 87737)


--- trunk/Source/WebCore/dom/XMLDocumentParser.cpp	2011-05-31 16:28:33 UTC (rev 87736)
+++ trunk/Source/WebCore/dom/XMLDocumentParser.cpp	2011-05-31 16:51:09 UTC (rev 87737)
@@ -287,7 +287,7 @@
     // Create elements for display
     ExceptionCode ec = 0;
     Document* document = this->document();
-    Element* documentElement = document->documentElement();
+    RefPtr<Element> documentElement = document->documentElement();
     if (!documentElement) {
         RefPtr<Element> rootElement = document->createElement(htmlTag, false);
         document->appendChild(rootElement, ec);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to