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

Unified Diff: third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.cpp

Issue 1684303002: Add a basic version of Worklet#import. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix non-oilpan build. Created 4 years, 10 months 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/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()

Powered by Google App Engine
This is Rietveld 408576698