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

Unified Diff: Source/core/dom/Microtask.cpp

Issue 648423003: Enforce ScriptForbiddenScope and make it non-fatal. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Consistify Created 6 years, 2 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/bindings/core/v8/V8ScriptRunner.cpp ('k') | Source/platform/ScriptForbiddenScope.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Microtask.cpp
diff --git a/Source/core/dom/Microtask.cpp b/Source/core/dom/Microtask.cpp
index 9340c1df4780ce2ef665054201638b4cb02b27e4..56de67277d06b9b141435a0f1769d19bbdb97e19 100644
--- a/Source/core/dom/Microtask.cpp
+++ b/Source/core/dom/Microtask.cpp
@@ -33,6 +33,7 @@
#include "bindings/core/v8/V8PerIsolateData.h"
#include "bindings/core/v8/V8RecursionScope.h"
+#include "platform/ScriptForbiddenScope.h"
#include "platform/Task.h"
#include "public/platform/WebThread.h"
#include <v8.h>
@@ -44,7 +45,7 @@ void Microtask::performCheckpoint()
v8::Isolate* isolate = v8::Isolate::GetCurrent();
V8PerIsolateData* isolateData = V8PerIsolateData::from(isolate);
ASSERT(isolateData);
- if (isolateData->recursionLevel() || isolateData->performingMicrotaskCheckpoint() || isolateData->destructionPending())
+ if (isolateData->recursionLevel() || isolateData->performingMicrotaskCheckpoint() || isolateData->destructionPending() || ScriptForbiddenScope::isScriptForbidden())
return;
isolateData->setPerformingMicrotaskCheckpoint(true);
{
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | Source/platform/ScriptForbiddenScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698