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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 594803002: Transfer SecurityOrigin overrides to Workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop separate 'overrides' type and transfer-by-origin instead Created 6 years, 3 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: Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index a9b82e734e3fb8a5a0780503e83aa88f07a42d4e..0c501464ee5155aaf4ad97a709f218a666af37a5 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -402,6 +402,9 @@ void WebEmbeddedWorkerImpl::startWorkerThread()
if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(document))
startMode = PauseWorkerGlobalScopeOnStart;
+ // FIXME: this document's origin is pristine and without any extra privileges.
Mike West 2014/09/29 07:37:22 Can you point to a bug here? I don't understand th
sof 2014/09/29 09:42:28 Added crbug.com xref.
+ SecurityOrigin* starterOrigin = document->securityOrigin();
+
OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
providePermissionClientToWorker(workerClients.get(), m_permissionClient.release());
provideServiceWorkerGlobalScopeClientToWorker(workerClients.get(), ServiceWorkerGlobalScopeClientImpl::create(*m_workerContextClient));
@@ -416,6 +419,7 @@ void WebEmbeddedWorkerImpl::startWorkerThread()
// FIXME: fill appropriate CSP info and policy type.
String(),
ContentSecurityPolicyHeaderTypeEnforce,
+ starterOrigin,
workerClients.release());
m_mainScriptLoader.clear();

Powered by Google App Engine
This is Rietveld 408576698