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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerError.cpp

Issue 1240763002: CallbackPromiseAdapter types should be more compatible with WebCallbacks (3/3). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 years, 4 months 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
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerError.h ('k') | public/platform/WebCallbacks.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « Source/modules/serviceworkers/ServiceWorkerError.h ('k') | public/platform/WebCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698