Depends on bug 752223
This should also be resolved by the patch in 752223, as the bindings were changed when JS_NewNumberValue() went away and was replaced by an always inlined non-footgunny version with the same functionality. Is this sufficient? We will still need to do something about the WebIDL [Clamp] rounding thing, as Boris suggests.
What [Clamp] thing?
What we have after bug 752223 seems pretty reasonable to me, unless it would be better to use DOUBLE_TO_JSVAL for the float/double cases. Whether that's better sort of depends on the jit and on what sorts of values usually come out of such properties, right?
Probably worth a separate bug on that if we think it's useful.