Title: [245488] trunk/Source/WebCore
Revision
245488
Author
[email protected]
Date
2019-05-17 16:44:23 -0700 (Fri, 17 May 2019)

Log Message

ASSERTION FAILED: !m_backingStore in WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore(uint64_t)
https://bugs.webkit.org/show_bug.cgi?id=197741
<rdar://problem/50625006>

Reviewed by Youenn Fablet.

If an open request is made before a delete request, open task should be performed before delete task on the
database thread. After r242911, open request needs to wait decision of StorageQuotaManager before posting task
to database thread, while delete request needs not. This makes deletion happen before open.

We need to make sure tasks are in correct order by not starting next open or delete request when database is in
the middle of open or deletion.

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

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (245487 => 245488)


--- trunk/Source/WebCore/ChangeLog	2019-05-17 23:41:47 UTC (rev 245487)
+++ trunk/Source/WebCore/ChangeLog	2019-05-17 23:44:23 UTC (rev 245488)
@@ -1,3 +1,22 @@
+2019-05-17  Sihui Liu  <[email protected]>
+
+        ASSERTION FAILED: !m_backingStore in WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore(uint64_t)
+        https://bugs.webkit.org/show_bug.cgi?id=197741
+        <rdar://problem/50625006>
+
+        Reviewed by Youenn Fablet.
+
+        If an open request is made before a delete request, open task should be performed before delete task on the
+        database thread. After r242911, open request needs to wait decision of StorageQuotaManager before posting task
+        to database thread, while delete request needs not. This makes deletion happen before open.
+
+        We need to make sure tasks are in correct order by not starting next open or delete request when database is in 
+        the middle of open or deletion.
+
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
+        (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
+
 2019-05-17  Antoine Quint  <[email protected]>
 
         Add a website policy to disable the legacy -webkit-overflow-scrolling:touch behavior

Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (245487 => 245488)


--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp	2019-05-17 23:41:47 UTC (rev 245487)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp	2019-05-17 23:44:23 UTC (rev 245488)
@@ -228,6 +228,7 @@
                     auto result = IDBResultData::error(m_currentOpenDBRequest->requestData().requestIdentifier(), IDBError { QuotaExceededError, quotaErrorMessageName("openDatabase") });
                     m_currentOpenDBRequest->connection().didOpenDatabase(result);
                     m_currentOpenDBRequest = nullptr;
+                    m_isOpeningBackingStore = false;
                     break;
                 }
                 case StorageQuotaManager::Decision::Grant:
@@ -460,7 +461,7 @@
     LOG(IndexedDB, "(main) UniqueIDBDatabase::handleDatabaseOperations - There are %u pending", m_pendingOpenDBRequests.size());
     ASSERT(!m_hardClosedForUserDelete);
 
-    if (m_deleteBackingStoreInProgress)
+    if (m_deleteBackingStoreInProgress || m_isOpeningBackingStore)
         return;
 
     clearStalePendingOpenDBRequests();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to