[Bug 28875] [EnforceRange] accepts an odd set of input values

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28875

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu

--- Comment #1 from Boris Zbarsky <bzbarsky@mit.edu> ---
> Looking at uses: I see 3 existing uses in Blink, all in IndexedDB: 

http://mxr.mozilla.org/mozilla-central/search?string=EnforceRange&find=dom%2Fwebidl&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
shows uses in SubtleCrypto as well.

What exactly is the problem with the current behavior?  Assuming you plan to do
a coercion to number at all, you have to do it before checking range.  The only
other option would be to immediately throw if the passed-in thing is not a
Number value, right?  That would break things like passing "123" (e.g. out of
input.value) for cases where the callee wants a range-enforced integer.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 1 July 2015 20:42:55 UTC