Bug 1355441 - Reuse StackNode in HTML parser TreeBuilder to avoid malloc. r=hsivonen
This commit is contained in:
@@ -220,6 +220,9 @@ nsHtml5StreamParser::nsHtml5StreamParser(nsHtml5TreeOpExecutor* aExecutor,
|
||||
nsHtml5StreamParser::~nsHtml5StreamParser()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");
|
||||
// mSpeculations may contain StateSnapshot holding StackNodes that we
|
||||
// want to free when the tokenizer ends, so clear the speculations first.
|
||||
mSpeculations.Clear();
|
||||
mTokenizer->end();
|
||||
#ifdef DEBUG
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user