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

Unified Diff: Source/modules/cachestorage/GlobalCacheStorage.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/cachestorage/CacheStorage.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/cachestorage/GlobalCacheStorage.cpp
diff --git a/Source/modules/cachestorage/GlobalCacheStorage.cpp b/Source/modules/cachestorage/GlobalCacheStorage.cpp
index 00f04e397233ab88f91da4ed6a85e2fed2be3485..b436b9a78c3cf40068d0d197fb4d6b89f4b7f32a 100644
--- a/Source/modules/cachestorage/GlobalCacheStorage.cpp
+++ b/Source/modules/cachestorage/GlobalCacheStorage.cpp
@@ -33,6 +33,12 @@ public:
return *supplement;
}
+ ~GlobalCacheStorageImpl()
+ {
+ if (m_caches)
+ m_caches->dispose();
+ }
+
CacheStorage* caches(T& fetchingScope, ExceptionState& exceptionState)
{
ExecutionContext* context = fetchingScope.executionContext();
@@ -54,6 +60,8 @@ public:
return m_caches;
}
+ // Promptly dispose of associated CacheStorage.
+ EAGERLY_FINALIZE();
DEFINE_INLINE_VIRTUAL_TRACE()
{
visitor->trace(m_caches);
« no previous file with comments | « Source/modules/cachestorage/CacheStorage.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698