| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2010 Google Inc. All rights reserved. | 2  * Copyright (C) 2010 Google Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * Redistribution and use in source and binary forms, with or without | 4  * Redistribution and use in source and binary forms, with or without | 
| 5  * modification, are permitted provided that the following conditions | 5  * modification, are permitted provided that the following conditions | 
| 6  * are met: | 6  * are met: | 
| 7  * | 7  * | 
| 8  * 1.  Redistributions of source code must retain the above copyright | 8  * 1.  Redistributions of source code must retain the above copyright | 
| 9  *     notice, this list of conditions and the following disclaimer. | 9  *     notice, this list of conditions and the following disclaimer. | 
| 10  * 2.  Redistributions in binary form must reproduce the above copyright | 10  * 2.  Redistributions in binary form must reproduce the above copyright | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 34 namespace blink { | 34 namespace blink { | 
| 35 | 35 | 
| 36 class ExecutionContext; | 36 class ExecutionContext; | 
| 37 class IDBTransaction; | 37 class IDBTransaction; | 
| 38 | 38 | 
| 39 // This class keeps track of the transactions created during the current | 39 // This class keeps track of the transactions created during the current | 
| 40 // Javascript execution context. Transactions have an internal |active| flag | 40 // Javascript execution context. Transactions have an internal |active| flag | 
| 41 // which is set to true on creation, but must be set to false when control | 41 // which is set to true on creation, but must be set to false when control | 
| 42 // returns to the event loop. | 42 // returns to the event loop. | 
| 43 | 43 | 
| 44 class IDBPendingTransactionMonitor : public Supplement<ExecutionContext> { | 44 class IDBPendingTransactionMonitor : public NoBaseWillBeGarbageCollected<IDBPend
    ingTransactionMonitor>, public WillBeHeapSupplement<ExecutionContext> { | 
|  | 45     WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(IDBPendingTransactionMonitor); | 
|  | 46     DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(IDBPendingTransactionMonito
    r); | 
| 45     WTF_MAKE_NONCOPYABLE(IDBPendingTransactionMonitor); | 47     WTF_MAKE_NONCOPYABLE(IDBPendingTransactionMonitor); | 
| 46 | 48 | 
| 47 public: | 49 public: | 
| 48     static IDBPendingTransactionMonitor& from(Supplementable<ExecutionContext>&)
    ; | 50     static IDBPendingTransactionMonitor& from(WillBeHeapSupplementable<Execution
    Context>&); | 
| 49     virtual ~IDBPendingTransactionMonitor(); | 51     virtual void trace(Visitor*) OVERRIDE; | 
| 50     // The trace functino doesn't work until ExecutionContext is moved to Oilpan |  | 
| 51     // heap. |  | 
| 52     virtual void trace(Visitor* visitor) OVERRIDE { Supplement<ExecutionContext>
    ::trace(visitor); } |  | 
| 53     void addNewTransaction(IDBTransaction&); | 52     void addNewTransaction(IDBTransaction&); | 
| 54     void deactivateNewTransactions(); | 53     void deactivateNewTransactions(); | 
| 55 | 54 | 
| 56 private: | 55 private: | 
| 57     IDBPendingTransactionMonitor(); | 56     IDBPendingTransactionMonitor(); | 
| 58     static const char* supplementName(); | 57     static const char* supplementName(); | 
| 59 | 58 | 
| 60     typedef PersistentHeapVector<Member<IDBTransaction> > TransactionList; | 59     PersistentHeapVectorWillBeHeapVector<Member<IDBTransaction> > m_transactions
    ; | 
| 61     TransactionList m_transactions; |  | 
| 62 }; | 60 }; | 
| 63 | 61 | 
| 64 } // namespace blink | 62 } // namespace blink | 
| 65 | 63 | 
| 66 #endif // IDBPendingTransactionMonitor_h | 64 #endif // IDBPendingTransactionMonitor_h | 
| OLD | NEW | 
|---|