| Index: third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
|
| index c64fc776dbe07fb27ad0f93be52256628ba34dfc..b4cfb82a6cf1a0aecad2835ba92441e41295697d 100644
|
| --- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
|
| +++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "bindings/core/v8/V8DOMStringList.h"
|
| #include "bindings/core/v8/V8File.h"
|
| #include "bindings/core/v8/V8Uint8Array.h"
|
| +#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
|
| #include "bindings/modules/v8/ToV8ForModules.h"
|
| #include "bindings/modules/v8/V8IDBCursor.h"
|
| #include "bindings/modules/v8/V8IDBCursorWithValue.h"
|
| @@ -41,13 +42,16 @@
|
| #include "bindings/modules/v8/V8IDBIndex.h"
|
| #include "bindings/modules/v8/V8IDBKeyRange.h"
|
| #include "bindings/modules/v8/V8IDBObjectStore.h"
|
| +#include "bindings/modules/v8/V8WorkletGlobalScope.h"
|
| #include "core/dom/DOMArrayBuffer.h"
|
| #include "core/dom/DOMArrayBufferView.h"
|
| +#include "core/dom/ExecutionContext.h"
|
| #include "modules/indexeddb/IDBKey.h"
|
| #include "modules/indexeddb/IDBKeyPath.h"
|
| #include "modules/indexeddb/IDBKeyRange.h"
|
| #include "modules/indexeddb/IDBTracing.h"
|
| #include "modules/indexeddb/IDBValue.h"
|
| +#include "modules/worklet/WorkletGlobalScope.h"
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/SharedBuffer.h"
|
| #include "wtf/MathExtras.h"
|
| @@ -516,4 +520,16 @@ void assertPrimaryKeyValidOrInjectable(ScriptState* scriptState, const IDBValue*
|
| }
|
| #endif
|
|
|
| +ExecutionContext* toExecutionContextForModules(v8::Local<v8::Context> context)
|
| +{
|
| + if (context.IsEmpty())
|
| + return nullptr;
|
| + v8::Local<v8::Object> global = context->Global();
|
| + v8::Local<v8::Object> workletWrapper = V8WorkletGlobalScope::findInstanceInPrototypeChain(global, context->GetIsolate());
|
| + if (!workletWrapper.IsEmpty())
|
| + return V8WorkletGlobalScope::toImpl(workletWrapper);
|
| + // FIXME: Is this line of code reachable?
|
| + return nullptr;
|
| +}
|
| +
|
| } // namespace blink
|
|
|