mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-22 12:04:38 +00:00
Don't crash when ParseFragment() is called with an empty |aTagStack|. b=403877 r+sr=mrbkap a=jonas
This commit is contained in:
parent
716914ef1e
commit
c1be16ac17
@ -1453,7 +1453,7 @@ nsParser::ParseFragment(const nsAString& aSourceBuffer,
|
||||
nsCOMPtr<nsIFragmentContentSink> fragSink = do_QueryInterface(mSink);
|
||||
NS_ASSERTION(fragSink, "ParseFragment requires a fragment content sink");
|
||||
|
||||
if (!aXMLMode) {
|
||||
if (!aXMLMode && theCount) {
|
||||
// First, we have to flush any tags that don't belong in the head if there
|
||||
// was no <body> in the context.
|
||||
// XXX This is extremely ugly. Maybe CNavDTD should have FlushMisplaced()?
|
||||
|
Loading…
x
Reference in New Issue
Block a user