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

Issue 2464793004: Mojo C++ bindings: some improvements for String16 struct traits. (Closed)

Created:
4 years, 1 month ago by yzshen1
Modified:
4 years, 1 month ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, blink-reviews, darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo C++ bindings: some improvements for String16 struct traits. - map nullable String16 to WTF::String (instead of WTF::Optional<WTF::String>); - avoid unnecessary copies and null checks; - add one more test case. BUG=653209 Committed: https://crrev.com/510a9fab8b58db770bc5ce698612dec9b7163df8 Cr-Commit-Position: refs/heads/master@{#429397}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 4

Patch Set 3 : . #

Patch Set 4 : simplify context object and future reduce heap allocation #

Patch Set 5 : . #

Total comments: 6

Patch Set 6 : . #

Patch Set 7 : . #

Total comments: 8

Patch Set 8 : . #

Patch Set 9 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -61 lines) Patch
M mojo/common/common_custom_types_struct_traits.h View 1 2 3 4 5 6 3 chunks +16 lines, -14 lines 0 comments Download
M mojo/common/common_custom_types_struct_traits.cc View 4 5 2 chunks +10 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/platform/mojo/CommonCustomTypes.typemap View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.h View 1 2 3 4 5 6 7 2 chunks +12 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp View 1 2 3 4 5 6 7 8 1 chunk +33 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraitsTest.cpp View 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/mojo/DEPS View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 41 (25 generated)
yzshen1
Hi, Would you please take a look? Thanks! Elliot: everything Tom: security Zhiqiang: FYI
4 years, 1 month ago (2016-10-31 22:26:15 UTC) #6
Tom Sepez
https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp File third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp (right): https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp#newcode16 third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp:16: // |str| must outlive this object. This worries me. ...
4 years, 1 month ago (2016-10-31 22:43:42 UTC) #7
yzshen1
Thanks Elliot! https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp File third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp (right): https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp#newcode16 third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp:16: // |str| must outlive this object. On ...
4 years, 1 month ago (2016-10-31 22:56:34 UTC) #8
yzshen1
On 2016/10/31 22:56:34, yzshen1 (OOO Sep25-Oct29) wrote: > Thanks Elliot! (Oops, I meant: Thanks Tom!) ...
4 years, 1 month ago (2016-10-31 22:57:16 UTC) #9
Tom Sepez
https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp File third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp (right): https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp#newcode16 third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp:16: // |str| must outlive this object. > (Maybe this ...
4 years, 1 month ago (2016-10-31 23:15:55 UTC) #10
yzshen1
https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp File third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp (right): https://codereview.chromium.org/2464793004/diff/20001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp#newcode16 third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp:16: // |str| must outlive this object. On 2016/10/31 23:15:55, ...
4 years, 1 month ago (2016-10-31 23:37:15 UTC) #13
Zhiqiang Zhang (Slow)
sgtm. Thanks for improving the null-string case.
4 years, 1 month ago (2016-11-01 13:37:47 UTC) #16
yzshen1
Also +Kentaro for OWNER review since Elliot is OOO currently. Thanks!
4 years, 1 month ago (2016-11-01 15:50:22 UTC) #23
Tom Sepez
Still got red bots, but I think this works. https://codereview.chromium.org/2464793004/diff/80001/mojo/common/common_custom_types_struct_traits.h File mojo/common/common_custom_types_struct_traits.h (right): https://codereview.chromium.org/2464793004/diff/80001/mojo/common/common_custom_types_struct_traits.h#newcode28 mojo/common/common_custom_types_struct_traits.h:28: ...
4 years, 1 month ago (2016-11-01 17:22:13 UTC) #26
yzshen1
Thanks Tom! https://codereview.chromium.org/2464793004/diff/80001/mojo/common/common_custom_types_struct_traits.h File mojo/common/common_custom_types_struct_traits.h (right): https://codereview.chromium.org/2464793004/diff/80001/mojo/common/common_custom_types_struct_traits.h#newcode28 mojo/common/common_custom_types_struct_traits.h:28: return !version.IsValid(); On 2016/11/01 17:22:12, Tom Sepez ...
4 years, 1 month ago (2016-11-01 18:07:19 UTC) #28
Tom Sepez
> However, there is a feature request to make this more strongly typed (or at ...
4 years, 1 month ago (2016-11-01 18:42:07 UTC) #30
haraken
LGTM with comments. https://codereview.chromium.org/2464793004/diff/120001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp File third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp (right): https://codereview.chromium.org/2464793004/diff/120001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp#newcode18 third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp:18: output->swap(result); Maybe we can introduce String::setToNull(). ...
4 years, 1 month ago (2016-11-02 01:58:46 UTC) #33
yzshen1
Thanks, Kentaro! https://codereview.chromium.org/2464793004/diff/120001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp File third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp (right): https://codereview.chromium.org/2464793004/diff/120001/third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp#newcode18 third_party/WebKit/Source/platform/mojo/CommonCustomTypesStructTraits.cpp:18: output->swap(result); On 2016/11/02 01:58:46, haraken wrote: > ...
4 years, 1 month ago (2016-11-02 17:08:19 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2464793004/160001
4 years, 1 month ago (2016-11-02 17:08:48 UTC) #37
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 1 month ago (2016-11-02 20:54:27 UTC) #39
commit-bot: I haz the power
4 years, 1 month ago (2016-11-02 20:56:23 UTC) #41
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/510a9fab8b58db770bc5ce698612dec9b7163df8
Cr-Commit-Position: refs/heads/master@{#429397}

Powered by Google App Engine
This is Rietveld 408576698