Modern IDB: Fire blocked events for upgrade requests that are blocked.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Dec 2015 22:12:34 +0000 (22:12 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Dec 2015 22:12:34 +0000 (22:12 +0000)
commit98ba591a65c86f920d1ab3b7a539ea288ccfcdcf
tree6b3608b4dc719edffee800e6e2f76eccba9f20ca
parent123fea3617332377d40b5f82f123594f138e2dcd
Modern IDB: Fire blocked events for upgrade requests that are blocked.
https://bugs.webkit.org/show_bug.cgi?id=152007

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/blocked-open-db-requests.html
      And some that used to fail now pass.
      And some that used to timeout now complete.

* Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::notifyOpenDBRequestBlocked):
* Modules/indexeddb/client/IDBConnectionToServer.h:

* Modules/indexeddb/client/IDBDatabaseImpl.cpp:
(WebCore::IDBClient::IDBDatabase::IDBDatabase):

* Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
(WebCore::IDBClient::IDBOpenDBRequest::requestBlocked):
* Modules/indexeddb/client/IDBOpenDBRequestImpl.h:

* Modules/indexeddb/client/IDBRequestImpl.cpp:
(WebCore::IDBClient::IDBRequest::dispatchEvent):

* Modules/indexeddb/server/IDBConnectionToClient.cpp:
(WebCore::IDBServer::IDBConnectionToClient::notifyOpenDBRequestBlocked):
* Modules/indexeddb/server/IDBConnectionToClient.h:
* Modules/indexeddb/server/IDBConnectionToClientDelegate.h:

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): When a request that would
  result in a version change transaction is blocked by open connections, notify it.

* Modules/indexeddb/shared/InProcessIDBServer.cpp:
(WebCore::InProcessIDBServer::notifyOpenDBRequestBlocked):
* Modules/indexeddb/shared/InProcessIDBServer.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:

* storage/indexeddb/modern/blocked-open-db-requests-expected.txt: Added.
* storage/indexeddb/modern/blocked-open-db-requests.html: Added.
* storage/indexeddb/modern/resources/blocked-open-db-requests.js: Added.

* storage/indexeddb/modern/deleteobjectstore-1.html: Fix subtly broken test.
* storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@193784 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-wk1/TestExpectations
LayoutTests/storage/indexeddb/modern/blocked-open-db-requests-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/blocked-open-db-requests.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/deleteobjectstore-1.html
LayoutTests/storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures.html
LayoutTests/storage/indexeddb/modern/resources/blocked-open-db-requests.js [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp
Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h
Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h
Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp
Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.cpp
Source/WebCore/Modules/indexeddb/server/IDBConnectionToClient.h
Source/WebCore/Modules/indexeddb/server/IDBConnectionToClientDelegate.h
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp
Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.cpp
Source/WebCore/Modules/indexeddb/shared/InProcessIDBServer.h