Title: [194252] trunk
- Revision
- 194252
- Author
- [email protected]
- Date
- 2015-12-17 17:30:12 -0800 (Thu, 17 Dec 2015)
Log Message
Modern IDB: Refactor when opening the backing store takes place.
https://bugs.webkit.org/show_bug.cgi?id=152405
Reviewed by Alex Christensen.
Source/WebCore:
No new tests (At least one failing test now passes).
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
from here to performCurrentOpenOperation.
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
not open yet, kick off opening it here.
(WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
LayoutTests:
* platform/mac-wk1/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (194251 => 194252)
--- trunk/LayoutTests/ChangeLog 2015-12-18 01:09:13 UTC (rev 194251)
+++ trunk/LayoutTests/ChangeLog 2015-12-18 01:30:12 UTC (rev 194252)
@@ -1,3 +1,12 @@
+2015-12-17 Brady Eidson <[email protected]>
+
+ Modern IDB: Refactor when opening the backing store takes place.
+ https://bugs.webkit.org/show_bug.cgi?id=152405
+
+ Reviewed by Alex Christensen.
+
+ * platform/mac-wk1/TestExpectations:
+
2015-12-17 Joseph Pecoraro <[email protected]>
Provide a way to distinguish a nested lexical block from a function's lexical block
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (194251 => 194252)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-18 01:09:13 UTC (rev 194251)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-18 01:30:12 UTC (rev 194252)
@@ -99,7 +99,6 @@
storage/indexeddb/intversion-two-opens-no-versions.html [ Failure ]
storage/indexeddb/odd-strings.html [ Failure ]
storage/indexeddb/open-db-private-browsing.html [ Failure ]
-storage/indexeddb/open-ordering.html [ Failure ]
storage/indexeddb/properties-disabled-at-runtime.html [ Failure ]
storage/indexeddb/setversion-blocked-by-versionchange-close.html [ Failure ]
storage/indexeddb/transaction-basics.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (194251 => 194252)
--- trunk/Source/WebCore/ChangeLog 2015-12-18 01:09:13 UTC (rev 194251)
+++ trunk/Source/WebCore/ChangeLog 2015-12-18 01:30:12 UTC (rev 194252)
@@ -1,3 +1,19 @@
+2015-12-17 Brady Eidson <[email protected]>
+
+ Modern IDB: Refactor when opening the backing store takes place.
+ https://bugs.webkit.org/show_bug.cgi?id=152405
+
+ Reviewed by Alex Christensen.
+
+ No new tests (At least one failing test now passes).
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Move the "open backing store" logic
+ from here to performCurrentOpenOperation.
+ (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation): If the database backing store is
+ not open yet, kick off opening it here.
+ (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations): Rework this stuff to be better.
+
2015-12-16 Simon Fraser <[email protected]>
ViewportConfiguration functions should return a bool to say if anything changed
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (194251 => 194252)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-12-18 01:09:13 UTC (rev 194251)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-12-18 01:30:12 UTC (rev 194252)
@@ -75,13 +75,7 @@
if (m_isOpeningBackingStore)
return;
- if (m_databaseInfo) {
- handleDatabaseOperations();
- return;
- }
-
- m_isOpeningBackingStore = true;
- m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::openBackingStore, m_identifier));
+ handleDatabaseOperations();
}
bool UniqueIDBDatabase::hasAnyPendingCallbacks() const
@@ -109,6 +103,12 @@
ASSERT(m_currentOperation);
ASSERT(m_currentOperation->isOpenRequest());
+ if (!m_databaseInfo) {
+ m_isOpeningBackingStore = true;
+ m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::openBackingStore, m_identifier));
+ return;
+ }
+
// If we previously started a version change operation but were blocked by having open connections,
// we might now be unblocked.
if (m_versionChangeDatabaseConnection) {
@@ -206,18 +206,24 @@
ASSERT(isMainThread());
LOG(IndexedDB, "(main) UniqueIDBDatabase::handleDatabaseOperations - There are %zu pending", m_pendingDatabaseOperations.size());
- if (m_pendingDatabaseOperations.isEmpty())
- return;
-
if (m_versionChangeDatabaseConnection || m_currentOperation) {
// We can't start the next database operation quite yet, but we might need to notify all open connections
// about a pending delete.
- if (m_pendingDatabaseOperations.first()->isDeleteRequest() && !m_hasNotifiedConnectionsOfDelete) {
+ if (!m_pendingDatabaseOperations.isEmpty() && m_pendingDatabaseOperations.first()->isDeleteRequest() && !m_hasNotifiedConnectionsOfDelete) {
m_hasNotifiedConnectionsOfDelete = true;
notifyConnectionsOfVersionChange(0);
}
+
+ // Some operations (such as the first open operation after a delete) require multiple passes to completely handle
+ if (m_currentOperation)
+ handleCurrentOperation();
+
+ return;
}
+ if (m_pendingDatabaseOperations.isEmpty())
+ return;
+
m_currentOperation = m_pendingDatabaseOperations.takeFirst();
LOG(IndexedDB, "UniqueIDBDatabase::handleDatabaseOperations - Popped an operation, now there are %zu pending", m_pendingDatabaseOperations.size());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes