IndexedDB: One transaction coordinator per database
https://bugs.webkit.org/show_bug.cgi?id=97501
Reviewed by Tony Chang.
Source/WebCore:
Per the IDB spec, transactions only need to be sequenced within databases.
The implementation was using one coordinator per factory backend (effectively
a singleton), which would prevent parallel execution of transactions in different
databases. Moved ownership of the transaction coordinator to the database backend.
Tests: storage/indexeddb/transaction-coordination-across-databases.html
storage/indexeddb/transaction-readwrite-exclusive.html
* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::create):
(WebCore):
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::deleteDatabase):
(WebCore::IDBFactoryBackendImpl::open):
* Modules/indexeddb/IDBFactoryBackendImpl.h:
(WebCore):
(IDBFactoryBackendImpl):
* Modules/indexeddb/IDBTransactionCoordinator.cpp:
(WebCore::IDBTransactionCoordinator::create):
(WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
* Modules/indexeddb/IDBTransactionCoordinator.h:
(IDBTransactionCoordinator):
Source/WebKit/chromium:
Remove obsolete argument.
* tests/IDBDatabaseBackendTest.h:
LayoutTests:
Test that transactions can be parallelized across databases, and ensure that
read/write transactions with overlapping scopes are not parallelized within a
database.
* storage/indexeddb/resources/transaction-coordination-across-databases.js: Added.
* storage/indexeddb/resources/transaction-readwrite-exclusive.js: Added.
* storage/indexeddb/transaction-coordination-across-databases-expected.txt: Added.
* storage/indexeddb/transaction-coordination-across-databases.html: Added.
* storage/indexeddb/transaction-readwrite-exclusive-expected.txt: Added.
* storage/indexeddb/transaction-readwrite-exclusive.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129534
268f45cc-cd09-0410-ab3c-
d52691b4dbfc