[Webkit-unassigned] [Bug 62288] IndexedDB createObjectStore should throw if key path contains a space

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 16 05:38:09 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=62288





--- Comment #5 from Hans Wennborg <hans at chromium.org>  2011-06-16 05:38:09 PST ---
(In reply to comment #4)
> I have one question.The specification says "A valid key path is either the empty string, a JavaScript identifier, or multiple Javascript identifiers separated by periods (Note that spaces are not allowed within a key path.)". 
> 
> However, as far as I see the current key path parser (WebCore/storage/IDBKeyPath.cpp) and its tests (storage/indexdb/keyPath.html, WebKit/chromium/tests/IDBKeyPathTest.cpp, WebCore/bindings/v8/IDBBindingUtilities.cpp), array access in the key path seems to be allowed, like "foo.bar[2]", "foo.bar[   2   ]", "foo.bar[2][3][[[[4]]]]" and (even) "[123]". I guess that there must be some reason for the parser allowing the array access in the key path, but I cannot yet find the reason... 
> 
> Is it OK to just remove all array access from the tests and write the parser strictly according to the above specification? Or should I leave the array access in the parser? In the latter case, I think that more specification is necessary to write the parser (e.g. "[[[ 123 ]]]" should not be accepted as a valid key path, but it is allowed in the current parser).

Hi Kentaro, yes feel free to take on this bug.

The spec text about what constitutes a valid key path is pretty recent. It was discussed here: http://www.w3.org/Bugs/Public/show_bug.cgi?id=11269 and here: http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0859.html

We should make sure our tests use valid key paths, and update the parser to follow the spec.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list