Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Issue 53483004: IDL compiler: [Clamp] for arguments (Closed)

Created:
7 years, 1 month ago by Nils Barth (inactive)
Modified:
7 years, 1 month ago
Reviewers:
haraken
CC:
blink-reviews, kojih, jsbell+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, haraken, Nate Chapin, Inactive, kouhei (in TOK)
Visibility:
Public.

Description

IDL 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -1 line) Patch
M Source/bindings/scripts/unstable/v8_methods.py View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 1 chunk +9 lines, -1 line 0 comments Download
M Source/bindings/tests/idls/TestObjectPython.idl View 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 2 chunks +26 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Nils Barth (inactive)
Straightforward, but I've a question about C++ types vs. IDL type; see description and inline ...
7 years, 1 month ago (2013-10-31 03:22:44 UTC) #1
haraken
LGTM
7 years, 1 month ago (2013-10-31 03:28:43 UTC) #2
Nils Barth (inactive)
On 2013/10/31 03:22:44, Nils Barth wrote: > Straightforward, but I've a question about C++ types ...
7 years, 1 month ago (2013-10-31 04:09:52 UTC) #3
Nils Barth (inactive)
https://codereview.chromium.org/53483004/diff/1/Source/bindings/templates/methods.cpp File Source/bindings/templates/methods.cpp (right): https://codereview.chromium.org/53483004/diff/1/Source/bindings/templates/methods.cpp#newcode21 Source/bindings/templates/methods.cpp:21: {{argument.idl_type}} {{argument.name}} = 0; On 2013/10/31 03:22:44, Nils Barth ...
7 years, 1 month ago (2013-10-31 04:18:19 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/53483004/80001
7 years, 1 month ago (2013-10-31 04:19:53 UTC) #5
commit-bot: I haz the power
7 years, 1 month ago (2013-10-31 04:20:23 UTC) #6
Message was sent while issue was closed.
Change committed as 161016

Powered by Google App Engine
This is Rietveld 408576698