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

Unified Diff: Source/bindings/v8/ScriptController.cpp

Issue 345893002: Implement an infrastructure of Blink-in-JS Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/bindings/v8/ScriptController.cpp
diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
index d7049069670abd4a49a984d392392e586d3010c6..9be58b1a6dc4fff463bee9032cc5b545710b0d38 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -475,6 +475,10 @@ void ScriptController::namedItemRemoved(HTMLDocument* doc, const AtomicString& n
bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reason)
{
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ if (isolate->InContext() && ScriptState::current(isolate)->world().isBlinkInJSIsolatedWorld())
+ return true;
+
if (m_frame->document() && m_frame->document()->isSandboxed(SandboxScripts)) {
// FIXME: This message should be moved off the console once a solution to https://bugs.webkit.org/show_bug.cgi?id=103274 exists.
if (reason == AboutToExecuteScript)

Powered by Google App Engine
This is Rietveld 408576698