Fix crash after a Worker terminates but there are still IDB transactions the server...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2018 19:07:13 +0000 (19:07 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2018 19:07:13 +0000 (19:07 +0000)
commit2142bb1fb596726810695a76c655dbbbbfda52e3
tree693179b2223b02cc550359a38420e9cc0d33113c
parent99909c808715bc2ed5f6c7cd59e3ee71bca84bcc
Fix crash after a Worker terminates but there are still IDB transactions the server is trying to open for it.
<rdar://problem/33744241> and https://bugs.webkit.org/show_bug.cgi?id=185653

Reviewed by Andy Estes.

Source/WebCore:

Test: storage/indexeddb/modern/worker-transaction-open-after-worker-stop.html

* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::didStartTransaction): It's okay to not be able to find a pending TX
  that the server has started. e.g. When it was a WebWorker that asked for the TX but it has since terminated.

LayoutTests:

* storage/indexeddb/modern/resources/worker-transaction-open-after-worker-stop.js: Added.
(const.errorHandler):
(openRequest.onupgradeneeded):
(tx.oncomplete):
(openRequest.onsuccess):
(deleteRequest.onerror.deleteRequest.onblocked.deleteRequest.onsuccess):
* storage/indexeddb/modern/worker-transaction-open-after-worker-stop-expected.txt: Added.
* storage/indexeddb/modern/worker-transaction-open-after-worker-stop.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/storage/indexeddb/modern/resources/worker-transaction-open-after-worker-stop.js [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/worker-transaction-open-after-worker-stop-expected.txt [new file with mode: 0644]
LayoutTests/storage/indexeddb/modern/worker-transaction-open-after-worker-stop.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp