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

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

--- Comment #6 from Boris Zbarsky <bzbarsky@mit.edu> ---
> but not a consistent set

Well, it's consistent with how everything else in JS converts things to
numbers...  It's fairly intentionally matching those other conversions, yes.

You raise a good point about how conversion to integers in JS typically
converts non-finite doubles to 0.  That's a pretty odd thing to do in
[EnforceRange], though (at least for the positive and negative Infinity
values).  So [EnforceRange] basically just codifies what people would otherwise
do in prose: take a double or 53-bit int (depending on whether they wanted to
throw or round on non-integers). and then check the range.

> Maybe we should just unify those behaviors

I could live with that, probably; we'd need to think a bit about what the
behavior looks like for integer sizes other than 32-bit.

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

Received on Thursday, 2 July 2015 01:54:11 UTC