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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp

Issue 1535943005: Initial implementation of bindings and basic classes for worklets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix memory leak. Created 5 years 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: 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 1098dedfb5bdb71e71bf911ed5b2db4642b90aa4..cc53197c3f3291a8ba8e4b661717c13c32815f2f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp
@@ -31,6 +31,8 @@
#include "config.h"
#include "bindings/core/v8/V8Binding.h"
+#include "bindings/core/v8/GlobalScopeScriptController.h"
+#include "bindings/core/v8/ModuleProxy.h"
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/V8AbstractEventListener.h"
#include "bindings/core/v8/V8ArrayBufferView.h"
@@ -44,7 +46,6 @@
#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 "core/dom/Document.h"
#include "core/dom/Element.h"
@@ -57,7 +58,7 @@
#include "core/inspector/InspectorTraceEvents.h"
#include "core/loader/FrameLoader.h"
#include "core/loader/FrameLoaderClient.h"
-#include "core/workers/WorkerGlobalScope.h"
+#include "core/workers/AbstractGlobalScope.h"
#include "core/xml/XPathNSResolver.h"
#include "platform/EventTracer.h"
#include "platform/JSONValues.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 ModuleProxy::moduleProxy().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()) {
kinuko 2015/12/22 08:39:03 nit: isAbstractGlobalScope() ?
ikilpatrick 2015/12/22 23:40:23 Done.
- if (WorkerScriptController* script = toWorkerGlobalScope(context)->script()) {
+ if (GlobalScopeScriptController* script = toAbstractGlobalScope(context)->script()) {
if (script->scriptState()->contextIsValid())
return script->scriptState()->context();
}

Powered by Google App Engine
This is Rietveld 408576698