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

Issue 352133002: IDL: fix handling of non-decimal and unsigned default values (Closed)

Created:
6 years, 6 months ago by Jens Widell
Modified:
6 years, 6 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

IDL: fix handling of non-decimal and unsigned default values The operation Document.createNodeIterator() has the argument optional unsigned long whatToShow = 0xFFFFFFFF which exposes a few problems in the IDL scripts. First, "0xFFFFFFFF" is rejected by int(x) in default_node_to_idl_literal(). Using int(x, base=0) solves this; int() then selects base 8, 10 or 16 automatically. Second, for unsigned integer types, we should add a 'u' suffix to the C++ integer literal, or it's not guaranteed to be valid, in particular not in 32-bit builds. This is implemented by adding a utility function on IdlType for converting an IdlLiteral to a C++ expression. This utility function is also a natural place to add type compatibility checks in the future, so include a FIXME about that. BUG=258153 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176926

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -9 lines) Patch
M Source/bindings/scripts/idl_definitions.py View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/v8_methods.py View 3 chunks +9 lines, -1 line 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 chunk +11 lines, -0 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 chunk +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 3 chunks +18 lines, -6 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Jens Widell
PTAL
6 years, 6 months ago (2014-06-25 12:13:45 UTC) #1
haraken
LGTM
6 years, 6 months ago (2014-06-25 12:18:54 UTC) #2
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 6 months ago (2014-06-25 12:30:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/352133002/1
6 years, 6 months ago (2014-06-25 12:31:52 UTC) #4
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink ...
6 years, 6 months ago (2014-06-25 13:36:15 UTC) #5
commit-bot: I haz the power
6 years, 6 months ago (2014-06-25 14:41:07 UTC) #6
Message was sent while issue was closed.
Change committed as 176926

Powered by Google App Engine
This is Rietveld 408576698