RESOLVED FIXED90995
IndexedDB: Verify internal "delete pending" flag on database
https://bugs.webkit.org/show_bug.cgi?id=90995
Summary IndexedDB: Verify internal "delete pending" flag on database
Joshua Bell
Reported 2012-07-11 11:23:20 PDT
The IDB spec http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html says: Databases has a delete pending flag which is used during deletion. When a database is requested to be deleted the flag is set to true and all attempts at opening the database are stalled until the database can be deleted. This implies that calls open following delete should succeed, yielding a new database with the same name as the old one. Note that a delete may be delayed arbitrarily. We do queue up open calls after deletes, but it's unclear from code inspection what the open() call actually gets - pointer to the same IDBDatabaseBackendImpl object? A reset version? Is the backing store reference retained or dropped?
Attachments
Patch (7.10 KB, patch)
2012-07-11 15:58 PDT, Joshua Bell
no flags
Patch (7.08 KB, patch)
2012-07-11 16:58 PDT, Joshua Bell
no flags
Joshua Bell
Comment 1 2012-07-11 15:58:29 PDT
Joshua Bell
Comment 2 2012-07-11 16:00:34 PDT
Turns out we already have the correct behavior here, so just adding a specific test for this. dgrogan@, alecflett@ - how's it look?
Alec Flett
Comment 3 2012-07-11 16:15:06 PDT
Comment on attachment 151809 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151809&action=review > LayoutTests/storage/indexeddb/resources/database-deletepending-flag.js:33 > + shouldBe("String(connection.version)", "String(version)"); Why the "String()" ? Other than that, LGTM
Joshua Bell
Comment 4 2012-07-11 16:19:23 PDT
Comment on attachment 151809 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=151809&action=review >> LayoutTests/storage/indexeddb/resources/database-deletepending-flag.js:33 >> + shouldBe("String(connection.version)", "String(version)"); > > Why the "String()" ? > > Other than that, LGTM I was being clever and had version be a number, but IDBDatabase.version will currently give back a string; I could do version = '10' instead and we can update this with all of the other tests.
Joshua Bell
Comment 5 2012-07-11 16:58:38 PDT
Joshua Bell
Comment 6 2012-07-11 16:58:57 PDT
tony@ - r?
WebKit Review Bot
Comment 7 2012-07-12 10:11:02 PDT
Comment on attachment 151815 [details] Patch Clearing flags on attachment: 151815 Committed r122475: <http://trac.webkit.org/changeset/122475>
WebKit Review Bot
Comment 8 2012-07-12 10:11:15 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.