Bug 1410848 - Use RAII with nsHtml5TreeOpExecutor::mFlushState. r=smaug.

MozReview-Commit-ID: 3a1tyYGT8u5
This commit is contained in:
Henri Sivonen
2017-10-27 10:06:33 +03:00
parent 545efaa3f5
commit b94d63f4e4
8 changed files with 205 additions and 137 deletions

View File

@@ -23,7 +23,7 @@ nsHtml5OplessBuilder::~nsHtml5OplessBuilder()
void
nsHtml5OplessBuilder::Start()
{
mFlushState = eInFlush;
BeginFlush();
BeginDocUpdate();
}
@@ -31,6 +31,7 @@ void
nsHtml5OplessBuilder::Finish()
{
EndDocUpdate();
EndFlush();
DropParserAndPerfHint();
mScriptLoader = nullptr;
mDocument = nullptr;
@@ -39,7 +40,6 @@ nsHtml5OplessBuilder::Finish()
mDocumentURI = nullptr;
mDocShell = nullptr;
mOwnedElements.Clear();
mFlushState = eNotFlushing;
}
void