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

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

Issue 198213005: Oilpan: Prepare to move AbstractSQLTransactionBackend, SQLTransactionBackend, and SQLTransactionCoo… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Back to inline allocation 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
Index: Source/modules/webdatabase/SQLTransactionCoordinator.h
diff --git a/Source/modules/webdatabase/SQLTransactionCoordinator.h b/Source/modules/webdatabase/SQLTransactionCoordinator.h
index 93ba4cda0aa20dd4ae587de307cd7e8474628f17..f783508f05e9e36203eba65fc56564de286233fb 100644
--- a/Source/modules/webdatabase/SQLTransactionCoordinator.h
+++ b/Source/modules/webdatabase/SQLTransactionCoordinator.h
@@ -32,6 +32,7 @@
#ifndef SQLTransactionCoordinator_h
#define SQLTransactionCoordinator_h
+#include "heap/Handle.h"
#include "wtf/Deque.h"
#include "wtf/HashMap.h"
#include "wtf/HashSet.h"
@@ -50,15 +51,23 @@ public:
void releaseLock(SQLTransactionBackend*);
void shutdown();
private:
- typedef Deque<RefPtr<SQLTransactionBackend> > TransactionsQueue;
+ typedef Deque<RefPtrWillBeMember<SQLTransactionBackend> > TransactionsQueue;
struct CoordinationInfo {
TransactionsQueue pendingTransactions;
- HashSet<RefPtr<SQLTransactionBackend> > activeReadTransactions;
- RefPtr<SQLTransactionBackend> activeWriteTransaction;
+ WillBeHeapHashSet<RefPtrWillBeMember<SQLTransactionBackend> > activeReadTransactions;
+ RefPtrWillBeMember<SQLTransactionBackend> activeWriteTransaction;
+
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(pendingTransactions);
+ visitor->trace(activeReadTransactions);
+ visitor->trace(activeWriteTransaction);
+ }
+ ALLOW_ONLY_INLINE_ALLOCATION();
haraken 2014/03/19 04:59:20 Nit: We normally put this at the beginning of the
};
// Maps database names to information about pending transactions
- typedef HashMap<String, CoordinationInfo> CoordinationInfoMap;
- CoordinationInfoMap m_coordinationInfoMap;
+ typedef WillBePersistentHeapHashMap<String, CoordinationInfo> CoordinationInfoHeapMap;
haraken 2014/03/19 04:59:20 Mads, Erik: We don't need to add any Traits for Co
Mads Ager (chromium) 2014/03/19 06:30:54 That is correct, you don't need the traits for Has
+ CoordinationInfoHeapMap m_coordinationInfoMap;
bool m_isShuttingDown;
void processPendingTransactions(CoordinationInfo&);

Powered by Google App Engine
This is Rietveld 408576698