Index: Source/core/workers/InProcessWorkerBase.cpp |
diff --git a/Source/core/workers/InProcessWorkerBase.cpp b/Source/core/workers/InProcessWorkerBase.cpp |
index 157afdc4a2a21a722bdae721e7ed94d31649d151..8e2ae503e3934f4d96a0e04f8b3c921f7b7c4520 100644 |
--- a/Source/core/workers/InProcessWorkerBase.cpp |
+++ b/Source/core/workers/InProcessWorkerBase.cpp |
@@ -78,16 +78,12 @@ bool InProcessWorkerBase::hasPendingActivity() const |
PassRefPtr<ContentSecurityPolicy> InProcessWorkerBase::contentSecurityPolicy() |
{ |
- return m_contentSecurityPolicy; |
+ return WorkerScriptLoaderClient::contentSecurityPolicy(); |
} |
void InProcessWorkerBase::didReceiveResponse(unsigned long identifier, const ResourceResponse& response) |
{ |
- if (!response.url().protocolIs("blob") && !response.url().protocolIs("file") && !response.url().protocolIs("filesystem")) { |
- m_contentSecurityPolicy = ContentSecurityPolicy::create(); |
- m_contentSecurityPolicy->setOverrideURLForSelf(response.url()); |
- m_contentSecurityPolicy->didReceiveHeaders(ContentSecurityPolicyResponseHeaders(response)); |
- } |
+ processContentSecurityPolicy(response); |
InspectorInstrumentation::didReceiveScriptResponse(executionContext(), identifier); |
} |