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

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: rebase Created 6 years 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
« no previous file with comments | « Source/core/html/parser/HTMLParserScheduler.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLParserScheduler.cpp
diff --git a/Source/core/html/parser/HTMLParserScheduler.cpp b/Source/core/html/parser/HTMLParserScheduler.cpp
index bd384b72448ea6cbb5dfd571394b4bba8f16214e..68797fcc39e0e387c22f2ce6961b2d62e68c4eed 100644
--- a/Source/core/html/parser/HTMLParserScheduler.cpp
+++ b/Source/core/html/parser/HTMLParserScheduler.cpp
@@ -100,6 +100,7 @@ void HTMLParserScheduler::continueNextChunkTimerFired(Timer<HTMLParserScheduler>
void HTMLParserScheduler::scheduleForResume()
{
+ ASSERT(!m_isSuspendedWithActiveTimer);
m_continueNextChunkTimer.startOneShot(0, FROM_HERE);
}
@@ -155,4 +156,10 @@ bool HTMLParserScheduler::yieldIfNeeded(const SpeculationsPumpSession& session,
return false;
}
+void HTMLParserScheduler::forceResumeAfterYield()
+{
+ ASSERT(!m_continueNextChunkTimer.isActive());
+ m_isSuspendedWithActiveTimer = true;
+}
+
}
« no previous file with comments | « Source/core/html/parser/HTMLParserScheduler.h ('k') | Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698