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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 5 06:24:40 PDT 2011


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





--- Comment #14 from Kentaro Hara <haraken at google.com>  2011-07-05 06:24:40 PST ---
(In reply to comment #9)
> View in context: https://bugs.webkit.org/attachment.cgi?id=97785&action=review
> 
> > LayoutTests/storage/indexeddb/keypath-basics.html:49
> > +    testKeyPath = [null, undefined, '', 'foo', 'foo.bar.baz'];
> 
> maybe rename testKeyPath to testKeyPaths? (here, and in a couple of more places below)

Done.

> 
> > Source/WebCore/storage/IDBDatabase.cpp:87
> > +    IDBParseKeyPath(keyPath, keyPathElements, error);
> 
> could you factor this out into a function such as "bool IDBKeyPathIsValid(const String& path)" in IDBKeyPath.cpp/h?

Done.

> 
> > Source/WebCore/storage/IDBKeyPath.h:40
> > +        IsNamed
> 
> There doesn't seem to be any point in keeping this enum around if an IDBKeyPathElement is always a name.

Done. I replaced IDBKeyPathElement with String.

> 
> > Source/WebCore/storage/IDBObjectStore.cpp:138
> > +    }
> 
> see comment in IDBDatabase.cpp. It would be nice if we could just have:
> 
> if (keyPath.isNull() || !IDBIsValidKeyPath(keyPath)) {
>     ec = ...;
>     return 0;
> }

Done.

> 
> > Source/WebKit/chromium/tests/IDBKeyPathTest.cpp:60
> >              ASSERT_TRUE(false) << "Invalid IDBKeyPathElement type";
> 
> this loop should be simpler now that an element is always a name, right?

Done.

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