Title: [193786] trunk
- Revision
- 193786
- Author
- beid...@apple.com
- Date
- 2015-12-08 15:02:58 -0800 (Tue, 08 Dec 2015)
Log Message
Modern IDB: Fire blocked events for delete requests that are blocked.
https://bugs.webkit.org/show_bug.cgi?id=152015
Reviewed by Alex Christensen.
Source/WebCore:
No new tests (Previous failing tests now pass, and previously timing-out tests now complete).
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
(WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
LayoutTests:
* platform/mac-wk1/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (193785 => 193786)
--- trunk/LayoutTests/ChangeLog 2015-12-08 22:18:40 UTC (rev 193785)
+++ trunk/LayoutTests/ChangeLog 2015-12-08 23:02:58 UTC (rev 193786)
@@ -1,5 +1,14 @@
2015-12-08 Brady Eidson <beid...@apple.com>
+ Modern IDB: Fire blocked events for delete requests that are blocked.
+ https://bugs.webkit.org/show_bug.cgi?id=152015
+
+ Reviewed by Alex Christensen.
+
+ * platform/mac-wk1/TestExpectations:
+
+2015-12-08 Brady Eidson <beid...@apple.com>
+
More IDB TestExpectations gardening.
Reviewed by Alex Christensen.
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (193785 => 193786)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-08 22:18:40 UTC (rev 193785)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-12-08 23:02:58 UTC (rev 193786)
@@ -63,6 +63,7 @@
# IDB tests that crash
storage/indexeddb/database-quota.html [ Skip ]
storage/indexeddb/deleted-objects.html [ Skip ]
+storage/indexeddb/deletedatabase-delayed-by-versionchange.html [ Skip ]
storage/indexeddb/dont-wedge.html [ Skip ]
storage/indexeddb/index-multientry.html [ Skip ]
storage/indexeddb/intversion-long-queue.html [ Skip ]
@@ -83,9 +84,6 @@
storage/indexeddb/key-generator.html [ Skip ]
# IDB tests that timeout
-storage/indexeddb/database-closepending-flag.html [ Skip ]
-storage/indexeddb/deletedatabase-blocked.html [ Skip ]
-storage/indexeddb/deletedatabase-delayed-by-versionchange.html [ Skip ]
storage/indexeddb/intversion-pending-version-changes-ascending.html [ Skip ]
storage/indexeddb/odd-strings.html [ Skip ]
storage/indexeddb/transaction-basics.html [ Skip ]
@@ -95,12 +93,10 @@
# IDB tests with text failures
storage/indexeddb/createIndex-after-failure.html [ Failure ]
storage/indexeddb/cursor-continue.html [ Failure ]
+storage/indexeddb/database-closepending-flag.html [ Failure ]
storage/indexeddb/database-deletepending-flag.html [ Failure ]
storage/indexeddb/delete-closed-database-object.html [ Failure ]
-storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html [ Failure ]
storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html [ Failure ]
-storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html [ Failure ]
-storage/indexeddb/deletedatabase-not-blocked.html [ Failure ]
storage/indexeddb/factory-cmp.html [ Failure ]
storage/indexeddb/index-basics.html [ Failure ]
storage/indexeddb/index-count.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (193785 => 193786)
--- trunk/Source/WebCore/ChangeLog 2015-12-08 22:18:40 UTC (rev 193785)
+++ trunk/Source/WebCore/ChangeLog 2015-12-08 23:02:58 UTC (rev 193786)
@@ -1,5 +1,20 @@
2015-12-08 Brady Eidson <beid...@apple.com>
+ Modern IDB: Fire blocked events for delete requests that are blocked.
+ https://bugs.webkit.org/show_bug.cgi?id=152015
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Previous failing tests now pass, and previously timing-out tests now complete).
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
+ (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
+ (WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
+ * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+2015-12-08 Brady Eidson <beid...@apple.com>
+
Modern IDB: Fire blocked events for upgrade requests that are blocked.
https://bugs.webkit.org/show_bug.cgi?id=152007
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (193785 => 193786)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-12-08 22:18:40 UTC (rev 193785)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-12-08 23:02:58 UTC (rev 193786)
@@ -84,7 +84,7 @@
|| !m_countCallbacks.isEmpty();
}
-bool UniqueIDBDatabase::maybeDeleteDatabase()
+bool UniqueIDBDatabase::maybeDeleteDatabase(IDBServerOperation* newestDeleteOperation)
{
ASSERT(isMainThread());
LOG(IndexedDB, "(main) UniqueIDBDatabase::maybeDeleteDatabase");
@@ -95,6 +95,10 @@
notifyConnectionsOfVersionChange(0);
m_hasNotifiedConnectionsOfDelete = true;
}
+
+ if (newestDeleteOperation)
+ newestDeleteOperation->connection().notifyOpenDBRequestBlocked(newestDeleteOperation->requestData().requestIdentifier(), m_databaseInfo->version(), 0);
+
return false;
}
@@ -224,6 +228,7 @@
LOG(IndexedDB, "(main) UniqueIDBDatabase::handleDelete");
auto operation = IDBServerOperation::create(connection, requestData);
+ auto* rawOperation = &operation.get();
m_pendingDeleteDatabaseOperations.append(WTF::move(operation));
// If a different request has already come in to delete this database, there's nothing left to do.
@@ -233,7 +238,7 @@
m_deletePending = true;
- maybeDeleteDatabase();
+ maybeDeleteDatabase(rawOperation);
}
void UniqueIDBDatabase::startVersionChangeTransaction()
@@ -904,7 +909,7 @@
{
LOG(IndexedDB, "(main) UniqueIDBDatabase::deleteOrRunTransactionsTimerFired");
- if (m_deletePending && maybeDeleteDatabase())
+ if (m_deletePending && maybeDeleteDatabase(nullptr))
return;
// If the database was not deleted in the previous step, try to run a transaction now.
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (193785 => 193786)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2015-12-08 22:18:40 UTC (rev 193785)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2015-12-08 23:02:58 UTC (rev 193786)
@@ -106,7 +106,7 @@
void handleOpenDatabaseOperations();
void addOpenDatabaseConnection(Ref<UniqueIDBDatabaseConnection>&&);
- bool maybeDeleteDatabase();
+ bool maybeDeleteDatabase(IDBServerOperation*);
bool hasAnyOpenConnections() const;
void startVersionChangeTransaction();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes