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

Issue 1821073002: Mojo bindings: Fix typemap includes. (Closed)

Created:
4 years, 9 months ago by Sam McNally
Modified:
4 years, 9 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo bindings: Fix typemap includes. Previously, a header defining a StructTraits specialization could not include its corresponding generated mojom header, due to the mojom header including the StructTraits header. This required a brittle set of forward declarations to correctly avoid this; in practice, this mostly led to StructTraits that were nominally for a particular variant, but included the generated mojom header from the default variant. This CL fixes the issue by splitting typemap headers into public_headers, which define the native type and are included by the generated mojom header, and headers which define the StructTraits specialization for the native type and are only included by the generated mojom source file, allowing the StructTraits header to include the generated mojom header. BUG=596202 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/a1107b7873a0b930ff197da68c3eaacd751839d5 Cr-Commit-Position: refs/heads/master@{#382893}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 16

Patch Set 6 : #

Total comments: 10

Patch Set 7 : #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -347 lines) Patch
M components/mus/ws/window_manager_factory_service.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/common/BUILD.gn View 2 chunks +1 line, -1 line 0 comments Download
M content/content_common_mojo_bindings.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/common/mojo.typemap View 1 2 3 4 5 1 chunk +24 lines, -12 lines 0 comments Download
M mojo/mojo_edk_tests.gyp View 1 2 3 4 5 6 2 chunks +7 lines, -4 lines 0 comments Download
M mojo/mojo_public.gyp View 1 2 3 4 5 6 7 4 chunks +25 lines, -25 lines 0 comments Download
M mojo/public/cpp/bindings/tests/BUILD.gn View 1 2 3 4 5 6 2 chunks +7 lines, -6 lines 0 comments Download
M mojo/public/cpp/bindings/tests/rect_blink.h View 2 chunks +0 lines, -21 lines 0 comments Download
A mojo/public/cpp/bindings/tests/rect_blink_traits.h View 1 chunk +36 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/rect_chromium.h View 2 chunks +1 line, -20 lines 0 comments Download
A mojo/public/cpp/bindings/tests/rect_chromium_traits.h View 1 chunk +35 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_with_traits_impl.h View 1 chunk +0 lines, -26 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_with_traits_impl.cc View 2 chunks +0 lines, -14 lines 0 comments Download
A + mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h View 3 chunks +4 lines, -37 lines 0 comments Download
A + mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.cc View 1 chunk +1 line, -9 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/BUILD.gn View 1 2 3 4 5 6 3 chunks +25 lines, -36 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/blink_test.typemap View 1 2 3 4 5 1 chunk +10 lines, -7 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/chromium_test.typemap View 1 2 3 4 5 1 chunk +10 lines, -7 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/rect.mojom View 1 chunk +9 lines, -0 lines 0 comments Download
M mojo/public/interfaces/bindings/tests/struct_with_traits.typemap View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M mojo/public/interfaces/bindings/tests/test_native_types.mojom View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -6 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl View 1 chunk +0 lines, -3 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.cc.tmpl View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl View 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_definition.tmpl View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/mojom_cpp_generator.py View 1 2 3 4 5 6 5 chunks +80 lines, -56 lines 0 comments Download
M mojo/public/tools/bindings/mojom.gni View 1 2 3 4 5 1 chunk +9 lines, -4 lines 0 comments Download
M url/mojo/BUILD.gn View 2 chunks +1 line, -14 lines 2 comments Download
M url/mojo/gurl.typemap View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M url/mojo/origin.typemap View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M url/url.gyp View 1 2 3 2 chunks +3 lines, -34 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
Sam McNally
4 years, 9 months ago (2016-03-22 17:15:38 UTC) #5
yzshen1
First part of comments... Thanks! https://codereview.chromium.org/1821073002/diff/80001/gpu/command_buffer/common/mojo.typemap File gpu/command_buffer/common/mojo.typemap (right): https://codereview.chromium.org/1821073002/diff/80001/gpu/command_buffer/common/mojo.typemap#newcode12 gpu/command_buffer/common/mojo.typemap:12: "headers": [ Could we ...
4 years, 9 months ago (2016-03-22 17:43:32 UTC) #6
Ken Rockot(use gerrit already)
https://codereview.chromium.org/1821073002/diff/80001/url/mojo/origin.typemap File url/mojo/origin.typemap (right): https://codereview.chromium.org/1821073002/diff/80001/url/mojo/origin.typemap#newcode12 url/mojo/origin.typemap:12: "headers": [ nit: I wonder if we should rename ...
4 years, 9 months ago (2016-03-22 18:00:10 UTC) #7
Sam McNally
https://codereview.chromium.org/1821073002/diff/80001/gpu/command_buffer/common/mojo.typemap File gpu/command_buffer/common/mojo.typemap (right): https://codereview.chromium.org/1821073002/diff/80001/gpu/command_buffer/common/mojo.typemap#newcode12 gpu/command_buffer/common/mojo.typemap:12: "headers": [ On 2016/03/22 17:43:32, yzshen1 wrote: > Could ...
4 years, 9 months ago (2016-03-22 19:22:03 UTC) #8
Ken Rockot(use gerrit already)
lgtm but please wait for yuzhu's full review
4 years, 9 months ago (2016-03-22 19:28:40 UTC) #9
yzshen1
https://codereview.chromium.org/1821073002/diff/80001/mojo/mojo_public.gyp File mojo/mojo_public.gyp (right): https://codereview.chromium.org/1821073002/diff/80001/mojo/mojo_public.gyp#newcode405 mojo/mojo_public.gyp:405: 'public/interfaces/bindings/tests/math_calculator.mojom', On 2016/03/22 19:22:03, Sam McNally wrote: > On ...
4 years, 9 months ago (2016-03-22 20:29:14 UTC) #10
Sam McNally
https://codereview.chromium.org/1821073002/diff/80001/mojo/mojo_public.gyp File mojo/mojo_public.gyp (right): https://codereview.chromium.org/1821073002/diff/80001/mojo/mojo_public.gyp#newcode405 mojo/mojo_public.gyp:405: 'public/interfaces/bindings/tests/math_calculator.mojom', On 2016/03/22 20:29:13, yzshen1 wrote: > On 2016/03/22 ...
4 years, 9 months ago (2016-03-22 21:54:31 UTC) #11
yzshen1
LGTM https://codereview.chromium.org/1821073002/diff/140001/mojo/public/interfaces/bindings/tests/test_native_types.mojom File mojo/public/interfaces/bindings/tests/test_native_types.mojom (right): https://codereview.chromium.org/1821073002/diff/140001/mojo/public/interfaces/bindings/tests/test_native_types.mojom#newcode26 mojo/public/interfaces/bindings/tests/test_native_types.mojom:26: // TODO: crbug.com/596202 This line can be removed ...
4 years, 9 months ago (2016-03-22 23:19:19 UTC) #12
Sam McNally
+jam for everything outside //mojo https://codereview.chromium.org/1821073002/diff/140001/mojo/public/interfaces/bindings/tests/test_native_types.mojom File mojo/public/interfaces/bindings/tests/test_native_types.mojom (right): https://codereview.chromium.org/1821073002/diff/140001/mojo/public/interfaces/bindings/tests/test_native_types.mojom#newcode26 mojo/public/interfaces/bindings/tests/test_native_types.mojom:26: // TODO: crbug.com/596202 On ...
4 years, 9 months ago (2016-03-22 23:34:31 UTC) #14
jam
just one question https://codereview.chromium.org/1821073002/diff/160001/url/mojo/BUILD.gn File url/mojo/BUILD.gn (left): https://codereview.chromium.org/1821073002/diff/160001/url/mojo/BUILD.gn#oldcode7 url/mojo/BUILD.gn:7: mojom("url_mojom") { don't we want to ...
4 years, 9 months ago (2016-03-23 15:18:45 UTC) #15
Sam McNally
https://codereview.chromium.org/1821073002/diff/160001/url/mojo/BUILD.gn File url/mojo/BUILD.gn (left): https://codereview.chromium.org/1821073002/diff/160001/url/mojo/BUILD.gn#oldcode7 url/mojo/BUILD.gn:7: mojom("url_mojom") { On 2016/03/23 15:18:45, jam wrote: > don't ...
4 years, 9 months ago (2016-03-23 17:13:14 UTC) #16
jam
On 2016/03/23 17:13:14, Sam McNally wrote: > https://codereview.chromium.org/1821073002/diff/160001/url/mojo/BUILD.gn > File url/mojo/BUILD.gn (left): > > https://codereview.chromium.org/1821073002/diff/160001/url/mojo/BUILD.gn#oldcode7 ...
4 years, 9 months ago (2016-03-23 17:31:43 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1821073002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1821073002/160001
4 years, 9 months ago (2016-03-23 17:33:36 UTC) #20
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 9 months ago (2016-03-23 18:52:08 UTC) #21
commit-bot: I haz the power
4 years, 9 months ago (2016-03-23 18:55:04 UTC) #23
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/a1107b7873a0b930ff197da68c3eaacd751839d5
Cr-Commit-Position: refs/heads/master@{#382893}

Powered by Google App Engine
This is Rietveld 408576698