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

Unified Diff: Source/web/WebSharedWorkerImpl.cpp

Issue 594803002: Transfer SecurityOrigin overrides to Workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add tests 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/WebSharedWorkerImpl.cpp
diff --git a/Source/web/WebSharedWorkerImpl.cpp b/Source/web/WebSharedWorkerImpl.cpp
index 240b9108441811afba92ebce1ad30672d2611fa7..3b0b8b7171663c15a3352de10371b39a45fbaae1 100644
--- a/Source/web/WebSharedWorkerImpl.cpp
+++ b/Source/web/WebSharedWorkerImpl.cpp
@@ -394,11 +394,15 @@ void WebSharedWorkerImpl::onScriptLoaderFinished()
if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(document))
startMode = PauseWorkerGlobalScopeOnStart;
+ SecurityOrigin::PolicyOverrides originPolicyOverrides;
+ if (document->securityOrigin())
horo 2014/09/24 05:42:27 I think WebSharedWorkerImpl's m_mainFrame is not a
+ originPolicyOverrides = document->securityOrigin()->policyOverrides();
+
OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::create());
WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->createWorkerPermissionClientProxy(webSecurityOrigin)));
- OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), startMode, m_contentSecurityPolicy, static_cast<ContentSecurityPolicyHeaderType>(m_policyType), workerClients.release());
+ OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartupData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->script(), startMode, m_contentSecurityPolicy, static_cast<ContentSecurityPolicyHeaderType>(m_policyType), originPolicyOverrides, workerClients.release());
setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData.release()));
InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScriptLoader->identifier(), m_mainScriptLoader->script());
m_mainScriptLoader.clear();
« Source/web/WebEmbeddedWorkerImpl.cpp ('K') | « Source/web/WebEmbeddedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698