Bug 468538 - 'Crash [@ nsParser::ParseFragment] setting innerHTML in mixed-content document'. r+sr=mrbkap, a=blocking1.9+

This commit is contained in:
Ben Turner 2008-12-28 17:42:33 -05:00
parent db1142e3af
commit b3e8d42490

View File

@ -2092,6 +2092,12 @@ nsParser::ParseFragment(const nsAString& aSourceBuffer,
return result;
}
if (!mSink) {
// Parse must have failed in the XML case and so the sink was killed.
NS_ASSERTION(aXMLMode, "Unexpected!");
return NS_ERROR_HTMLPARSER_STOPPARSING;
}
nsCOMPtr<nsIFragmentContentSink> fragSink = do_QueryInterface(mSink);
NS_ASSERTION(fragSink, "ParseFragment requires a fragment content sink");