| Index: content/renderer/cache_storage/cache_storage_dispatcher.cc
|
| diff --git a/content/renderer/cache_storage/cache_storage_dispatcher.cc b/content/renderer/cache_storage/cache_storage_dispatcher.cc
|
| index 7eafde7702b6809c8b708115d03501d2c96d894b..a80381c2e32501b8c5ea056452a15287fe086cfc 100644
|
| --- a/content/renderer/cache_storage/cache_storage_dispatcher.cc
|
| +++ b/content/renderer/cache_storage/cache_storage_dispatcher.cc
|
| @@ -126,15 +126,9 @@ template <typename T>
|
| void ClearCallbacksMapWithErrors(T* callbacks_map) {
|
| typename T::iterator iter(callbacks_map);
|
| while (!iter.IsAtEnd()) {
|
| -#ifdef CRBUG_494884
|
| iter.GetCurrentValue()->onError(
|
| new blink::WebServiceWorkerCacheError(
|
| blink::WebServiceWorkerCacheErrorNotFound));
|
| -#else
|
| - blink::WebServiceWorkerCacheError reason =
|
| - blink::WebServiceWorkerCacheErrorNotFound;
|
| - iter.GetCurrentValue()->onError(&reason);
|
| -#endif
|
| callbacks_map->Remove(iter.GetCurrentKey());
|
| iter.Advance();
|
| }
|
| @@ -361,11 +355,7 @@ void CacheStorageDispatcher::OnCacheStorageHasError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| WebServiceWorkerCacheStorage::CacheStorageCallbacks* callbacks =
|
| has_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| has_callbacks_.Remove(request_id);
|
| has_times_.erase(request_id);
|
| }
|
| @@ -377,11 +367,7 @@ void CacheStorageDispatcher::OnCacheStorageOpenError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| WebServiceWorkerCacheStorage::CacheStorageWithCacheCallbacks* callbacks =
|
| open_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| open_callbacks_.Remove(request_id);
|
| open_times_.erase(request_id);
|
| }
|
| @@ -393,11 +379,7 @@ void CacheStorageDispatcher::OnCacheStorageDeleteError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| WebServiceWorkerCacheStorage::CacheStorageCallbacks* callbacks =
|
| delete_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| delete_callbacks_.Remove(request_id);
|
| delete_times_.erase(request_id);
|
| }
|
| @@ -409,11 +391,7 @@ void CacheStorageDispatcher::OnCacheStorageKeysError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| WebServiceWorkerCacheStorage::CacheStorageKeysCallbacks* callbacks =
|
| keys_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| keys_callbacks_.Remove(request_id);
|
| keys_times_.erase(request_id);
|
| }
|
| @@ -425,11 +403,7 @@ void CacheStorageDispatcher::OnCacheStorageMatchError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| WebServiceWorkerCacheStorage::CacheStorageMatchCallbacks* callbacks =
|
| match_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| match_callbacks_.Remove(request_id);
|
| match_times_.erase(request_id);
|
| }
|
| @@ -506,11 +480,7 @@ void CacheStorageDispatcher::OnCacheMatchError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| blink::WebServiceWorkerCache::CacheMatchCallbacks* callbacks =
|
| cache_match_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| cache_match_callbacks_.Remove(request_id);
|
| cache_match_times_.erase(request_id);
|
| }
|
| @@ -522,11 +492,7 @@ void CacheStorageDispatcher::OnCacheMatchAllError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| blink::WebServiceWorkerCache::CacheWithResponsesCallbacks* callbacks =
|
| cache_match_all_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| cache_match_all_callbacks_.Remove(request_id);
|
| cache_match_all_times_.erase(request_id);
|
| }
|
| @@ -538,11 +504,7 @@ void CacheStorageDispatcher::OnCacheKeysError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| blink::WebServiceWorkerCache::CacheWithRequestsCallbacks* callbacks =
|
| cache_keys_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| cache_keys_callbacks_.Remove(request_id);
|
| cache_keys_times_.erase(request_id);
|
| }
|
| @@ -554,11 +516,7 @@ void CacheStorageDispatcher::OnCacheBatchError(
|
| DCHECK_EQ(thread_id, CurrentWorkerId());
|
| blink::WebServiceWorkerCache::CacheBatchCallbacks* callbacks =
|
| cache_batch_callbacks_.Lookup(request_id);
|
| -#ifdef CRBUG_494884
|
| callbacks->onError(new blink::WebServiceWorkerCacheError(reason));
|
| -#else
|
| - callbacks->onError(&reason);
|
| -#endif
|
| cache_batch_callbacks_.Remove(request_id);
|
| cache_batch_times_.erase(request_id);
|
| }
|
|
|