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

Unified Diff: Source/core/workers/InProcessWorkerBase.cpp

Issue 1190493002: move processContentSecurityPolicy to WorkerScriptLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: (rebase) Created 5 years, 6 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/core/workers/InProcessWorkerBase.h ('k') | Source/core/workers/WorkerScriptLoader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/InProcessWorkerBase.cpp
diff --git a/Source/core/workers/InProcessWorkerBase.cpp b/Source/core/workers/InProcessWorkerBase.cpp
index 417983b5c0d58b9dc315c10ef9997b32a07173f8..c590386456e42be379d9d09d4118a60d27413367 100644
--- a/Source/core/workers/InProcessWorkerBase.cpp
+++ b/Source/core/workers/InProcessWorkerBase.cpp
@@ -78,12 +78,13 @@ bool InProcessWorkerBase::hasPendingActivity() const
PassRefPtr<ContentSecurityPolicy> InProcessWorkerBase::contentSecurityPolicy()
{
- return WorkerScriptLoaderClient::contentSecurityPolicy();
+ if (m_scriptLoader)
+ return m_scriptLoader->contentSecurityPolicy();
+ return m_contentSecurityPolicy;
}
void InProcessWorkerBase::didReceiveResponse(unsigned long identifier, const ResourceResponse& response)
{
- processContentSecurityPolicy(response);
InspectorInstrumentation::didReceiveScriptResponse(executionContext(), identifier);
}
@@ -99,6 +100,7 @@ void InProcessWorkerBase::notifyFinished()
m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), executionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode);
InspectorInstrumentation::scriptImported(executionContext(), m_scriptLoader->identifier(), m_scriptLoader->script());
}
+ m_contentSecurityPolicy = m_scriptLoader->releaseContentSecurityPolicy();
m_scriptLoader = nullptr;
}
« no previous file with comments | « Source/core/workers/InProcessWorkerBase.h ('k') | Source/core/workers/WorkerScriptLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698