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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 594803002: Transfer SecurityOrigin overrides to Workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename transferPrivileges() to transferPrivilegesFrom() over security origins 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
« no previous file with comments | « Source/platform/weborigin/SecurityOrigin.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index a9b82e734e3fb8a5a0780503e83aa88f07a42d4e..f99b3507b56cf14ffd9b1968cb2a96966f20aee1 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. (crbug.com/254993)
+ 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();
« no previous file with comments | « Source/platform/weborigin/SecurityOrigin.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698