Commit 58645a4a authored by falken@chromium.org's avatar falken@chromium.org

Add WebServiceWorkerErrorType::ErrorTypeAbort

This is needed for removing --enable-service-worker
(https://codereview.chromium.org/339973003/).  Chromium-side currently
returns ErrorTypeDisabled for both "SW is disabled" and "SWContextCore
was destroyed during shutdown" when handling a registration request.
Since the former will no longer happen, add a generic operation aborted
error for the latter.

BUG=365201

Review URL: https://codereview.chromium.org/342863003

git-svn-id: svn://svn.chromium.org/blink/trunk@176500 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 52254932
......@@ -43,6 +43,8 @@ PassRefPtrWillBeRawPtr<DOMException> ServiceWorkerError::from(ScriptPromiseResol
switch (webError->errorType) {
case WebServiceWorkerError::ErrorTypeDisabled:
return DOMException::create(NotSupportedError, "Service Worker support is disabled.");
case WebServiceWorkerError::ErrorTypeAbort:
return DOMException::create(AbortError, "The Service Worker operation was aborted.");
case WebServiceWorkerError::ErrorTypeSecurity:
return DOMException::create(SecurityError, "The Service Worker security policy prevented an action.");
case WebServiceWorkerError::ErrorTypeInstall:
......
......@@ -38,6 +38,7 @@ namespace blink {
struct WebServiceWorkerError {
enum ErrorType {
ErrorTypeDisabled = 0,
ErrorTypeAbort,
ErrorTypeSecurity,
ErrorTypeInstall,
ErrorTypeActivate,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment