Modern IDB: Transactions from a previous page can leak forward to the next.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jan 2016 17:44:50 +0000 (17:44 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jan 2016 17:44:50 +0000 (17:44 +0000)
commit41a99c84229f5cff55e040af928754a7366c510a
treeba3f4f4488aa276ec13cb0eeb4f3c4dd0107d593
parentcf1f48b8c68cb15c914d7976533463fdb1c00bf4
Modern IDB: Transactions from a previous page can leak forward to the next.
https://bugs.webkit.org/show_bug.cgi?id=152698

Reviewed by Alex Christensen.

Source/WebCore:

Test: storage/indexeddb/modern/transactions-stop-on-navigation.html

This patch is mostly about actually implementing IDBDatabase::stop and IDBTransaction::stop.
Most of the rest of the scattered changes are about cleaning up now-incorrect ASSERTs.

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

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

* Modules/indexeddb/client/IDBRequestImpl.h:

* Modules/indexeddb/client/IDBTransactionImpl.cpp:
(WebCore::IDBClient::IDBTransaction::IDBTransaction):
(WebCore::IDBClient::IDBTransaction::stop):
(WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):

* Modules/indexeddb/server/UniqueIDBDatabase.cpp:
(WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
(WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):

LayoutTests:

* storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html: Added.
* storage/indexeddb/modern/resources/transactions-stop-on-navigation.js: Added.
* storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt: Added.
* storage/indexeddb/modern/transactions-stop-on-navigation.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/resources/transactions-stop-on-navigation-2.html [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/resources/transactions-stop-on-navigation.js [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/transactions-stop-on-navigation-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/transactions-stop-on-navigation.html [new file with mode: 0644]
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/IDBRequestImpl.h
Source/WebCore/Modules/indexeddb/client/IDBTransactionImpl.cpp
Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp