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

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: 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..aed81f5f96a4de8fb2bc119c9e9c1600a97531cb 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;
- struct CoordinationInfo {
+ typedef Deque<RefPtrWillBeMember<SQLTransactionBackend> > TransactionsQueue;
+ struct CoordinationInfo : public NoBaseWillBeGarbageCollectedFinalized<CoordinationInfo> {
TransactionsQueue pendingTransactions;
- HashSet<RefPtr<SQLTransactionBackend> > activeReadTransactions;
- RefPtr<SQLTransactionBackend> activeWriteTransaction;
+ WillBeHeapHashSet<RefPtrWillBeMember<SQLTransactionBackend> > activeReadTransactions;
+ RefPtrWillBeMember<SQLTransactionBackend> activeWriteTransaction;
+
+ static PassOwnPtrWillBeRawPtr<CoordinationInfo> create() { return adoptPtrWillBeNoop(new CoordinationInfo()); }
+ void trace(Visitor* visitor)
+ {
+ visitor->trace(pendingTransactions);
+ visitor->trace(activeReadTransactions);
+ visitor->trace(activeWriteTransaction);
+ }
};
// Maps database names to information about pending transactions
- typedef HashMap<String, CoordinationInfo> CoordinationInfoMap;
- CoordinationInfoMap m_coordinationInfoMap;
+ typedef WillBePersistentHeapHashMap<String, OwnPtrWillBeMember<CoordinationInfo> > CoordinationInfoHeapMap;
haraken 2014/03/18 13:45:20 Why did you change CoordinaitonInfo to OwnPtrWillB
Mads Ager (chromium) 2014/03/18 13:57:10 Yes, value objects in heap collections are traced
tkent 2014/03/19 04:44:56 Done. We need a documentation of ALLOW_ONLY_INLIN
+ CoordinationInfoHeapMap m_coordinationInfoMap;
bool m_isShuttingDown;
void processPendingTransactions(CoordinationInfo&);

Powered by Google App Engine
This is Rietveld 408576698