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

Unified Diff: Source/core/dom/ExecutionContext.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/dom/ExecutionContext.cpp
diff --git a/Source/core/dom/ExecutionContext.cpp b/Source/core/dom/ExecutionContext.cpp
index 4ec9a88c8031b8d3d83268850358998f581dc5d5..d5c7b0fdf72d45613e709feeb7ae16bbb5312543 100644
--- a/Source/core/dom/ExecutionContext.cpp
+++ b/Source/core/dom/ExecutionContext.cpp
@@ -86,12 +86,14 @@ bool ExecutionContext::hasPendingActivity()
void ExecutionContext::suspendActiveDOMObjects()
{
+ ASSERT(!m_activeDOMObjectsAreSuspended);
lifecycleNotifier().notifySuspendingActiveDOMObjects();
m_activeDOMObjectsAreSuspended = true;
}
void ExecutionContext::resumeActiveDOMObjects()
{
+ ASSERT(m_activeDOMObjectsAreSuspended);
m_activeDOMObjectsAreSuspended = false;
lifecycleNotifier().notifyResumingActiveDOMObjects();
}

Powered by Google App Engine
This is Rietveld 408576698