Diff
Modified: trunk/LayoutTests/ChangeLog (194487 => 194488)
--- trunk/LayoutTests/ChangeLog 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/LayoutTests/ChangeLog 2016-01-02 05:48:58 UTC (rev 194488)
@@ -1,3 +1,12 @@
+2016-01-01 Brady Eidson <[email protected]>
+
+ Modern IDB: storage/indexeddb/database-deletepending-flag.html fails.
+ https://bugs.webkit.org/show_bug.cgi?id=152600
+
+ Reviewed by Alex Christensen.
+
+ * platform/mac-wk1/TestExpectations:
+
2016-01-01 Simon Fraser <[email protected]>
Fix reload and programmatic scrolling in RTL documents
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (194487 => 194488)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2016-01-02 05:48:58 UTC (rev 194488)
@@ -69,8 +69,6 @@
inspector/indexeddb
# IDB tests that crash
-storage/indexeddb/deletedatabase-delayed-by-versionchange.html [ Skip ]
-storage/indexeddb/intversion-long-queue.html [ Skip ]
storage/indexeddb/lazy-index-population.html [ Skip ]
storage/indexeddb/structured-clone.html [ Skip ]
@@ -90,11 +88,12 @@
# IDB tests that timeout
storage/indexeddb/database-quota.html [ Skip ]
+storage/indexeddb/deletedatabase-delayed-by-versionchange.html [ Skip ]
storage/indexeddb/dont-wedge.html [ Skip ]
+storage/indexeddb/intversion-long-queue.html [ Skip ]
storage/indexeddb/transaction-starvation.html [ Skip ]
# IDB tests with text failures
-storage/indexeddb/database-deletepending-flag.html [ Failure ]
storage/indexeddb/intversion-gated-on-delete.html [ Failure ]
storage/indexeddb/odd-strings.html [ Failure ]
storage/indexeddb/open-db-private-browsing.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (194487 => 194488)
--- trunk/Source/WebCore/ChangeLog 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/Source/WebCore/ChangeLog 2016-01-02 05:48:58 UTC (rev 194488)
@@ -1,3 +1,24 @@
+2016-01-01 Brady Eidson <[email protected]>
+
+ Modern IDB: storage/indexeddb/database-deletepending-flag.html fails.
+ https://bugs.webkit.org/show_bug.cgi?id=152600
+
+ Reviewed by Alex Christensen.
+
+ No new tests (At least one failing test now passes, and at least 2 crashing tests now timeout).
+
+ * Modules/indexeddb/server/IDBBackingStore.h:
+
+ * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
+ (WebCore::IDBServer::MemoryIDBBackingStore::deleteBackingStore):
+ * Modules/indexeddb/server/MemoryIDBBackingStore.h:
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
+ (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore):
+ (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
+ * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
2016-01-01 Simon Fraser <[email protected]>
Fix reload and programmatic scrolling in RTL documents
Modified: trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h (194487 => 194488)
--- trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IDBBackingStore.h 2016-01-02 05:48:58 UTC (rev 194488)
@@ -75,6 +75,8 @@
virtual IDBError maybeUpdateKeyGeneratorNumber(const IDBResourceIdentifier& transactionIdentifier, uint64_t objectStoreIdentifier, double newKeyNumber) = 0;
virtual IDBError openCursor(const IDBResourceIdentifier& transactionIdentifier, const IDBCursorInfo&, IDBGetResult& outResult) = 0;
virtual IDBError iterateCursor(const IDBResourceIdentifier& transactionIdentifier, const IDBResourceIdentifier& cursorIdentifier, const IDBKeyData&, uint32_t count, IDBGetResult& outResult) = 0;
+
+ virtual void deleteBackingStore() = 0;
};
} // namespace IDBServer
Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp (194487 => 194488)
--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.cpp 2016-01-02 05:48:58 UTC (rev 194488)
@@ -459,6 +459,11 @@
return objectStore;
}
+void MemoryIDBBackingStore::deleteBackingStore()
+{
+ // The in-memory IDB backing store doesn't need to do any cleanup when it is deleted.
+}
+
} // namespace IDBServer
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h (194487 => 194488)
--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryIDBBackingStore.h 2016-01-02 05:48:58 UTC (rev 194488)
@@ -68,6 +68,8 @@
virtual IDBError openCursor(const IDBResourceIdentifier& transactionIdentifier, const IDBCursorInfo&, IDBGetResult& outResult) override final;
virtual IDBError iterateCursor(const IDBResourceIdentifier& transactionIdentifier, const IDBResourceIdentifier& cursorIdentifier, const IDBKeyData&, uint32_t count, IDBGetResult& outResult) override final;
+ virtual void deleteBackingStore() override final;
+
void removeObjectStoreForVersionChangeAbort(MemoryObjectStore&);
void restoreObjectStoreForVersionChangeAbort(std::unique_ptr<MemoryObjectStore>&&);
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (194487 => 194488)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2016-01-02 05:48:58 UTC (rev 194488)
@@ -163,12 +163,16 @@
void UniqueIDBDatabase::performCurrentDeleteOperation()
{
+ ASSERT(isMainThread());
LOG(IndexedDB, "(main) UniqueIDBDatabase::performCurrentDeleteOperation");
ASSERT(m_databaseInfo);
ASSERT(m_currentOpenDBRequest);
ASSERT(m_currentOpenDBRequest->isDeleteRequest());
+ if (m_deleteBackingStoreInProgress)
+ return;
+
if (hasAnyOpenConnections()) {
maybeNotifyConnectionsOfVersionChange();
return;
@@ -179,9 +183,41 @@
ASSERT(m_pendingTransactions.isEmpty());
ASSERT(m_openDatabaseConnections.isEmpty());
+ m_deleteBackingStoreInProgress = true;
+ m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::deleteBackingStore));
+}
+
+void UniqueIDBDatabase::deleteBackingStore()
+{
+ ASSERT(!isMainThread());
+ LOG(IndexedDB, "(db) UniqueIDBDatabase::deleteBackingStore");
+
+ if (m_backingStore) {
+ m_backingStore->deleteBackingStore();
+ m_backingStore = nullptr;
+ }
+
+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didDeleteBackingStore));
+}
+
+void UniqueIDBDatabase::didDeleteBackingStore()
+{
+ ASSERT(isMainThread());
+ LOG(IndexedDB, "(main) UniqueIDBDatabase::didDeleteBackingStore");
+
+ ASSERT(m_databaseInfo);
+ ASSERT(m_currentOpenDBRequest);
+ ASSERT(m_currentOpenDBRequest->isDeleteRequest());
+ ASSERT(!hasAnyPendingCallbacks());
+ ASSERT(m_inProgressTransactions.isEmpty());
+ ASSERT(m_pendingTransactions.isEmpty());
+ ASSERT(m_openDatabaseConnections.isEmpty());
+
m_currentOpenDBRequest->notifyDidDeleteDatabase(*m_databaseInfo);
m_currentOpenDBRequest = nullptr;
+ m_databaseInfo = nullptr;
m_deletePending = false;
+ m_deleteBackingStoreInProgress = false;
if (m_pendingOpenDBRequests.isEmpty())
m_server.deleteUniqueIDBDatabase(*this);
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (194487 => 194488)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2016-01-02 04:45:36 UTC (rev 194487)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2016-01-02 05:48:58 UTC (rev 194488)
@@ -124,6 +124,7 @@
void inProgressTransactionCompleted(const IDBResourceIdentifier&);
// Database thread operations
+ void deleteBackingStore();
void openBackingStore(const IDBDatabaseIdentifier&);
void performCommitTransaction(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier);
void performAbortTransaction(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier);
@@ -143,6 +144,7 @@
void performActivateTransactionInBackingStore(uint64_t callbackIdentifier, const IDBTransactionInfo&);
// Main thread callbacks
+ void didDeleteBackingStore();
void didOpenBackingStore(const IDBDatabaseInfo&);
void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&, const IDBObjectStoreInfo&);
void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&, const String& objectStoreName);
@@ -208,6 +210,7 @@
HashCountedSet<uint64_t> m_objectStoreTransactionCounts;
bool m_deletePending { false };
+ bool m_deleteBackingStoreInProgress { false };
};
} // namespace IDBServer