Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Unified Diff: Source/core/html/parser/HTMLParserScheduler.cpp

Issue 625583002: Properly suspend HTMLDocumentParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: better way to call m_parserScheduler->resume Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/parser/HTMLParserScheduler.cpp
diff --git a/Source/core/html/parser/HTMLParserScheduler.cpp b/Source/core/html/parser/HTMLParserScheduler.cpp
index 6efa7521cbc94e6f4ce0a99ef717fb463908a44f..938326fc11332fb3de7a5b558e95d2e29263b80d 100644
--- a/Source/core/html/parser/HTMLParserScheduler.cpp
+++ b/Source/core/html/parser/HTMLParserScheduler.cpp
@@ -94,6 +94,7 @@ void HTMLParserScheduler::continueNextChunkTimerFired(Timer<HTMLParserScheduler>
void HTMLParserScheduler::scheduleForResume()
{
+ ASSERT(!m_isSuspendedWithActiveTimer);
m_continueNextChunkTimer.startOneShot(0, FROM_HERE);
}
@@ -137,4 +138,10 @@ bool HTMLParserScheduler::yieldIfNeeded(const SpeculationsPumpSession& session)
return false;
}
+void HTMLParserScheduler::forceResumeAfterYield()
+{
+ ASSERT(!m_continueNextChunkTimer.isActive());
+ m_isSuspendedWithActiveTimer = true;
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698