Changeset 130335 in webkit
- Timestamp:
- Oct 3, 2012, 3:41:57 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r130333 r130335 1 2012-10-03 Joshua Bell <jsbell@chromium.org> 2 3 IndexedDB: Memory leak when deleting object stores with indexes 4 https://bugs.webkit.org/show_bug.cgi?id=98292 5 6 Reviewed by Tony Chang. 7 8 Reference cycles between IDBObjectStore and IDBIndex instances are explicitly 9 broken when the transaction completes (and the spec allows traversal to fail). 10 Deleted stores need to have the reference cycle broken too. 11 12 Caught by running valgrind over: storage/indexeddb/keypath-basics.html 13 14 * Modules/indexeddb/IDBTransaction.cpp: 15 (WebCore::IDBTransaction::objectStoreDeleted): Add store to set. 16 (WebCore::IDBTransaction::dispatchEvent): Notify stores in set. 17 * Modules/indexeddb/IDBTransaction.h: Add set of deleted stores. 18 1 19 2012-10-03 Adam Barth <abarth@webkit.org> 2 20 -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
r129038 r130335 187 187 objectStore->markDeleted(); 188 188 m_objectStoreCleanupMap.set(objectStore, objectStore->metadata()); 189 m_deletedObjectStores.add(objectStore); 189 190 } 190 191 } … … 387 388 it->second->transactionFinished(); 388 389 m_objectStoreMap.clear(); 390 for (IDBObjectStoreSet::iterator it = m_deletedObjectStores.begin(); it != m_deletedObjectStores.end(); ++it) 391 (*it)->transactionFinished(); 392 m_deletedObjectStores.clear(); 389 393 390 394 Vector<RefPtr<EventTarget> > targets; -
trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h
r129038 r130335 159 159 IDBObjectStoreMap m_objectStoreMap; 160 160 161 typedef HashSet<RefPtr<IDBObjectStore> > IDBObjectStoreSet; 162 IDBObjectStoreSet m_deletedObjectStores; 163 161 164 typedef HashMap<RefPtr<IDBObjectStore>, IDBObjectStoreMetadata> IDBObjectStoreMetadataMap; 162 165 IDBObjectStoreMetadataMap m_objectStoreCleanupMap;
Note:
See TracChangeset
for help on using the changeset viewer.