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

Issue 466323002: IDL: Use Nullable for union type return value (Closed)

Created:
6 years, 4 months ago by bashi
Modified:
6 years, 4 months ago
Reviewers:
haraken, Jens Widell, sof
CC:
blink-reviews, rwlbuis, shans, arv+blink, Mike Lawther (Google), blink-reviews-animation_chromium.org, eae+blinkwatch, dglazkov+blink, abarth-chromium, dstockwell, Timothy Loh, blink-reviews-dom_chromium.org, blink-reviews-bindings_chromium.org, darktears, rjwright, Steve Block, blink-reviews-html_chromium.org, Eric Willigers
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

IDL: Use Nullable for union type return value Before this CL, we use bool flags to indicate which value should be returned. We can use Nullable<T> instead. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180360

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 5

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -107 lines) Patch
M Source/bindings/core/v8/Nullable.h View 1 2 1 chunk +9 lines, -1 line 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 2 2 chunks +6 lines, -3 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 2 chunks +30 lines, -5 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 2 chunks +6 lines, -13 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 1 chunk +9 lines, -6 lines 0 comments Download
M Source/bindings/tests/idls/TestTypedefs.idl View 1 2 chunks +2 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestSpecialOperations.cpp View 1 2 3 2 chunks +10 lines, -14 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 3 chunks +28 lines, -5 lines 0 comments Download
M Source/core/animation/AnimationNodeTiming.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/animation/AnimationNodeTiming.cpp View 1 1 chunk +2 lines, -4 lines 0 comments Download
M Source/core/animation/AnimationTest.cpp View 1 4 chunks +24 lines, -35 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Document.cpp View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/html/HTMLAllCollection.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLAllCollection.cpp View 1 2 3 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/html/HTMLFormControlsCollection.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLFormControlsCollection.cpp View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/html/HTMLFormElement.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLFormElement.cpp View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M Source/core/html/HTMLOptionsCollection.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLOptionsCollection.cpp View 1 2 2 chunks +1 line, -3 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
bashi
Haraken-san, What do you think about this change? As Shiino-san suggested, we can also use ...
6 years, 4 months ago (2014-08-13 10:03:02 UTC) #1
Jens Widell
FYI, I have an experimental implementation of union return types (and also, intended, union arguments) ...
6 years, 4 months ago (2014-08-13 10:34:32 UTC) #2
haraken
On 2014/08/13 10:34:32, Jens Lindström wrote: > FYI, I have an experimental implementation of union ...
6 years, 4 months ago (2014-08-13 10:41:44 UTC) #3
bashi
On 2014/08/13 10:41:44, haraken wrote: > On 2014/08/13 10:34:32, Jens Lindström wrote: > > FYI, ...
6 years, 4 months ago (2014-08-13 10:57:16 UTC) #4
haraken
LGTM https://codereview.chromium.org/466323002/diff/1/Source/bindings/core/v8/Nullable.h File Source/bindings/core/v8/Nullable.h (right): https://codereview.chromium.org/466323002/diff/1/Source/bindings/core/v8/Nullable.h#newcode21 Source/bindings/core/v8/Nullable.h:21: Nullable(const T& value) Probably add 'explicit' ? https://codereview.chromium.org/466323002/diff/1/Source/bindings/core/v8/Nullable.h#newcode45 ...
6 years, 4 months ago (2014-08-13 13:07:10 UTC) #5
Jens Widell
https://codereview.chromium.org/466323002/diff/1/Source/bindings/core/v8/Nullable.h File Source/bindings/core/v8/Nullable.h (right): https://codereview.chromium.org/466323002/diff/1/Source/bindings/core/v8/Nullable.h#newcode21 Source/bindings/core/v8/Nullable.h:21: Nullable(const T& value) On 2014/08/13 13:07:10, haraken wrote: > ...
6 years, 4 months ago (2014-08-13 13:11:08 UTC) #6
haraken
https://codereview.chromium.org/466323002/diff/1/Source/bindings/core/v8/Nullable.h File Source/bindings/core/v8/Nullable.h (right): https://codereview.chromium.org/466323002/diff/1/Source/bindings/core/v8/Nullable.h#newcode21 Source/bindings/core/v8/Nullable.h:21: Nullable(const T& value) On 2014/08/13 13:11:08, Jens Lindström wrote: ...
6 years, 4 months ago (2014-08-13 13:12:54 UTC) #7
bashi
Thank you for review, Haraken-san! We should avoid using Nullable<String> so I'll revise the CL ...
6 years, 4 months ago (2014-08-13 13:45:56 UTC) #8
bashi
Haraken-san, (and Jens), Could you take another look? Added special handling for String, but we ...
6 years, 4 months ago (2014-08-15 02:43:53 UTC) #9
haraken
> Could you take another look? Added special handling for String, but we might > ...
6 years, 4 months ago (2014-08-15 02:52:47 UTC) #10
bashi
On 2014/08/15 02:52:47, haraken wrote: > > Could you take another look? Added special handling ...
6 years, 4 months ago (2014-08-15 02:59:55 UTC) #11
bashi
Haraken-san, PTAL? I introduced a new context for union member arguments to handle following cases: ...
6 years, 4 months ago (2014-08-15 07:13:39 UTC) #12
haraken
LGTM > It's very difficult to handle all of above with the current approach, i.e., ...
6 years, 4 months ago (2014-08-15 07:34:16 UTC) #13
bashi
https://codereview.chromium.org/466323002/diff/40001/Source/bindings/tests/idls/TestTypedefs.idl File Source/bindings/tests/idls/TestTypedefs.idl (right): https://codereview.chromium.org/466323002/diff/40001/Source/bindings/tests/idls/TestTypedefs.idl#newcode44 Source/bindings/tests/idls/TestTypedefs.idl:44: typedef (DOMString or double) DOMStringOrDouble; On 2014/08/15 07:34:15, haraken ...
6 years, 4 months ago (2014-08-15 10:14:07 UTC) #14
bashi
The CQ bit was checked by bashi@chromium.org
6 years, 4 months ago (2014-08-15 12:52:52 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bashi@chromium.org/466323002/60001
6 years, 4 months ago (2014-08-15 12:53:51 UTC) #16
commit-bot: I haz the power
Committed patchset #4 (60001) as 180360
6 years, 4 months ago (2014-08-15 12:57:17 UTC) #17
sof
This appears to break two unit tests with Oilpan enabled, http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Oilpan%20%28dbg%29/builds/4673 Crashes gone with it ...
6 years, 4 months ago (2014-08-15 19:16:21 UTC) #18
Jens Widell
On 2014/08/15 19:16:21, sof wrote: > This appears to break two unit tests with Oilpan ...
6 years, 4 months ago (2014-08-15 19:47:21 UTC) #19
sof
On 2014/08/15 19:47:21, Jens Widell wrote: > On 2014/08/15 19:16:21, sof wrote: > > This ...
6 years, 4 months ago (2014-08-15 19:49:15 UTC) #20
Jens Widell
6 years, 4 months ago (2014-08-15 19:51:45 UTC) #21
Message was sent while issue was closed.
On 2014/08/15 19:49:15, sof wrote:
> On 2014/08/15 19:47:21, Jens Widell wrote:
> > On 2014/08/15 19:16:21, sof wrote:
> > > This appears to break two unit tests with Oilpan enabled,
> > > 
> > >
> >
>
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Oilpan%...
> > > 
> > > Crashes gone with it reverted.
> > 
> > sof@: can you check if https://codereview.chromium.org/474323002 fixes the
> > crashes?
> 
> As long as it initializes the RawPtrs will nullptr, it will.

That was my theory too. :-)

Powered by Google App Engine
This is Rietveld 408576698