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?
Created attachment 151809 [details] Patch
Turns out we already have the correct behavior here, so just adding a specific test for this. dgrogan@, alecflett@ - how's it look?
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
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.
Created attachment 151815 [details] Patch
tony@ - r?
Comment on attachment 151815 [details] Patch Clearing flags on attachment: 151815 Committed r122475: <http://trac.webkit.org/changeset/122475>
All reviewed patches have been landed. Closing bug.