Bug 62401 - IndexedDB: setVersion() version argument is required
Summary: IndexedDB: setVersion() version argument is required
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-09 13:49 PDT by Mark Pilgrim (Google)
Modified: 2011-06-13 11:31 PDT (History)
5 users (show)

See Also:


Attachments
test case (1.81 KB, text/html)
2011-06-09 13:49 PDT, Mark Pilgrim (Google)
no flags Details
Patch (6.27 KB, patch)
2011-06-10 12:17 PDT, Mark Pilgrim (Google)
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 13:49:23 PDT
Created attachment 96635 [details]
test case

http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBDatabase-setVersion-IDBVersionChangeRequest-DOMString-version states that the version argument of setVersion() is required and can not be null. This test calls setVersion() without any arguments.

Expected behavior: throw IDBDatabaseException.NON_TRANSIENT_ERR
Actual behavior: no exception, version set to the 9-character string "undefined"

Test case attached.
Comment 1 Mark Pilgrim (Google) 2011-06-10 12:17:56 PDT
Created attachment 96771 [details]
Patch
Comment 2 Mark Pilgrim (Google) 2011-06-10 12:20:23 PDT
Turns out we weren't checking for null either. Added a test for that too. The patch fixes both issues (missing and null).
Comment 3 David Grogan 2011-06-10 13:58:25 PDT
Comment on attachment 96771 [details]
Patch

LGTM
Comment 4 WebKit Review Bot 2011-06-10 14:14:25 PDT
Comment on attachment 96771 [details]
Patch

Clearing flags on attachment: 96771

Committed r88565: <http://trac.webkit.org/changeset/88565>
Comment 5 WebKit Review Bot 2011-06-10 14:14:30 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Dimitri Glazkov (Google) 2011-06-11 10:13:00 PDT
Reverted r88565 for reason:

Broke Chromium browser test: IndexedDBBrowserTestWithGCExposed.DatabaseCallbacksTest

Committed r88602: <http://trac.webkit.org/changeset/88602>
Comment 7 Dimitri Glazkov (Google) 2011-06-11 10:54:03 PDT
Urk. Turns out I can't tell with certitude that this patch actually broke that particular test :(

Looking at this: http://build.chromium.org/p/chromium.webkit/waterfall?builder=Linux%20Tests

The test started failing with this commit, but still fails after I reverted it. Whuh?
Comment 8 Tony Chang 2011-06-13 10:29:14 PDT
dglazkov narrowed down the error to bug 62398 (r88569).  I think we need to roll this patch back in, right?
Comment 9 Dimitri Glazkov (Google) 2011-06-13 10:31:30 PDT
(In reply to comment #8)
> dglazkov narrowed down the error to bug 62398 (r88569).  I think we need to roll this patch back in, right?

Right. Apologies :)
Comment 10 Tony Chang 2011-06-13 10:49:44 PDT
Comment on attachment 96771 [details]
Patch

Let's see if the commit bot can reland it for us.
Comment 11 WebKit Review Bot 2011-06-13 11:29:16 PDT
Comment on attachment 96771 [details]
Patch

Clearing flags on attachment: 96771

Committed r88660: <http://trac.webkit.org/changeset/88660>
Comment 12 WebKit Review Bot 2011-06-13 11:29:21 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Dimitri Glazkov (Google) 2011-06-13 11:31:10 PDT
(In reply to comment #12)
> All reviewed patches have been landed.  Closing bug.

<3.