diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index b18e7697f7a..0ae1d1009c7 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -3586,7 +3586,6 @@ nsContentUtils::CreateContextualFragment(nsIDOMNode* aContextNode, break; } - // XXX Shouldn't we be returning rv if it's a failure code? rv = parser->ParseFragment(aFragment, nsnull, tagStack, !bHTML, contentType, mode); if (NS_SUCCEEDED(rv)) { @@ -3595,7 +3594,7 @@ nsContentUtils::CreateContextualFragment(nsIDOMNode* aContextNode, document->SetFragmentParser(parser); - return NS_OK; + return rv; } /* static */ diff --git a/content/base/test/Makefile.in b/content/base/test/Makefile.in index 3eddcee4136..ae5cf4c5e07 100644 --- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -279,6 +279,7 @@ _TEST_FILES = test_bug5141.html \ file_XHRSendData.sjs \ file_XHRSendData_doc.xml \ file_XHRSendData_doc.xml^headers^ \ + test_bug466751.xhtml \ $(NULL) # Disabled for now. Mochitest isn't reliable enough for these. diff --git a/content/base/test/test_bug466751.xhtml b/content/base/test/test_bug466751.xhtml new file mode 100644 index 00000000000..b20c618e376 --- /dev/null +++ b/content/base/test/test_bug466751.xhtml @@ -0,0 +1,44 @@ + + +
++ ++ + +