storage/indexeddb/closed-cursor-private.html is crashing on debug
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 22:11:41 +0000 (22:11 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 22:11:41 +0000 (22:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196101

Reviewed by Alex Christensen.

In case of immediate close for user delete, the transaction might be deleted.
If the request for space is pending, it will be executed with an error as parameter.
In that case, the call to didCommitTransaction will not find any existing transaction.
Speculative fix, test should no longer crash.

* Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
(WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):

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

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

index 29aa7f1..ac4ee0a 100644 (file)
@@ -1,3 +1,18 @@
+2019-03-22  Youenn Fablet  <youenn@apple.com>
+
+        storage/indexeddb/closed-cursor-private.html is crashing on debug
+        https://bugs.webkit.org/show_bug.cgi?id=196101
+
+        Reviewed by Alex Christensen.
+
+        In case of immediate close for user delete, the transaction might be deleted.
+        If the request for space is pending, it will be executed with an error as parameter.
+        In that case, the call to didCommitTransaction will not find any existing transaction.
+        Speculative fix, test should no longer crash.
+
+        * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
+
 2019-03-22  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Safari Canvas Inspector seems to show the canvas being rendered twice per frame.
index daaac1e..78da822 100644 (file)
@@ -181,7 +181,7 @@ void UniqueIDBDatabaseConnection::didCommitTransaction(UniqueIDBDatabaseTransact
 
     auto transactionIdentifier = transaction.info().identifier();
 
-    ASSERT(m_transactionMap.contains(transactionIdentifier));
+    ASSERT(m_transactionMap.contains(transactionIdentifier) || !error.isNull());
     m_transactionMap.remove(transactionIdentifier);
 
     m_connectionToClient->didCommitTransaction(transactionIdentifier, error);