The prototype Chromium implementation applies [EnforceRange] to all places where integer (specifically all the unsigned long) values are used as inputs.
The spec does not currently use [EnforceRange] anywhere.
The behavior difference is that with [EnforceRange] a value outside the range results in an exception, so a value less than 0 or greater than 4294967295. Note that values are rounded so this doesn't result in an exception if e.g. 2.2 is passed, but it catches -2. I'd strongly encourage throwing (i.e. including [EnforceRange]) since conversion is otherwise non-intuitive.
Note that Chromium doesn't yet implement MLTriangularOptions which has a long (not unsigned); for consistency we'd probably want to annotate that as well.
The prototype Chromium implementation applies
[EnforceRange]
to all places where integer (specifically all theunsigned long
) values are used as inputs.The spec does not currently use
[EnforceRange]
anywhere.The behavior difference is that with
[EnforceRange]
a value outside the range results in an exception, so a value less than 0 or greater than 4294967295. Note that values are rounded so this doesn't result in an exception if e.g.2.2
is passed, but it catches-2
. I'd strongly encourage throwing (i.e. including[EnforceRange]
) since conversion is otherwise non-intuitive.Note that Chromium doesn't yet implement
MLTriangularOptions
which has along
(notunsigned
); for consistency we'd probably want to annotate that as well.