| Index: Source/core/workers/WorkerGlobalScope.cpp
|
| diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp
|
| index 1b0ab0e1dc6c5f9512f79e679e53d5ad7063c30b..5cfabae8e632ae8eb71100879b0749b792f231e2 100644
|
| --- a/Source/core/workers/WorkerGlobalScope.cpp
|
| +++ b/Source/core/workers/WorkerGlobalScope.cpp
|
| @@ -79,7 +79,7 @@ public:
|
| virtual bool isCleanupTask() const { return true; }
|
| };
|
|
|
| -WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, WorkerThread* thread, double timeOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients)
|
| +WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, WorkerThread* thread, double timeOrigin, const SecurityOrigin* starterOrigin, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients)
|
| : m_url(url)
|
| , m_userAgent(userAgent)
|
| , m_script(adoptPtr(new WorkerScriptController(*this)))
|
| @@ -92,6 +92,9 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
|
| , m_messageStorage(ConsoleMessageStorage::createForWorker(this))
|
| {
|
| setSecurityOrigin(SecurityOrigin::create(url));
|
| + if (starterOrigin)
|
| + securityOrigin()->transferPrivileges(*starterOrigin);
|
| +
|
| m_workerClients->reattachThread();
|
| m_thread->setWorkerInspectorController(m_workerInspectorController.get());
|
| }
|
|
|