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

Unified Diff: Source/modules/cachestorage/CacheTest.cpp

Issue 1155573003: CacheStorage: Pass an error object allocated on heap to WebCallbacks::onError (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix unittests Created 5 years, 6 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/cachestorage/CacheStorageError.cpp ('k') | public/platform/WebServiceWorkerCacheError.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/cachestorage/CacheTest.cpp
diff --git a/Source/modules/cachestorage/CacheTest.cpp b/Source/modules/cachestorage/CacheTest.cpp
index c41ee95af8d403a806ae896286f2a8cff278a601..580b1dff7aa591f5a9895c69f32425c59201125e 100644
--- a/Source/modules/cachestorage/CacheTest.cpp
+++ b/Source/modules/cachestorage/CacheTest.cpp
@@ -112,8 +112,7 @@ public:
checkQueryParamsIfProvided(queryParams);
OwnPtr<CacheMatchCallbacks> ownedCallbacks(adoptPtr(callbacks));
- WebServiceWorkerCacheError error = m_error;
- return callbacks->onError(&error);
+ return callbacks->onError(new WebServiceWorkerCacheError(m_error));
}
virtual void dispatchMatchAll(CacheWithResponsesCallbacks* callbacks, const WebServiceWorkerRequest& webRequest, const QueryParams& queryParams) override
@@ -123,8 +122,7 @@ public:
checkQueryParamsIfProvided(queryParams);
OwnPtr<CacheWithResponsesCallbacks> ownedCallbacks(adoptPtr(callbacks));
- WebServiceWorkerCacheError error = m_error;
- return callbacks->onError(&error);
+ return callbacks->onError(new WebServiceWorkerCacheError(m_error));
}
virtual void dispatchKeys(CacheWithRequestsCallbacks* callbacks, const WebServiceWorkerRequest* webRequest, const QueryParams& queryParams) override
@@ -136,8 +134,7 @@ public:
}
OwnPtr<CacheWithRequestsCallbacks> ownedCallbacks(adoptPtr(callbacks));
- WebServiceWorkerCacheError error = m_error;
- return callbacks->onError(&error);
+ return callbacks->onError(new WebServiceWorkerCacheError(m_error));
}
virtual void dispatchBatch(CacheBatchCallbacks* callbacks, const WebVector<BatchOperation>& batchOperations) override
@@ -146,8 +143,7 @@ public:
checkBatchOperationsIfProvided(batchOperations);
OwnPtr<CacheBatchCallbacks> ownedCallbacks(adoptPtr(callbacks));
- WebServiceWorkerCacheError error = m_error;
- return callbacks->onError(&error);
+ return callbacks->onError(new WebServiceWorkerCacheError(m_error));
}
protected:
« no previous file with comments | « Source/modules/cachestorage/CacheStorageError.cpp ('k') | public/platform/WebServiceWorkerCacheError.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698