Fix an assertion in UniqueIDBDatabase
authorsihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jan 2019 21:57:46 +0000 (21:57 +0000)
committersihui_liu@apple.com <sihui_liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jan 2019 21:57:46 +0000 (21:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193096

Reviewed by Brady Eidson.

m_objectStoreTransactionCounts.count(objectStore) == 1 in UniqueIDBDatabase::operationAndTransactionTimerFired()
is not necessarily true because m_objectStoreTransactionCounts may be cleared in immediateCloseForUserDelete.

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239872 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp

index f7f3313..a3347dc 100644 (file)
@@ -1,3 +1,16 @@
+2019-01-11  Sihui Liu  <sihui_liu@apple.com>
+
+        Fix an assertion in UniqueIDBDatabase
+        https://bugs.webkit.org/show_bug.cgi?id=193096
+
+        Reviewed by Brady Eidson.
+
+        m_objectStoreTransactionCounts.count(objectStore) == 1 in UniqueIDBDatabase::operationAndTransactionTimerFired()
+        is not necessarily true because m_objectStoreTransactionCounts may be cleared in immediateCloseForUserDelete.
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
+
 2019-01-11  Miguel Gomez  <magomez@igalia.com>
 
         [GTK] Garbled rendering on Youtube while scrolling under X11.
index fecc799..7ce94ba 100644 (file)
@@ -1573,7 +1573,7 @@ void UniqueIDBDatabase::operationAndTransactionTimerFired()
             m_objectStoreTransactionCounts.add(objectStore);
             if (!transaction->isReadOnly()) {
                 m_objectStoreWriteTransactions.add(objectStore);
-                ASSERT(m_objectStoreTransactionCounts.count(objectStore) == 1);
+                ASSERT(m_objectStoreTransactionCounts.count(objectStore) == 1 || m_hardClosedForUserDelete);
             }
         }