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

Side by Side Diff: Source/modules/cachestorage/CacheStorage.cpp

Issue 1183373006: Promptly finalize CacheStorage's embedder object. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "modules/cachestorage/CacheStorage.h" 6 #include "modules/cachestorage/CacheStorage.h"
7 7
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 const ScriptPromise promise = resolver->promise(); 262 const ScriptPromise promise = resolver->promise();
263 263
264 if (m_webCacheStorage) 264 if (m_webCacheStorage)
265 m_webCacheStorage->dispatchMatch(new MatchCallbacks(resolver), webReques t, Cache::toWebQueryParams(options)); 265 m_webCacheStorage->dispatchMatch(new MatchCallbacks(resolver), webReques t, Cache::toWebQueryParams(options));
266 else 266 else
267 resolver->reject(createNoImplementationException()); 267 resolver->reject(createNoImplementationException());
268 268
269 return promise; 269 return promise;
270 } 270 }
271 271
272 DEFINE_TRACE(CacheStorage)
273 {
274 visitor->trace(m_nameToCacheMap);
275 }
276
277 CacheStorage::CacheStorage(WeakPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnP tr<WebServiceWorkerCacheStorage> webCacheStorage) 272 CacheStorage::CacheStorage(WeakPtr<GlobalFetch::ScopedFetcher> fetcher, PassOwnP tr<WebServiceWorkerCacheStorage> webCacheStorage)
278 : m_scopedFetcher(fetcher) 273 : m_scopedFetcher(fetcher)
279 , m_webCacheStorage(webCacheStorage) 274 , m_webCacheStorage(webCacheStorage)
280 { 275 {
281 } 276 }
282 277
278 CacheStorage::~CacheStorage()
279 {
280 }
281
282 void CacheStorage::dispose()
283 {
284 m_webCacheStorage.clear();
285 }
286
287 DEFINE_TRACE(CacheStorage)
288 {
289 visitor->trace(m_nameToCacheMap);
290 }
291
283 } // namespace blink 292 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/cachestorage/CacheStorage.h ('k') | Source/modules/cachestorage/GlobalCacheStorage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698