Modern IDB: After versionchange transactions complete, fire onsuccess on the original...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Nov 2015 03:57:19 +0000 (03:57 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Nov 2015 03:57:19 +0000 (03:57 +0000)
commitb9c4747e51a710cbb17944ace3dbf7e1d434a2d8
tree4d85fc5b262d23d5d20dd4934e5e763b3c2aea83
parente65218c6c3fc6328a2fd6c4b32134715e1f7344e
Modern IDB: After versionchange transactions complete, fire onsuccess on the original IDBOpenDBRequest
https://bugs.webkit.org/show_bug.cgi?id=151522

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/opendatabase-success-after-versionchange.html (And changes to other existing tests)

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

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

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::create):
(WebCore::IDBClient::IDBTransaction::IDBTransaction):
(WebCore::IDBClient::IDBTransaction::dispatchEvent):
* Modules/indexeddb/client/IDBTransactionImpl.h:

LayoutTests:

* storage/indexeddb/modern/deletedatabase-1-expected.txt:
* storage/indexeddb/modern/deletedatabase-1.html:
* storage/indexeddb/modern/deletedatabase-2-expected.txt:
* storage/indexeddb/modern/deletedatabase-2.html:
* storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt: Added.
* storage/indexeddb/modern/opendatabase-success-after-versionchange.html: Added.
* storage/indexeddb/modern/opendatabase-versions-expected.txt:
* storage/indexeddb/modern/opendatabase-versions.html:
* storage/indexeddb/modern/versionchange-event-expected.txt:
* storage/indexeddb/modern/versionchange-event.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/deletedatabase-1-expected.txt
LayoutTests/storage/indexeddb/modern/deletedatabase-1.html
LayoutTests/storage/indexeddb/modern/deletedatabase-2-expected.txt
LayoutTests/storage/indexeddb/modern/deletedatabase-2.html
LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/opendatabase-success-after-versionchange.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/opendatabase-versions-expected.txt
LayoutTests/storage/indexeddb/modern/opendatabase-versions.html
LayoutTests/storage/indexeddb/modern/versionchange-event-expected.txt
LayoutTests/storage/indexeddb/modern/versionchange-event.html
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBDatabaseImpl.h
Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBOpenDBRequestImpl.h
Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp
Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.h