mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Always free doctype decl tokens. bug 395846, r=jst sr=sicking a=schrep
This commit is contained in:
parent
4086932c60
commit
9e57824bb7
@ -1,5 +1,5 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set sw=2 ts=2 et tw=80: */
|
||||
/* vim: set sw=2 ts=2 et tw=78: */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
@ -1981,6 +1981,12 @@ 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