Bug 54342 - crypto.getRandomValues should support all integer array types
Summary: crypto.getRandomValues should support all integer array types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-12 12:39 PST by Adam Barth
Modified: 2011-02-12 15:31 PST (History)
3 users (show)

See Also:


Attachments
Patch (4.72 KB, patch)
2011-02-12 12:40 PST, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-02-12 12:39:43 PST
crypto.getRandomValues should support all integer array types
Comment 1 Adam Barth 2011-02-12 12:40:55 PST
Created attachment 82239 [details]
Patch
Comment 2 Sam Weinig 2011-02-12 13:10:06 PST
Comment on attachment 82239 [details]
Patch

I haven't been paying to close attention to all this. Is this in a spec?  Why VALIDATION_ERR and not a type error? Otherwise, the patch looks good.
Comment 3 Adam Barth 2011-02-12 13:14:06 PST
> I haven't been paying to close attention to all this. Is this in a spec?

It's mostly been a discussion on the whatwg list.  I've offered to write it up as a spec.

> Why VALIDATION_ERR and not a type error? Otherwise, the patch looks good.

Type error is probably better.  I'll try to figure out how to throw a type error from WebCore proper.
Comment 4 Adam Barth 2011-02-12 13:20:52 PST
I see XPathException::TYPE_ERR.  Is there a non-XPath specific TYPE_ERR I should be using instead?
Comment 5 Adam Barth 2011-02-12 13:21:09 PST
+sam

I see XPathException::TYPE_ERR.  Is there a non-XPath specific TYPE_ERR I should be using instead?
Comment 6 WebKit Commit Bot 2011-02-12 14:13:29 PST
Comment on attachment 82239 [details]
Patch

Clearing flags on attachment: 82239

Committed r78422: <http://trac.webkit.org/changeset/78422>
Comment 7 WebKit Commit Bot 2011-02-12 14:13:33 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Sam Weinig 2011-02-12 15:31:06 PST
(In reply to comment #5)
> +sam
> 
> I see XPathException::TYPE_ERR.  Is there a non-XPath specific TYPE_ERR I should be using instead?

TYPE_MISMATCH_ERR is what seems to be used in quite a few places, e.g. the canvas rendering context.