Chromium Code Reviews| 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&); |