| Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| index efd57b705ecb0132efe521ca599154baee0085e0..b6ca3e5aa9edbced8ab6c137473ffce1afee3fd6 100644
|
| --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| @@ -249,7 +249,7 @@ void ServiceWorkerContainer::registerServiceWorkerImpl(ExecutionContext* executi
|
|
|
| ContentSecurityPolicy* csp = executionContext->contentSecurityPolicy();
|
| if (csp) {
|
| - if (!csp->allowWorkerContextFromSource(scriptURL, ResourceRequest::RedirectStatus::NoRedirect, ContentSecurityPolicy::SendReport)) {
|
| + if (!(csp->allowRequestWithoutIntegrity(WebURLRequest::RequestContextServiceWorker, scriptURL) && csp->allowWorkerContextFromSource(scriptURL, ResourceRequest::RedirectStatus::NoRedirect, ContentSecurityPolicy::SendReport))) {
|
| callbacks->onError(WebServiceWorkerError(WebServiceWorkerError::ErrorTypeSecurity, String("Failed to register a ServiceWorker: The provided scriptURL ('" + scriptURL.getString() + "') violates the Content Security Policy.")));
|
| return;
|
| }
|
|
|