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

Unified Diff: Source/modules/webdatabase/DatabaseContext.h

Issue 214163004: Oilpan: Move database closing task in ~DatabaseBackendSync to a pre-finalization hook with HeapHash… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a FIXME comment Created 6 years, 9 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/webdatabase/DatabaseBackendSync.cpp ('k') | Source/modules/webdatabase/DatabaseContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webdatabase/DatabaseContext.h
diff --git a/Source/modules/webdatabase/DatabaseContext.h b/Source/modules/webdatabase/DatabaseContext.h
index 395c78e226f1cee81b2f6bfda16b3765e3eced32..dd9b5d717a61a111f0a53c59dcf146f162eba9a8 100644
--- a/Source/modules/webdatabase/DatabaseContext.h
+++ b/Source/modules/webdatabase/DatabaseContext.h
@@ -76,9 +76,21 @@ private:
void stopSyncDatabases();
RefPtrWillBePersistent<DatabaseThread> m_databaseThread;
+#if ENABLE(OILPAN)
+ class DatabaseCloser {
+ public:
+ explicit DatabaseCloser(DatabaseBackendBase& database) : m_database(database) { }
+ ~DatabaseCloser();
+
+ private:
+ DatabaseBackendBase& m_database;
+ };
+ PersistentHeapHashMap<WeakMember<DatabaseBackendBase>, OwnPtr<DatabaseCloser> > m_openSyncDatabases;
+#else
// The contents of m_openSyncDatabases are raw pointers. It's safe because
// DatabaseBackendSync is always closed before destruction.
HashSet<DatabaseBackendBase*> m_openSyncDatabases;
+#endif
bool m_hasOpenDatabases; // This never changes back to false, even after the database thread is closed.
bool m_hasRequestedTermination;
};
« no previous file with comments | « Source/modules/webdatabase/DatabaseBackendSync.cpp ('k') | Source/modules/webdatabase/DatabaseContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698