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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 void onAbort(DOMException*); | 120 void onAbort(DOMException*); |
121 void onComplete(); | 121 void onComplete(); |
122 | 122 |
123 // EventTarget | 123 // EventTarget |
124 const AtomicString& interfaceName() const override; | 124 const AtomicString& interfaceName() const override; |
125 ExecutionContext* getExecutionContext() const override; | 125 ExecutionContext* getExecutionContext() const override; |
126 | 126 |
127 // ScriptWrappable | 127 // ScriptWrappable |
128 bool hasPendingActivity() const final; | 128 bool hasPendingActivity() const final; |
129 | 129 |
130 // ActiveDOMObject | |
131 void contextDestroyed() override; | |
132 | |
133 // For use in IDBObjectStore.isNewlyCreated(). The rest of the code should use | 130 // For use in IDBObjectStore.isNewlyCreated(). The rest of the code should use |
134 // IDBObjectStore.isNewlyCreated() instead of calling this method directly. | 131 // IDBObjectStore.isNewlyCreated() instead of calling this method directly. |
135 int64_t oldMaxObjectStoreId() const { | 132 int64_t oldMaxObjectStoreId() const { |
136 DCHECK(isVersionChange()); | 133 DCHECK(isVersionChange()); |
137 return m_oldDatabaseMetadata.maxObjectStoreId; | 134 return m_oldDatabaseMetadata.maxObjectStoreId; |
138 } | 135 } |
139 | 136 |
140 protected: | 137 protected: |
141 // EventTarget | 138 // EventTarget |
142 DispatchEventResult dispatchEventInternal(Event*) override; | 139 DispatchEventResult dispatchEventInternal(Event*) override; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // represent this case with an empty m_scope, because copying all the store | 184 // represent this case with an empty m_scope, because copying all the store |
188 // names would waste both time and memory. | 185 // names would waste both time and memory. |
189 // | 186 // |
190 // Using object store names to represent a transaction's scope is safe | 187 // Using object store names to represent a transaction's scope is safe |
191 // because object stores cannot be renamed in non-versionchange | 188 // because object stores cannot be renamed in non-versionchange |
192 // transactions. | 189 // transactions. |
193 const HashSet<String> m_scope; | 190 const HashSet<String> m_scope; |
194 | 191 |
195 State m_state = Active; | 192 State m_state = Active; |
196 bool m_hasPendingActivity = true; | 193 bool m_hasPendingActivity = true; |
197 bool m_contextStopped = false; | |
198 Member<DOMException> m_error; | 194 Member<DOMException> m_error; |
199 | 195 |
200 HeapListHashSet<Member<IDBRequest>> m_requestList; | 196 HeapListHashSet<Member<IDBRequest>> m_requestList; |
201 | 197 |
202 #if DCHECK_IS_ON() | 198 #if DCHECK_IS_ON() |
203 bool m_finishCalled = false; | 199 bool m_finishCalled = false; |
204 #endif // DCHECK_IS_ON() | 200 #endif // DCHECK_IS_ON() |
205 | 201 |
206 // Caches the IDBObjectStore instances returned by the objectStore() method. | 202 // Caches the IDBObjectStore instances returned by the objectStore() method. |
207 // | 203 // |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // This does not include a snapshot of the database's object store / index | 239 // This does not include a snapshot of the database's object store / index |
244 // metadata. | 240 // metadata. |
245 // | 241 // |
246 // Only valid for versionchange transactions. | 242 // Only valid for versionchange transactions. |
247 IDBDatabaseMetadata m_oldDatabaseMetadata; | 243 IDBDatabaseMetadata m_oldDatabaseMetadata; |
248 }; | 244 }; |
249 | 245 |
250 } // namespace blink | 246 } // namespace blink |
251 | 247 |
252 #endif // IDBTransaction_h | 248 #endif // IDBTransaction_h |
OLD | NEW |