Bug 62370 - IndexedDB deleteIndex should throw NOT_ALLOWED_ERR if called outside a VERSION_CHANGE transaction callback
Summary: IndexedDB deleteIndex should throw NOT_ALLOWED_ERR if called outside a VERSIO...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joshua Bell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 05:48 PDT by Mark Pilgrim (Google)
Modified: 2011-12-07 13:18 PST (History)
5 users (show)

See Also:


Attachments
test case (2.68 KB, text/html)
2011-06-09 05:48 PDT, Mark Pilgrim (Google)
no flags Details
Patch (5.22 KB, patch)
2011-11-23 12:57 PST, Joshua Bell
no flags Details | Formatted Diff | Diff
Patch (5.15 KB, patch)
2011-11-23 15:09 PST, Joshua Bell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Pilgrim (Google) 2011-06-09 05:48:06 PDT
Created attachment 96576 [details]
test case

http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBObjectStore-deleteIndex-void-DOMString-indexName states "Note that this method must only be called from a VERSION_CHANGE transaction callback. ... NOT_ALLOWED_ERR [indicates] This method was not called from a VERSION_CHANGE transaction callback."

This test opens a database, creates an objectstore, creates an index, waits for the VERSION_CHANGE transaction to end, and then attempts to delete the index.

Expected behavior: throws webkitIDBDatabaseException.NOT_ALLOWED_ERR
Actual behavior: throws webkitIDBDatabaseException.NOT_FOUND_ERR

Test case attached.
Comment 1 Joshua Bell 2011-10-24 16:17:42 PDT
This functions correctly now (circa M16), but we don't appear to have a layout test for this case. We should add Mark's test.
Comment 2 Joshua Bell 2011-11-23 12:57:39 PST
Created attachment 116404 [details]
Patch
Comment 3 Joshua Bell 2011-11-23 15:09:27 PST
Created attachment 116437 [details]
Patch
Comment 4 Joshua Bell 2011-11-23 15:10:24 PST
Comment on attachment 116437 [details]
Patch

removed stylesheet link
Comment 5 Hans Wennborg 2011-11-24 08:03:44 PST
Looks good to me.
Comment 6 Joshua Bell 2011-12-07 10:43:52 PST
tony@ - r? cq?
Comment 7 WebKit Review Bot 2011-12-07 13:18:46 PST
Comment on attachment 116437 [details]
Patch

Clearing flags on attachment: 116437

Committed r102269: <http://trac.webkit.org/changeset/102269>
Comment 8 WebKit Review Bot 2011-12-07 13:18:52 PST
All reviewed patches have been landed.  Closing bug.