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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 15 22:46:09 PDT 2011


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





--- Comment #4 from Kentaro Hara <haraken at google.com>  2011-06-15 22:46:09 PST ---
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).

-- 
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