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