mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 12:50:09 +00:00
Bug 497013 - Fix some re-entrancy bugs in the parser. r+sr=sicking
This commit is contained in:
parent
0ba4e791f3
commit
75e69499cc
@ -3046,9 +3046,9 @@ CNavDTD::AddHeadContent(nsIParserNode *aNode)
|
|||||||
|
|
||||||
// Make sure the head is opened.
|
// Make sure the head is opened.
|
||||||
if (!(mFlags & NS_DTD_FLAG_HAS_OPEN_HEAD)) {
|
if (!(mFlags & NS_DTD_FLAG_HAS_OPEN_HEAD)) {
|
||||||
mFlags |= NS_DTD_FLAG_HAS_OPEN_HEAD;
|
|
||||||
mBodyContext->PushTag(eHTMLTag_head);
|
|
||||||
result = mSink->OpenHead();
|
result = mSink->OpenHead();
|
||||||
|
mBodyContext->PushTag(eHTMLTag_head);
|
||||||
|
mFlags |= NS_DTD_FLAG_HAS_OPEN_HEAD;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: userdefined tags in the head are treated as leaves.
|
// Note: userdefined tags in the head are treated as leaves.
|
||||||
@ -3067,11 +3067,11 @@ CNavDTD::AddHeadContent(nsIParserNode *aNode)
|
|||||||
mHeadContainerPosition = mBodyContext->GetCount();
|
mHeadContainerPosition = mBodyContext->GetCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
mBodyContext->Push(static_cast<nsCParserNode*>(aNode), nsnull,
|
|
||||||
PR_FALSE);
|
|
||||||
|
|
||||||
// Note: The head context is already opened.
|
// Note: The head context is already opened.
|
||||||
result = mSink->OpenContainer(*aNode);
|
result = mSink->OpenContainer(*aNode);
|
||||||
|
|
||||||
|
mBodyContext->Push(static_cast<nsCParserNode*>(aNode), nsnull,
|
||||||
|
PR_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_TIMER_DEBUGLOG(("Start: Parse Time: CNavDTD::AddHeadContent(), this=%p\n", this));
|
MOZ_TIMER_DEBUGLOG(("Start: Parse Time: CNavDTD::AddHeadContent(), this=%p\n", this));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user