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

Issue 357413003: IDL: Drop redundant null check for string and wrapper type attributes (Closed)

Created:
6 years, 5 months ago by Jens Widell
Modified:
6 years, 5 months ago
Reviewers:
haraken
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: Drop redundant null check for string and wrapper type attributes For nullable string and wrapper type attributes, we use a null string or null pointer return value from the C++ getter to represent a null Javascript value. Rather than generating a separate null check and v8SetReturnValueNull() call for these types, we can use v8SetReturnValueStringOrNull() for strings, and for wrapper types, we can always use the per-type v8SetReturnValue() overload, since they convert null pointers to null Javascript values already. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177292

Patch Set 1 #

Total comments: 5

Patch Set 2 : updated #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -60 lines) Patch
M Source/bindings/scripts/v8_attributes.py View 1 3 chunks +5 lines, -3 lines 3 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 chunks +5 lines, -0 lines 0 comments Download
M Source/bindings/templates/attributes.cpp View 1 2 chunks +2 lines, -8 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 3 chunks +3 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 15 chunks +97 lines, -44 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Jens Widell
PTAL
6 years, 5 months ago (2014-06-30 19:54:31 UTC) #1
haraken
LGTM with comments. https://codereview.chromium.org/357413003/diff/1/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/357413003/diff/1/Source/bindings/scripts/v8_types.py#newcode682 Source/bindings/scripts/v8_types.py:682: 'StringOrNull': '!{cpp_value}.isNull() ? v8String({isolate}, {cpp_value}) : ...
6 years, 5 months ago (2014-07-01 00:57:33 UTC) #2
Jens Widell
https://codereview.chromium.org/357413003/diff/1/Source/bindings/scripts/v8_attributes.py File Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/357413003/diff/1/Source/bindings/scripts/v8_attributes.py#newcode97 Source/bindings/scripts/v8_attributes.py:97: 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value='original', creation_context='info.Holder()'), Dropped this because it's overridden by ...
6 years, 5 months ago (2014-07-01 06:43:23 UTC) #3
haraken
Still LGTM https://codereview.chromium.org/357413003/diff/20001/Source/bindings/scripts/v8_attributes.py File Source/bindings/scripts/v8_attributes.py (right): https://codereview.chromium.org/357413003/diff/20001/Source/bindings/scripts/v8_attributes.py#newcode175 Source/bindings/scripts/v8_attributes.py:175: 'LogPreviousValue' in extended_attributes or On 2014/07/01 06:43:22, ...
6 years, 5 months ago (2014-07-01 06:47:17 UTC) #4
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-07-01 06:50:39 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/357413003/20001
6 years, 5 months ago (2014-07-01 06:52:19 UTC) #6
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, 5 months ago (2014-07-01 07:58:00 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-01 09:05:04 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/14505)
6 years, 5 months ago (2014-07-01 09:05:04 UTC) #9
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-07-01 09:39:11 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/357413003/20001
6 years, 5 months ago (2014-07-01 09:39:39 UTC) #11
commit-bot: I haz the power
6 years, 5 months ago (2014-07-01 10:43:21 UTC) #12
Message was sent while issue was closed.
Change committed as 177292

Powered by Google App Engine
This is Rietveld 408576698