[Webkit-unassigned] [Bug 213116] [IndexedDB] IDBTransaction.abort() fails to delete database on first connection open

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 15 12:08:56 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=213116

--- Comment #2 from Sihui Liu <sihui_liu at apple.com> ---
(In reply to charob from comment #0)
> There is a use case where if I call abort from within IDBOpenDBRequest's
> upgradeneeded event, the abort operation does not rollback all changes and
> fails to delete the database. 
> 
> An example to reproduce the issue:
> 
> ```
> const dBOpenRequest = window.indexedDB.open('myDatabase', 1);
> 
> dBOpenRequest.onupgradeneeded = event => {
>   const db = event.target.result;
>   console.log(`Upgrading to version ${db.version}`);
>   dBOpenRequest.transaction.abort();
> };
> ```
> 
> After running this code there should be no database created since abort was
> called.
> 
> The behavior on Safari is not consistent with Chrome and Firefox. 
> 
> Reference:
> https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/abort

Hi, when you say no database should be created, do you mean no database file should be created? Or do you see unexpected behavior on next open, like entries are left in the database?

If possible, can you attach a full test file?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200615/2ae86da2/attachment.htm>


More information about the webkit-unassigned mailing list