Index: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp |
index 841caa9ce459d7a23d16eb62c38af0a3a5b875f0..712e7b0956d7ba884d0bc7eb6da4cbf9fc2174e7 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp |
@@ -127,8 +127,9 @@ v8::Local<v8::Value> ScriptController::ExecuteScriptAndReturnValue( |
try_catch.SetVerbose(true); |
v8::Local<v8::Script> script; |
- if (!V8ScriptRunner::CompileScript(source, GetIsolate(), |
- access_control_status, v8_cache_options) |
+ if (!V8ScriptRunner::CompileScript( |
+ ExecutionContext::From(ToScriptStateForMainWorld(GetFrame())), |
haraken
2017/07/17 16:16:24
This won't give you a correct context.
You'll nee
Liquan (Max) Gu
2017/07/17 20:39:52
Thanks!
|
+ source, GetIsolate(), access_control_status, v8_cache_options) |
.ToLocal(&script)) |
return result; |