Chromium Code Reviews
DescriptionIDL compiler: [Clamp] for arguments
In practice used 2 places, for unsigned short and unsigned long.
One weird point (hence documented) is that here we use the literal IDL
type for a C++ variable.
I believe this is ok b/c |unsigned short| and |unsigned long| are legitimate
C++ types, even though we otherwise internally store them as |unsigned|,
but it does mean there's implicit type conversion going on when the
local variable is used later (since it's unsigned).
It might be more correct and safer to use the C++ type for the local variable,
only using the IDL type for the clampTo itself, and making the conversion
explicit here.
Docs:
http://www.w3.org/TR/WebIDL/#Clamp
http://www.chromium.org/blink/webidl/blink-idl-extended-attributes#TOC-Clamp-a-p-
BUG=239771
NOTRY=true
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161016
Patch Set 1 #
Total comments: 5
Patch Set 2 : Comment changes #
Messages
Total messages: 6 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||