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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp

Issue 1532463003: ServiceWorker: Reject SecurityError instead of NotSupportedError. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698