[Webkit-unassigned] [Bug 42976] Implement IDBKeyPath parser.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 27 07:37:36 PDT 2010


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





--- Comment #6 from Andrei Popescu <andreip at google.com>  2010-07-27 07:37:36 PST ---
> indexedDB.makeKeyPath('foo.bar.zoo')

Hmm, makeKeyPath() is not a method that exists in the spec. Rather than extending the indexedDB object with methods that are intended solely for testing, perhaps we should add a couple of methods to LayoutTestController instead?

> module storage {
>     // FIXME: IDBKeyPath is public only to allow testing, remove as soon as we have more comprehensive > test infrastructure for IndexedDB. 
>     interface [
>         Conditional=INDEXED_DATABASE
>     ] IDBKeyPath {

Oh, I see. Looking around, I cannot find any precedent for this. So maybe it's better to have a LTC method that returns true / false depending on whether the input is a valid keypath and was successfully parsed or not? I realize this doesn't allow as extensive testing, but I am not sure it's ok to add non-standard interfaces for testing, either.

>168     else
> 169        state = Start;

Here we are in an array, after the right bracket and we jump to the Start state, which allows an identifier. Does this mean that the following sequence will parse successfully?

identifier[100]anotherIdentifier

Looks great, otherwise!

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