mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Always free the curren token at the end of HandleToken. bug 408939, r=bzbarsky sr=jst
This commit is contained in:
parent
d6945425b5
commit
f9fb5b564c
@ -742,12 +742,11 @@ CNavDTD::HandleToken(CToken* aToken, nsIParser* aParser)
|
||||
break;
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(result) || NS_ERROR_HTMLPARSER_BLOCK == result) {
|
||||
IF_FREE(theToken, mTokenAllocator);
|
||||
} else if (result == NS_ERROR_HTMLPARSER_STOPPARSING) {
|
||||
IF_FREE(theToken, mTokenAllocator);
|
||||
if (result == NS_ERROR_HTMLPARSER_STOPPARSING) {
|
||||
mFlags |= NS_DTD_FLAG_STOP_PARSING;
|
||||
} else {
|
||||
return NS_OK;
|
||||
} else if (NS_FAILED(result) && result != NS_ERROR_HTMLPARSER_BLOCK) {
|
||||
result = NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2016,12 +2015,6 @@ CNavDTD::HandleDocTypeDeclToken(CToken* aToken)
|
||||
|
||||
IF_FREE(theNode, &mNodeAllocator);
|
||||
|
||||
// Hack for bug 395846, if we failed to add the node for whatever reason,
|
||||
// then we need to free the token ourselves.
|
||||
if (NS_FAILED(result) && result != NS_ERROR_HTMLPARSER_BLOCK) {
|
||||
IF_FREE(aToken, mTokenAllocator);
|
||||
}
|
||||
|
||||
MOZ_TIMER_DEBUGLOG(("Start: Parse Time: CNavDTD::HandleDocTypeDeclToken(), this=%p\n", this));
|
||||
START_TIMER();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user