Re: [WebIDL] Behavior for negative values passed for unsigned arguments

On Fri, Sep 9, 2011 at 10:35 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 9/9/11 1:28 PM, Jonas Sicking wrote:
>>
>> In the IndexedDB spec we've started working around the current default
>> behavior for unsigned arguments by making arguments signed and define
>> that an exception is thrown for negative values.
>
> That's why the EnforceRange annotation exists: so you don't have to do that!

I still think we should make the behavior for unsigned arguments sane.
It seems silly if we in 99% of the places where we use unsigned also
have to add EnforceRange.

Are there really any functions where we *want* unsigned values to
wrap? Either because it produces better behavior, or because it's
required for web compat?

/ Jonas

Received on Friday, 9 September 2011 19:24:56 UTC