Title: [208545] trunk/Source/WebCore
Revision
208545
Author
[email protected]
Date
2016-11-10 10:04:03 -0800 (Thu, 10 Nov 2016)

Log Message

IndexedDB 2.0: REGRESSION(r208467) Fix flaky crashes in IDB GC-related code.
https://bugs.webkit.org/show_bug.cgi?id=164596

Reviewed by Eric Carlson.

No new tests (Covered by existing tests).

We can't just WTFMove the pointers from the deleted-IDBObject maps...
We need to remove the entries, too.

* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::rollbackForVersionChangeAbort):

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::internalAbort):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (208544 => 208545)


--- trunk/Source/WebCore/ChangeLog	2016-11-10 17:30:34 UTC (rev 208544)
+++ trunk/Source/WebCore/ChangeLog	2016-11-10 18:04:03 UTC (rev 208545)
@@ -1,3 +1,21 @@
+2016-11-10  Brady Eidson  <[email protected]>
+
+        IndexedDB 2.0: REGRESSION(r208467) Fix flaky crashes in IDB GC-related code.
+        https://bugs.webkit.org/show_bug.cgi?id=164596
+
+        Reviewed by Eric Carlson.
+
+        No new tests (Covered by existing tests).
+
+        We can't just WTFMove the pointers from the deleted-IDBObject maps...
+        We need to remove the entries, too.
+
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::rollbackForVersionChangeAbort):
+
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::internalAbort):
+
 2016-11-10  Youenn Fablet  <[email protected]>
 
         MediaStreamTrack should use more Ref<> and less RefPtr<>

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (208544 => 208545)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-11-10 17:30:34 UTC (rev 208544)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp	2016-11-10 18:04:03 UTC (rev 208545)
@@ -618,13 +618,19 @@
     }
 
     Locker<Lock> locker(m_referencedIndexLock);
+
+    Vector<uint64_t> identifiersToRemove;
     for (auto& iterator : m_deletedIndexes) {
         if (m_info.hasIndex(iterator.key)) {
             auto name = iterator.value->info().name();
             m_referencedIndexes.set(name, WTFMove(iterator.value));
+            identifiersToRemove.append(iterator.key);
         }
     }
 
+    for (auto identifier : identifiersToRemove)
+        m_deletedIndexes.remove(identifier);
+
     for (auto& index : m_referencedIndexes.values())
         index->rollbackInfoForVersionChangeAbort();
 }

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp (208544 => 208545)


--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp	2016-11-10 17:30:34 UTC (rev 208544)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.cpp	2016-11-10 18:04:03 UTC (rev 208545)
@@ -226,13 +226,18 @@
         Locker<Lock> locker(m_referencedObjectStoreLock);
 
         auto& info = m_database->info();
+        Vector<uint64_t> identifiersToRemove;
         for (auto& iterator : m_deletedObjectStores) {
             if (info.infoForExistingObjectStore(iterator.key)) {
                 auto name = iterator.value->info().name();
                 m_referencedObjectStores.set(name, WTFMove(iterator.value));
+                identifiersToRemove.append(iterator.key);
             }
         }
 
+        for (auto identifier : identifiersToRemove)
+            m_deletedObjectStores.remove(identifier);
+
         for (auto& objectStore : m_referencedObjectStores.values())
             objectStore->rollbackForVersionChangeAbort();
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to