WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 63054
IndexedDB: createObjectStore() should check if keypath is valid
https://bugs.webkit.org/show_bug.cgi?id=63054
Summary
IndexedDB: createObjectStore() should check if keypath is valid
Kentaro Hara
Reported
2011-06-21 00:36:01 PDT
The spec (
http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBDatabase-createObjectStore-IDBObjectStore-DOMString-name-Object-optionalParameters
) says "If keyPath is an array and any items in the array is not a valid key path, or if keyPath is a string and is not a valid key path then a NON_TRANSIENT_ERR error must be thrown". However, the current createObjectStore() does not check the keypath argument and thus it does not throw any exception when we give an invalid keypath. I attached the test case that should throw an exception.
Attachments
test case
(1.80 KB, text/html)
2011-06-21 00:36 PDT
,
Kentaro Hara
no flags
Details
Patch
(8.64 KB, patch)
2011-06-21 00:58 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Patch
(13.94 KB, patch)
2011-06-21 19:13 PDT
,
Kentaro Hara
no flags
Details
Formatted Diff
Diff
Patch for landing
(9.15 KB, patch)
2011-06-22 10:17 PDT
,
Tony Chang
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2011-06-21 00:36:41 PDT
Created
attachment 97945
[details]
test case
Kentaro Hara
Comment 2
2011-06-21 00:58:20 PDT
Created
attachment 97947
[details]
Patch
Hans Wennborg
Comment 3
2011-06-21 03:57:18 PDT
LGTM
Tony Chang
Comment 4
2011-06-21 13:25:56 PDT
Comment on
attachment 97947
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=97947&action=review
> Source/WebCore/ChangeLog:11 > + if the |keypath| is invalid. With this parsing, we remove keypath-as-array.html because > + the current keypath parser does not support an array of keypath and (more importantly) > + the current implementation of ObjectStore does not support multiple keypaths.
Can we add a new test that demonstrates that we don't support these keypath values and that the right exception is raised?
Kentaro Hara
Comment 5
2011-06-21 19:13:43 PDT
Created
attachment 98100
[details]
Patch Patch. I added a new test (storage/indexeddb/keypath-basics.html) that demonstrates that we do not support an array of keypath.
Tony Chang
Comment 6
2011-06-22 10:14:36 PDT
Comment on
attachment 98100
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=98100&action=review
> Source/WebCore/ChangeLog:14 > + Tests: storage/indexeddb/keyPath.html
I don't see a test named keyPath.html. I'll remove this when landing it.
Tony Chang
Comment 7
2011-06-22 10:17:39 PDT
Created
attachment 98196
[details]
Patch for landing
WebKit Review Bot
Comment 8
2011-06-22 13:09:17 PDT
Comment on
attachment 98196
[details]
Patch for landing Clearing flags on attachment: 98196 Committed
r89466
: <
http://trac.webkit.org/changeset/89466
>
WebKit Review Bot
Comment 9
2011-06-22 13:09:22 PDT
All reviewed patches have been landed. Closing bug.
Joshua Bell
Comment 10
2011-10-14 13:42:32 PDT
***
Bug 63053
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug