Bug 803586 - Infinite recursion in nsXMLStylesheetPI::SetNodeValueInternal; r=bz
authorMs2ger <ms2ger@gmail.com>
Sun, 21 Oct 2012 09:38:41 +0200
changeset 111027 fc9c3cc0a528c009573e62664973fc11a5ed57e2
parent 111026 16bf5abecb5b7417c6832fea4144f69b3f90aa23
child 111028 b72413cdab5e4bd854a506feaff79db118fdd155
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersbz
bugs803586
milestone19.0a1
Bug 803586 - Infinite recursion in nsXMLStylesheetPI::SetNodeValueInternal; r=bz
content/xml/content/crashtest/803586.xhtml
content/xml/content/crashtest/crashtests.list
content/xml/content/src/nsXMLStylesheetPI.cpp
new file mode 100644
--- /dev/null
+++ b/content/xml/content/crashtest/803586.xhtml
@@ -0,0 +1,8 @@
+<?xml-stylesheet href="foo.css" ?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<script>
+document.firstChild.nodeValue = null
+</script>
+</head>
+</html>
--- a/content/xml/content/crashtest/crashtests.list
+++ b/content/xml/content/crashtest/crashtests.list
@@ -1,2 +1,3 @@
 load 420429.xul
 load 453278.html
+load 803586.xhtml
--- a/content/xml/content/src/nsXMLStylesheetPI.cpp
+++ b/content/xml/content/src/nsXMLStylesheetPI.cpp
@@ -125,17 +125,17 @@ nsXMLStylesheetPI::UnbindFromTree(bool a
 }
 
 // nsIDOMNode
 
 void
 nsXMLStylesheetPI::SetNodeValueInternal(const nsAString& aNodeValue,
                                         ErrorResult& aError)
 {
-  nsGenericDOMDataNode::SetNodeValue(aNodeValue, aError);
+  nsGenericDOMDataNode::SetNodeValueInternal(aNodeValue, aError);
   if (!aError.Failed()) {
     UpdateStyleSheetInternal(nullptr, true);
   }
 }
 
 // nsStyleLinkElement
 
 NS_IMETHODIMP