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

Unified Diff: Source/modules/background_sync/SyncError.cpp

Issue 1311053002: [BackgroundSync] Use appopriate type parameters for WebCallbacks (2/4) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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/background_sync/SyncError.h ('k') | Source/modules/background_sync/SyncRegistration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/background_sync/SyncError.cpp
diff --git a/Source/modules/background_sync/SyncError.cpp b/Source/modules/background_sync/SyncError.cpp
index 9fc7983542cf50da78d5d769f39eb47978b1ea5b..73a6895d13c43f7e4ab14c708e6a2566c10588ea 100644
--- a/Source/modules/background_sync/SyncError.cpp
+++ b/Source/modules/background_sync/SyncError.cpp
@@ -11,26 +11,20 @@
namespace blink {
-DOMException* SyncError::take(ScriptPromiseResolver*, WebSyncError* webErrorRaw)
+DOMException* SyncError::take(ScriptPromiseResolver*, const WebSyncError& webError)
{
- OwnPtr<WebSyncError> webError = adoptPtr(webErrorRaw);
- switch (webError->errorType) {
+ switch (webError.errorType) {
case WebSyncError::ErrorTypeAbort:
- return DOMException::create(AbortError, webError->message);
+ return DOMException::create(AbortError, webError.message);
case WebSyncError::ErrorTypeNoPermission:
- return DOMException::create(InvalidAccessError, webError->message);
+ return DOMException::create(InvalidAccessError, webError.message);
case WebSyncError::ErrorTypeNotFound:
- return DOMException::create(NotFoundError, webError->message);
+ return DOMException::create(NotFoundError, webError.message);
case WebSyncError::ErrorTypeUnknown:
- return DOMException::create(UnknownError, webError->message);
+ return DOMException::create(UnknownError, webError.message);
}
ASSERT_NOT_REACHED();
return DOMException::create(UnknownError);
}
-void SyncError::dispose(WebSyncError* webErrorRaw)
-{
- delete webErrorRaw;
-}
-
} // namespace blink
« no previous file with comments | « Source/modules/background_sync/SyncError.h ('k') | Source/modules/background_sync/SyncRegistration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698