haikuwebkit/LayoutTests/storage
Sihui Liu 9a4d203336 Keep newly created IDBObjectStores in deleted map when IDBTransaction is aborted
https://bugs.webkit.org/show_bug.cgi?id=220483
<rdar://problem/71934293>

Patch by Sihui Liu <sihui_liu@appe.com> on 2021-01-11
Reviewed by Darin Adler.

Source/WebCore:

When an upgrade transaction is aborted, we move objects from m_deletedObjectStores to m_referencedObjectStores
to revert the deletion operation. When updating m_referencedObjectStores, we did not check whether key already
exists (this can happen when an object store gets deleted and a new object store with the same name is
created; see updated layout test). Therefore, some object store in m_referencedObjectStores would be replaced
and destroyed (since m_referencedObjectStores holds unique pointers) when the object store is referenced by JS
object.

Test: storage/indexeddb/modern/abort-objectstore-info.html

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::internalAbort):

LayoutTests:

* storage/indexeddb/modern/abort-objectstore-info-expected.txt:
* storage/indexeddb/modern/abort-objectstore-info-private-expected.txt:
* storage/indexeddb/modern/resources/abort-objectstore-info.js:
(prepareDatabase):
(secondUpgradeNeeded):
(checkState):

Canonical link: https://commits.webkit.org/232940@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@271379 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-01-11 22:00:11 +00:00
..
domstorage Remove remaining alternative preference setting mechanisms from LayoutTests 2020-11-01 20:09:38 +00:00
indexeddb Keep newly created IDBObjectStores in deleted map when IDBTransaction is aborted 2021-01-11 22:00:11 +00:00
resources
websql Remove trailing spaces from expected.txt files (excluding WPT for now since that contains too many) 2020-09-27 02:15:19 +00:00
storageinfo-missing-arguments-expected.txt
storageinfo-missing-arguments.html Change LayoutTests' s* files to use pre and post js files in LayoutTests/resources. 2013-09-08 05:29:22 +00:00
storageinfo-no-callbacks-expected.txt 2011-05-31 Kinuko Yasuda <kinuko@chromium.org> 2011-06-01 05:09:52 +00:00
storageinfo-no-callbacks.html
storageinfo-query-usage-expected.txt 2011-04-15 Kinuko Yasuda <kinuko@chromium.org> 2011-04-15 23:58:43 +00:00
storageinfo-query-usage.html
storageinfo-request-quota-expected.txt
storageinfo-request-quota.html
storagequota-query-usage-expected.txt Quota API: Update IDL to make it match the latest WD 2013-03-14 02:48:19 +00:00
storagequota-query-usage.html
storagequota-request-quota-expected.txt
storagequota-request-quota.html Change LayoutTests' s* files to use pre and post js files in LayoutTests/resources. 2013-09-08 05:29:22 +00:00