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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 bool HasPendingActivity() const final; | 134 bool HasPendingActivity() const final; |
135 | 135 |
136 // For use in IDBObjectStore::IsNewlyCreated(). The rest of the code should | 136 // For use in IDBObjectStore::IsNewlyCreated(). The rest of the code should |
137 // use IDBObjectStore::IsNewlyCreated() instead of calling this method | 137 // use IDBObjectStore::IsNewlyCreated() instead of calling this method |
138 // directly. | 138 // directly. |
139 int64_t OldMaxObjectStoreId() const { | 139 int64_t OldMaxObjectStoreId() const { |
140 DCHECK(IsVersionChange()); | 140 DCHECK(IsVersionChange()); |
141 return old_database_metadata_.max_object_store_id; | 141 return old_database_metadata_.max_object_store_id; |
142 } | 142 } |
143 | 143 |
| 144 // Returns a detailed message to use when throwing TransactionInactiveError, |
| 145 // depending on whether the transaction is just inactive or has finished. |
| 146 const char* InactiveErrorMessage() const; |
| 147 |
144 protected: | 148 protected: |
145 // EventTarget | 149 // EventTarget |
146 DispatchEventResult DispatchEventInternal(Event*) override; | 150 DispatchEventResult DispatchEventInternal(Event*) override; |
147 | 151 |
148 private: | 152 private: |
149 using IDBObjectStoreMap = HeapHashMap<String, Member<IDBObjectStore>>; | 153 using IDBObjectStoreMap = HeapHashMap<String, Member<IDBObjectStore>>; |
150 | 154 |
151 // For observer transactions. | 155 // For observer transactions. |
152 IDBTransaction(ExecutionContext*, | 156 IDBTransaction(ExecutionContext*, |
153 int64_t, | 157 int64_t, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 // This does not include a snapshot of the database's object store / index | 256 // This does not include a snapshot of the database's object store / index |
253 // metadata. | 257 // metadata. |
254 // | 258 // |
255 // Only valid for versionchange transactions. | 259 // Only valid for versionchange transactions. |
256 IDBDatabaseMetadata old_database_metadata_; | 260 IDBDatabaseMetadata old_database_metadata_; |
257 }; | 261 }; |
258 | 262 |
259 } // namespace blink | 263 } // namespace blink |
260 | 264 |
261 #endif // IDBTransaction_h | 265 #endif // IDBTransaction_h |
OLD | NEW |