Index: Source/modules/serviceworkers/ServiceWorkerError.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerError.cpp b/Source/modules/serviceworkers/ServiceWorkerError.cpp |
index 34fb09795f155bbc563ada2bc6ebbb44b6178833..53a41ba2907fd5d7921efe1de50de899ec11a559 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerError.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerError.cpp |
@@ -44,32 +44,32 @@ static DOMException* createException(ExceptionCode code, const String& defaultMe |
} |
// static |
-DOMException* ServiceWorkerError::take(ScriptPromiseResolver*, PassOwnPtr<WebServiceWorkerError> webError) |
+DOMException* ServiceWorkerError::take(ScriptPromiseResolver*, const WebServiceWorkerError& webError) |
{ |
- switch (webError->errorType) { |
+ switch (webError.errorType) { |
case WebServiceWorkerError::ErrorTypeAbort: |
- return createException(AbortError, "The Service Worker operation was aborted.", webError->message); |
+ return createException(AbortError, "The Service Worker operation was aborted.", webError.message); |
case WebServiceWorkerError::ErrorTypeActivate: |
// Not currently returned as a promise rejection. |
// FIXME: Introduce new ActivateError type to ExceptionCodes? |
- return createException(AbortError, "The Service Worker activation failed.", webError->message); |
+ return createException(AbortError, "The Service Worker activation failed.", webError.message); |
case WebServiceWorkerError::ErrorTypeDisabled: |
- return createException(NotSupportedError, "Service Worker support is disabled.", webError->message); |
+ return createException(NotSupportedError, "Service Worker support is disabled.", webError.message); |
case WebServiceWorkerError::ErrorTypeInstall: |
// FIXME: Introduce new InstallError type to ExceptionCodes? |
- return createException(AbortError, "The Service Worker installation failed.", webError->message); |
+ return createException(AbortError, "The Service Worker installation failed.", webError.message); |
case WebServiceWorkerError::ErrorTypeNetwork: |
- return createException(NetworkError, "The Service Worker failed by network.", webError->message); |
+ return createException(NetworkError, "The Service Worker failed by network.", webError.message); |
case WebServiceWorkerError::ErrorTypeNotFound: |
- return createException(NotFoundError, "The specified Service Worker resource was not found.", webError->message); |
+ return createException(NotFoundError, "The specified Service Worker resource was not found.", webError.message); |
case WebServiceWorkerError::ErrorTypeSecurity: |
- return createException(SecurityError, "The Service Worker security policy prevented an action.", webError->message); |
+ return createException(SecurityError, "The Service Worker security policy prevented an action.", webError.message); |
case WebServiceWorkerError::ErrorTypeState: |
- return createException(InvalidStateError, "The Service Worker state was not valid.", webError->message); |
+ return createException(InvalidStateError, "The Service Worker state was not valid.", webError.message); |
case WebServiceWorkerError::ErrorTypeTimeout: |
- return createException(AbortError, "The Service Worker operation timed out.", webError->message); |
+ return createException(AbortError, "The Service Worker operation timed out.", webError.message); |
case WebServiceWorkerError::ErrorTypeUnknown: |
- return createException(UnknownError, "An unknown error occurred within Service Worker.", webError->message); |
+ return createException(UnknownError, "An unknown error occurred within Service Worker.", webError.message); |
} |
ASSERT_NOT_REACHED(); |
return DOMException::create(UnknownError); |