Index: third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.cpp |
diff --git a/third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.cpp b/third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.cpp |
index 15819a4a16dc0a95ab5071e3fa6d2207891a1f1c..9be0628f7f2e9aa4f3d64a257ba582dea3f300a0 100644 |
--- a/third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.cpp |
+++ b/third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.cpp |
@@ -9,16 +9,19 @@ |
namespace blink { |
// static |
-PassRefPtrWillBeRawPtr<WorkletGlobalScope> WorkletGlobalScope::create(const KURL& url, const String& userAgent, v8::Isolate* isolate) |
+PassRefPtrWillBeRawPtr<WorkletGlobalScope> WorkletGlobalScope::create(const KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Isolate* isolate) |
{ |
- RefPtrWillBeRawPtr<WorkletGlobalScope> workletGlobalScope = adoptRefWillBeNoop(new WorkletGlobalScope(url, userAgent, isolate)); |
+ RefPtrWillBeRawPtr<WorkletGlobalScope> workletGlobalScope = adoptRefWillBeNoop(new WorkletGlobalScope(url, userAgent, securityOrigin, isolate)); |
workletGlobalScope->script()->initializeContextIfNeeded(); |
return workletGlobalScope.release(); |
} |
-WorkletGlobalScope::WorkletGlobalScope(const KURL& url, const String& userAgent, v8::Isolate* isolate) |
- : m_script(WorkerOrWorkletScriptController::create(this, isolate)) |
+WorkletGlobalScope::WorkletGlobalScope(const KURL& url, const String& userAgent, PassRefPtr<SecurityOrigin> securityOrigin, v8::Isolate* isolate) |
+ : m_url(url) |
+ , m_userAgent(userAgent) |
+ , m_script(WorkerOrWorkletScriptController::create(this, isolate)) |
{ |
+ setSecurityOrigin(securityOrigin); |
} |
WorkletGlobalScope::~WorkletGlobalScope() |