| Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| index 7db1204a2139fc99f8794971222b31a520629bbc..78e0b8705d7c90fa4138f56ec7483ffd245e84e4 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "config.h"
|
| #include "bindings/core/v8/V8Binding.h"
|
|
|
| +#include "bindings/core/v8/GlobalScopeScriptController.h"
|
| #include "bindings/core/v8/ScriptController.h"
|
| #include "bindings/core/v8/V8AbstractEventListener.h"
|
| #include "bindings/core/v8/V8ArrayBufferView.h"
|
| @@ -44,8 +45,8 @@
|
| #include "bindings/core/v8/V8WorkerGlobalScope.h"
|
| #include "bindings/core/v8/V8XPathNSResolver.h"
|
| #include "bindings/core/v8/WindowProxy.h"
|
| -#include "bindings/core/v8/WorkerScriptController.h"
|
| #include "bindings/core/v8/custom/V8CustomXPathNSResolver.h"
|
| +#include "bindings/modules/v8/V8BindingForModules.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/Element.h"
|
| #include "core/dom/FlexibleArrayBufferView.h"
|
| @@ -713,8 +714,7 @@ ExecutionContext* toExecutionContext(v8::Local<v8::Context> context)
|
| v8::Local<v8::Object> workerWrapper = V8WorkerGlobalScope::findInstanceInPrototypeChain(global, context->GetIsolate());
|
| if (!workerWrapper.IsEmpty())
|
| return V8WorkerGlobalScope::toImpl(workerWrapper)->executionContext();
|
| - // FIXME: Is this line of code reachable?
|
| - return 0;
|
| + return toExecutionContextForModules(context);
|
| }
|
|
|
| ExecutionContext* currentExecutionContext(v8::Isolate* isolate)
|
| @@ -778,7 +778,7 @@ v8::Local<v8::Context> toV8Context(ExecutionContext* context, DOMWrapperWorld& w
|
| if (LocalFrame* frame = toDocument(context)->frame())
|
| return toV8Context(frame, world);
|
| } else if (context->isWorkerGlobalScope()) {
|
| - if (WorkerScriptController* script = toWorkerGlobalScope(context)->script()) {
|
| + if (GlobalScopeScriptController* script = toAbstractGlobalScope(context)->script()) {
|
| if (script->scriptState()->contextIsValid())
|
| return script->scriptState()->context();
|
| }
|
|
|