| 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 764ecded23c1187da7b7ca157e67ac9961ad151d..905e92871e3e0ff3e4ac30c67eacdd59db176263 100644
|
| --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
|
| @@ -208,7 +208,7 @@ ScriptPromise ServiceWorkerContainer::registerServiceWorker(ScriptState* scriptS
|
| RefPtr<SecurityOrigin> documentOrigin = executionContext->securityOrigin();
|
| String errorMessage;
|
| // Restrict to secure origins: https://w3c.github.io/webappsec/specs/powerfulfeatures/#settings-privileged
|
| - if (!executionContext->isPrivilegedContext(errorMessage)) {
|
| + if (!executionContext->isSecureContext(errorMessage)) {
|
| resolver->reject(DOMException::create(NotSupportedError, errorMessage));
|
| return promise;
|
| }
|
| @@ -276,7 +276,7 @@ ScriptPromise ServiceWorkerContainer::getRegistration(ScriptState* scriptState,
|
|
|
| RefPtr<SecurityOrigin> documentOrigin = executionContext->securityOrigin();
|
| String errorMessage;
|
| - if (!executionContext->isPrivilegedContext(errorMessage)) {
|
| + if (!executionContext->isSecureContext(errorMessage)) {
|
| resolver->reject(DOMException::create(NotSupportedError, errorMessage));
|
| return promise;
|
| }
|
| @@ -312,7 +312,7 @@ ScriptPromise ServiceWorkerContainer::getRegistrations(ScriptState* scriptState)
|
| ExecutionContext* executionContext = scriptState->executionContext();
|
| RefPtr<SecurityOrigin> documentOrigin = executionContext->securityOrigin();
|
| String errorMessage;
|
| - if (!executionContext->isPrivilegedContext(errorMessage)) {
|
| + if (!executionContext->isSecureContext(errorMessage)) {
|
| resolver->reject(DOMException::create(NotSupportedError, errorMessage));
|
| return promise;
|
| }
|
|
|