Title: [196021] trunk
Revision
196021
Author
beid...@apple.com
Date
2016-02-02 11:27:20 -0800 (Tue, 02 Feb 2016)

Log Message

Modern IDB: storage/indexeddb/dont-wedge.html sometimes ASSERTs.
https://bugs.webkit.org/show_bug.cgi?id=153790

Reviewed by Tim Horton.

Source/WebCore:

No new tests (Failing test now unskipped).

This test uncovered an unhandled race where the main thread tried to perform an OpenDB operation
multiple times while it was already in-progress on the server thread.

There was already a flag meant to cover this race, and it just needed to be applied to one more site.

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

LayoutTests:

* platform/mac-wk1/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (196020 => 196021)


--- trunk/LayoutTests/ChangeLog	2016-02-02 19:10:54 UTC (rev 196020)
+++ trunk/LayoutTests/ChangeLog	2016-02-02 19:27:20 UTC (rev 196021)
@@ -1,3 +1,12 @@
+2016-02-02  Brady Eidson  <beid...@apple.com>
+
+        Modern IDB: storage/indexeddb/dont-wedge.html sometimes ASSERTs.
+        https://bugs.webkit.org/show_bug.cgi?id=153790
+
+        Reviewed by Tim Horton.
+
+        * platform/mac-wk1/TestExpectations:
+
 2016-02-02  Zalan Bujtas  <za...@apple.com>
 
         [Win] gardening after r195740.

Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (196020 => 196021)


--- trunk/LayoutTests/platform/mac-wk1/TestExpectations	2016-02-02 19:10:54 UTC (rev 196020)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations	2016-02-02 19:27:20 UTC (rev 196021)
@@ -270,8 +270,5 @@
 storage/indexeddb/prefetch-invalidation.html [ Skip ]
 storage/indexeddb/transaction-coordination-within-database.html [ Skip ]
 
-# SQLite backend tests that crash or ASSERT
-storage/indexeddb/dont-wedge.html [ Skip ]
-
 ### END OF (3) IndexedDB failures with SQLite
 ########################################

Modified: trunk/Source/WebCore/ChangeLog (196020 => 196021)


--- trunk/Source/WebCore/ChangeLog	2016-02-02 19:10:54 UTC (rev 196020)
+++ trunk/Source/WebCore/ChangeLog	2016-02-02 19:27:20 UTC (rev 196021)
@@ -1,3 +1,21 @@
+2016-02-02  Brady Eidson  <beid...@apple.com>
+
+        Modern IDB: storage/indexeddb/dont-wedge.html sometimes ASSERTs.
+        https://bugs.webkit.org/show_bug.cgi?id=153790
+
+        Reviewed by Tim Horton.
+
+        No new tests (Failing test now unskipped).
+
+        This test uncovered an unhandled race where the main thread tried to perform an OpenDB operation 
+        multiple times while it was already in-progress on the server thread.
+
+        There was already a flag meant to cover this race, and it just needed to be applied to one more site.
+        
+        * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+        (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
+        (WebCore::IDBServer::UniqueIDBDatabase::openBackingStore):
+
 2016-02-02  Daniel Bates  <daba...@apple.com>
 
         CSP: Support checking content security policy without a script execution context

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


--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp	2016-02-02 19:10:54 UTC (rev 196020)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp	2016-02-02 19:27:20 UTC (rev 196021)
@@ -99,14 +99,17 @@
 
 void UniqueIDBDatabase::performCurrentOpenOperation()
 {
-    LOG(IndexedDB, "(main) UniqueIDBDatabase::performCurrentOpenOperation");
+    LOG(IndexedDB, "(main) UniqueIDBDatabase::performCurrentOpenOperation (%p)", this);
 
     ASSERT(m_currentOpenDBRequest);
     ASSERT(m_currentOpenDBRequest->isOpenRequest());
 
     if (!m_databaseInfo) {
-        m_isOpeningBackingStore = true;
-        m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::openBackingStore, m_identifier));
+        if (!m_isOpeningBackingStore) {
+            m_isOpeningBackingStore = true;
+            m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::openBackingStore, m_identifier));
+        }
+
         return;
     }
 
@@ -444,7 +447,7 @@
 void UniqueIDBDatabase::openBackingStore(const IDBDatabaseIdentifier& identifier)
 {
     ASSERT(!isMainThread());
-    LOG(IndexedDB, "(db) UniqueIDBDatabase::openBackingStore");
+    LOG(IndexedDB, "(db) UniqueIDBDatabase::openBackingStore (%p)", this);
 
     ASSERT(!m_backingStore);
     m_backingStore = m_server.createBackingStore(identifier);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to