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

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

Issue 184043002: Only Microtask::performCheckpoint() if recursionLevel is 0 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ws Created 6 years, 9 months 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/dom/Microtask.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLScriptRunner.cpp
diff --git a/Source/core/html/parser/HTMLScriptRunner.cpp b/Source/core/html/parser/HTMLScriptRunner.cpp
index 3e3a7d0153da82f4e64dfb516d19bfc712fa8eb5..cae46322aaa19d0b87b708f4303a553c758b650e 100644
--- a/Source/core/html/parser/HTMLScriptRunner.cpp
+++ b/Source/core/html/parser/HTMLScriptRunner.cpp
@@ -27,6 +27,7 @@
#include "core/html/parser/HTMLScriptRunner.h"
#include "bindings/v8/ScriptSourceCode.h"
+#include "bindings/v8/V8PerIsolateData.h"
adamk 2014/03/20 21:58:47 This seems a bit wrong to include here, but this i
#include "core/dom/Element.h"
#include "core/events/Event.h"
#include "core/dom/IgnoreDestructiveWriteCountIncrementer.h"
@@ -126,7 +127,9 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
stopWatchingForLoad(pendingScript);
if (!isExecutingScript()) {
- Microtask::performCheckpoint();
+ if (!V8PerIsolateData::current()->recursionLevel())
+ Microtask::performCheckpoint();
+
m_hasScriptsWaitingForResources = !m_document->haveStylesheetsAndImportsLoaded();
if (m_hasScriptsWaitingForResources)
return;
@@ -292,7 +295,7 @@ void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
ASSERT(scriptLoader->isParserInserted());
- if (!isExecutingScript())
+ if (!isExecutingScript() && !V8PerIsolateData::current()->recursionLevel())
Microtask::performCheckpoint();
InsertionPointRecord insertionPointRecord(m_host->inputStream());
« no previous file with comments | « Source/core/dom/Microtask.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698