- Revision
- 192748
- Author
- beid...@apple.com
- Date
- 2015-11-23 11:41:05 -0800 (Mon, 23 Nov 2015)
Log Message
Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
https://bugs.webkit.org/show_bug.cgi?id=151557
Reviewed by Alex Christensen.
Source/WebCore:
No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).
- Reworking some invalid ASSERTS
- Actually opening pending open-database-requests after a version change transaction completes
- Allow starting new transactions when the version change transaction has *started* finishing,
but before it finishes finishing.
* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::transaction):
* Modules/indexeddb/client/IDBTransactionImpl.h:
* Modules/indexeddb/server/MemoryObjectStore.cpp:
(WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
* Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
(WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.
* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
* Modules/indexeddb/server/UniqueIDBDatabase.h:
LayoutTests:
* platform/mac-wk1/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (192747 => 192748)
--- trunk/LayoutTests/ChangeLog 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/LayoutTests/ChangeLog 2015-11-23 19:41:05 UTC (rev 192748)
@@ -1,3 +1,12 @@
+2015-11-23 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
+ https://bugs.webkit.org/show_bug.cgi?id=151557
+
+ Reviewed by Alex Christensen.
+
+ * platform/mac-wk1/TestExpectations:
+
2015-11-17 Sergio Villar Senin <svil...@igalia.com>
ASSERTION FAILED: freeSpace >= 0 in WebCore::RenderGrid::computeTrackSizesForDirection
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (192747 => 192748)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2015-11-23 19:41:05 UTC (rev 192748)
@@ -72,6 +72,7 @@
# But Modern IndexedDB is.
storage/indexeddb/modern [ Pass ]
+storage/indexeddb/mozilla/global-data.html [ Pass ]
# Fails with WebKit1 only.
editing/secure-input/reset-state-on-navigation.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (192747 => 192748)
--- trunk/Source/WebCore/ChangeLog 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/Source/WebCore/ChangeLog 2015-11-23 19:41:05 UTC (rev 192748)
@@ -1,3 +1,34 @@
+2015-11-23 Brady Eidson <beid...@apple.com>
+
+ Modern IDB: Unskip storage/indexeddb/mozilla/global-data.html.
+ https://bugs.webkit.org/show_bug.cgi?id=151557
+
+ Reviewed by Alex Christensen.
+
+ No new tests (Unskipping existing test storage/indexeddb/mozilla/global-data.html).
+
+ - Reworking some invalid ASSERTS
+ - Actually opening pending open-database-requests after a version change transaction completes
+ - Allow starting new transactions when the version change transaction has *started* finishing,
+ but before it finishes finishing.
+
+ * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
+ (WebCore::IDBClient::IDBDatabase::transaction):
+
+ * Modules/indexeddb/client/IDBTransactionImpl.h:
+
+ * Modules/indexeddb/server/MemoryObjectStore.cpp:
+ (WebCore::IDBServer::MemoryObjectStore::~MemoryObjectStore):
+
+ * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
+ (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded): Deleted.
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::UniqueIDBDatabase):
+ (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
+ (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
+ * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
2015-11-23 Youenn Fablet <youenn.fab...@crf.canon.fr>
Remove DOMPromiseWithCallback
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp (192747 => 192748)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp 2015-11-23 19:41:05 UTC (rev 192748)
@@ -156,7 +156,7 @@
return nullptr;
}
- if (m_versionChangeTransaction) {
+ if (m_versionChangeTransaction && !m_versionChangeTransaction->isFinishedOrFinishing()) {
ec = INVALID_STATE_ERR;
return nullptr;
}
Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h (192747 => 192748)
--- trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h 2015-11-23 19:41:05 UTC (rev 192748)
@@ -123,11 +123,11 @@
void operationDidComplete(TransactionOperation&);
+ bool isFinishedOrFinishing() const;
+
private:
IDBTransaction(IDBDatabase&, const IDBTransactionInfo&, IDBOpenDBRequest*);
- bool isFinishedOrFinishing() const;
-
void commit();
void finishAbortOrCommit();
Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp (192747 => 192748)
--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStore.cpp 2015-11-23 19:41:05 UTC (rev 192748)
@@ -55,7 +55,7 @@
MemoryObjectStore::~MemoryObjectStore()
{
- ASSERT(!m_writeTransaction);
+ m_writeTransaction = nullptr;
}
MemoryIndex* MemoryObjectStore::indexForIdentifier(uint64_t identifier)
Modified: trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp (192747 => 192748)
--- trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/Source/WebCore/Modules/indexeddb/server/MemoryObjectStoreCursor.cpp 2015-11-23 19:41:05 UTC (rev 192748)
@@ -62,8 +62,6 @@
void MemoryObjectStoreCursor::keyAdded(std::set<IDBKeyData>::iterator iterator)
{
- ASSERT(m_currentPositionKey.isValid());
-
if (hasIterators())
return;
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (192747 => 192748)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2015-11-23 19:41:05 UTC (rev 192748)
@@ -45,6 +45,7 @@
: m_server(server)
, m_identifier(identifier)
, m_deleteOrRunTransactionsTimer(*this, &UniqueIDBDatabase::deleteOrRunTransactionsTimerFired)
+ , m_handleOpenDatabaseOperationsTimer(*this, &UniqueIDBDatabase::handleOpenDatabaseOperations)
{
}
@@ -115,6 +116,9 @@
if (m_versionChangeDatabaseConnection)
return;
+ if (m_pendingOpenDatabaseOperations.isEmpty())
+ return;
+
auto operation = m_pendingOpenDatabaseOperations.takeFirst();
// 3.3.1 Opening a database
@@ -713,6 +717,9 @@
m_databaseInfo->setVersion(transaction.info().newVersion());
m_versionChangeTransaction = nullptr;
m_versionChangeDatabaseConnection = nullptr;
+
+ if (!m_handleOpenDatabaseOperationsTimer.isActive())
+ m_handleOpenDatabaseOperationsTimer.startOneShot(0);
}
uint64_t callbackID = storeCallback(callback);
Modified: trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (192747 => 192748)
--- trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2015-11-23 18:39:16 UTC (rev 192747)
+++ trunk/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2015-11-23 19:41:05 UTC (rev 192748)
@@ -186,6 +186,7 @@
HashMap<uint64_t, CountCallback> m_countCallbacks;
Timer m_deleteOrRunTransactionsTimer;
+ Timer m_handleOpenDatabaseOperationsTimer;
Deque<RefPtr<UniqueIDBDatabaseTransaction>> m_pendingTransactions;
HashMap<IDBResourceIdentifier, RefPtr<UniqueIDBDatabaseTransaction>> m_inProgressTransactions;