IDB: storage/indexeddb/mozilla/object-store-remove-values.html fails
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Feb 2014 22:15:37 +0000 (22:15 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 10 Feb 2014 22:15:37 +0000 (22:15 +0000)
commit7da854ef6e6dfa18942c81d308e3749607988977
treea7bc13413c282cfa984436725ebb98e75ae698fa
parent7c81a93a91605fbd7ca619b127bc66bb949f7822
IDB: storage/indexeddb/mozilla/object-store-remove-values.html fails
<rdar://problem/16029319> and https://bugs.webkit.org/show_bug.cgi?id=128487

Reviewed by Tim Horton.

Source/WebKit2:

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess):
(WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata): Update logging.
(WebKit::DatabaseProcessIDBConnection::deleteDatabase): If deleteDatabase succeeds,
  also disconnect from the UniqueIDBDatabase so it can be cleaned up properly.
(WebKit::DatabaseProcessIDBConnection::close): New message from the WebProcess to handle
  clean closures.
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::shutdown): Move most of the cleanup to didShutdownBackingStore.
(WebKit::UniqueIDBDatabase::didShutdownBackingStore): Execute all remaining mainThreadTasks
  (as they represent real results from the backing store thread).
(WebKit::UniqueIDBDatabase::deleteDatabase): Add an ASSERT.
(WebKit::UniqueIDBDatabase::performNextMainThreadTask): Call through to performNextMainThreadTaskWithoutAdoptRef.
(WebKit::UniqueIDBDatabase::performNextMainThreadTaskWithoutAdoptRef): Execute a task,
  returning true if there are more tasks left to execute.
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite): Properly
  handle JSC cleanup.

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::close): Implement this.

LayoutTests:

* platform/mac-wk2/TestExpectations: Add the now-passing test (skipped because of
  unrelated flakiness in IDB tests)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp
Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.h
Source/WebKit2/DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp