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

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

Issue 1161823002: Correctly keep track of isolates for microtask execution (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
Index: Source/core/html/parser/HTMLScriptRunner.cpp
diff --git a/Source/core/html/parser/HTMLScriptRunner.cpp b/Source/core/html/parser/HTMLScriptRunner.cpp
index c63549b474df84d66d302a97aff8a16cb70a2b56..c0570e2e44c72829e06c338390b3dcf03c0309da 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/core/v8/ScriptSourceCode.h"
+#include "bindings/core/v8/V8PerIsolateData.h"
#include "core/dom/Element.h"
#include "core/events/Event.h"
#include "core/dom/IgnoreDestructiveWriteCountIncrementer.h"
@@ -133,7 +134,7 @@ void HTMLScriptRunner::executePendingScriptAndDispatchEvent(PendingScript& pendi
pendingScript.stopWatchingForLoad(this);
if (!isExecutingScript()) {
- Microtask::performCheckpoint();
+ Microtask::performCheckpoint(V8PerIsolateData::mainThreadIsolate());
if (pendingScriptType == PendingScript::ParsingBlocking) {
m_hasScriptsWaitingForResources = !m_document->isScriptExecutionReady();
// The parser cannot be unblocked as a microtask requested another resource
@@ -337,7 +338,7 @@ void HTMLScriptRunner::runScript(Element* script, const TextPosition& scriptStar
ASSERT(scriptLoader->isParserInserted());
if (!isExecutingScript())
- Microtask::performCheckpoint();
+ Microtask::performCheckpoint(V8PerIsolateData::mainThreadIsolate());
InsertionPointRecord insertionPointRecord(m_host->inputStream());
NestingLevelIncrementer nestingLevelIncrementer(m_scriptNestingLevel);

Powered by Google App Engine
This is Rietveld 408576698