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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h

Issue 2177083002: Remove unnecessary finalization of IDBObserver classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef IDBObserverChanges_h 5 #ifndef IDBObserverChanges_h
6 #define IDBObserverChanges_h 6 #define IDBObserverChanges_h
7 7
8 #include "bindings/core/v8/ScriptValue.h" 8 #include "bindings/core/v8/ScriptValue.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "modules/indexeddb/IDBDatabase.h" 10 #include "modules/indexeddb/IDBDatabase.h"
11 #include "modules/indexeddb/IDBObservation.h" 11 #include "modules/indexeddb/IDBObservation.h"
12 #include "modules/indexeddb/IDBTransaction.h" 12 #include "modules/indexeddb/IDBTransaction.h"
13 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
14 #include "public/platform/WebVector.h" 14 #include "public/platform/WebVector.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class ScriptState; 18 class ScriptState;
19 19
20 class IDBObserverChanges final : public GarbageCollectedFinalized<IDBObserverCha nges>, public ScriptWrappable { 20 class IDBObserverChanges final : public GarbageCollected<IDBObserverChanges>, pu blic ScriptWrappable {
21 DEFINE_WRAPPERTYPEINFO(); 21 DEFINE_WRAPPERTYPEINFO();
22
23 public: 22 public:
24 static IDBObserverChanges* create(IDBDatabase*, const WebVector<WebIDBObserv ation>&, const WebVector<int32_t>& observationIndex); 23 static IDBObserverChanges* create(IDBDatabase*, const WebVector<WebIDBObserv ation>&, const WebVector<int32_t>& observationIndex);
25 24
26 DECLARE_TRACE(); 25 DECLARE_TRACE();
27 26
28 // Implement IDL 27 // Implement IDL
29 IDBTransaction* transaction() const { return m_transaction.get(); } 28 IDBTransaction* transaction() const { return m_transaction.get(); }
30 IDBDatabase* database() const { return m_database.get(); } 29 IDBDatabase* database() const { return m_database.get(); }
31 ScriptValue records(ScriptState*); 30 ScriptValue records(ScriptState*);
32 31
33 private: 32 private:
34 IDBObserverChanges(IDBDatabase*, const WebVector<WebIDBObservation>&, const WebVector<int32_t>& observationIndex); 33 IDBObserverChanges(IDBDatabase*, const WebVector<WebIDBObservation>&, const WebVector<int32_t>& observationIndex);
35 34
36 void extractChanges(const WebVector<WebIDBObservation>&, const WebVector<int 32_t>& observationIndex); 35 void extractChanges(const WebVector<WebIDBObservation>&, const WebVector<int 32_t>& observationIndex);
37 36
38 Member<IDBDatabase> m_database; 37 Member<IDBDatabase> m_database;
39 Member<IDBTransaction> m_transaction; 38 Member<IDBTransaction> m_transaction;
40 // Map objectStoreId to IDBObservation list. 39 // Map objectStoreId to IDBObservation list.
41 HeapHashMap<int64_t, HeapVector<Member<IDBObservation>>> m_records; 40 HeapHashMap<int64_t, HeapVector<Member<IDBObservation>>> m_records;
42 }; 41 };
43 42
44 } // namespace blink 43 } // namespace blink
45 44
46 #endif // IDBObserverChanges_h 45 #endif // IDBObserverChanges_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/indexeddb/IDBObserver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698