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()); |