Index: Source/core/workers/SharedWorkerGlobalScope.cpp |
diff --git a/Source/core/workers/SharedWorkerGlobalScope.cpp b/Source/core/workers/SharedWorkerGlobalScope.cpp |
index 366f38a56e8ff1928b0f46c5629b3e3ac99c0bbb..5c63fa3c90cae0bcd39850d348b22149693b946a 100644 |
--- a/Source/core/workers/SharedWorkerGlobalScope.cpp |
+++ b/Source/core/workers/SharedWorkerGlobalScope.cpp |
@@ -51,8 +51,10 @@ PassRefPtrWillBeRawPtr<MessageEvent> createConnectEvent(PassRefPtrWillBeRawPtr<M |
} |
// static |
-PassRefPtrWillBeRawPtr<SharedWorkerGlobalScope> SharedWorkerGlobalScope::create(const String& name, SharedWorkerThread* thread, PassOwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData) |
+PassRefPtrWillBeRawPtr<SharedWorkerGlobalScope> SharedWorkerGlobalScope::create(const String& name, SharedWorkerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData) |
{ |
+ // Note: startupData is finalized on return. After the relevant parts has been |
+ // passed along to the created 'context'. |
RefPtrWillBeRawPtr<SharedWorkerGlobalScope> context = adoptRefWillBeNoop(new SharedWorkerGlobalScope(name, startupData->m_scriptURL, startupData->m_userAgent, thread, startupData->m_starterOrigin, startupData->m_workerClients.release())); |
context->applyContentSecurityPolicyFromString(startupData->m_contentSecurityPolicy, startupData->m_contentSecurityPolicyType); |
return context.release(); |