Bug 96401 - IndexedDB: Properties of IDBKeyRange should default to undefined
Summary: IndexedDB: Properties of IDBKeyRange should default to undefined
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joshua Bell
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 09:48 PDT by Joshua Bell
Modified: 2012-09-13 11:04 PDT (History)
6 users (show)

See Also:


Attachments
Patch (7.82 KB, patch)
2012-09-11 11:47 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff
Patch for landing (8.28 KB, patch)
2012-09-13 10:27 PDT, Joshua Bell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Bell 2012-09-11 09:48:47 PDT
From the spec: http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBKeyRange

lowerBound(): Creates and returns a new key range with lower set to lower, lowerOpen set to open, upper set to undefined and and upperOpen set to true.
upperBound(): Creates and returns a new key range with lower set to undefined, lowerOpen set to true, upper set to upper and and upperOpen set to open.

WebKit (via Source/WebCore/binding/v8/custom/V8IDBKey.cpp) currently returns null for these, which fails a W3C test submitted by Microsoft:

http://w3c-test.org/webapps/IndexedDB/tests/submissions/Microsoft/idbkeyrange.htm
Comment 1 Joshua Bell 2012-09-11 11:47:45 PDT
Created attachment 163415 [details]
Patch
Comment 2 Joshua Bell 2012-09-11 11:48:18 PDT
alecflett@ - can you take a look?
Comment 3 Alec Flett 2012-09-12 15:12:41 PDT
lgtm
Comment 4 Joshua Bell 2012-09-12 15:13:58 PDT
Since you're already cc'd - abarth@ - r? cq?
Comment 5 Adam Barth 2012-09-13 10:16:17 PDT
Comment on attachment 163415 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=163415&action=review

Ok.  That's kind of strange, but if that's what we're supposed to do.

> Source/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp:44
> -        return v8NullWithCheck(isolate);
> +        return v8::Undefined();

Please call v8Undefined().  It's faster.
Comment 6 Joshua Bell 2012-09-13 10:27:28 PDT
Created attachment 163903 [details]
Patch for landing
Comment 7 WebKit Review Bot 2012-09-13 11:04:41 PDT
Comment on attachment 163903 [details]
Patch for landing

Clearing flags on attachment: 163903

Committed r128482: <http://trac.webkit.org/changeset/128482>
Comment 8 WebKit Review Bot 2012-09-13 11:04:45 PDT
All reviewed patches have been landed.  Closing bug.