Consuming Blink mojoms from outside //content and Blink is weird |
|||
Issue descriptionI've seen two recent instances where a mojom outside //content wanted to use the regular variant of Blink mojoms: - https://chromium-review.googlesource.com/c/534133/ - https://chromium-review.googlesource.com/c/566764/ The problem is that depending on the mojom target itself doesn't work: it leads to fairly obscure compile errors. The root cause is that //third_party/WebKit/public:mojo_bindings can only be consumed from //content, as (my understanding is) it has private, unexported content dependencies. The solution for now has been to create a separate mojo bindings target for these interfaces, but it's a bit odd to slice the targets along whether or not they'll be used outside //content.
,
Oct 17
,
Dec 11
Triage. Updating this to clarify what the bug actually is. AFAICT this is only a problem because for a Blink-defined mojom, we often link the non-Blink variant into the content/common component (as described in comment #1) and export its symbols from there. And AFAICT there are only two reasons we do that: 1. A typemap has a dependency which belongs to content/common, and it's hard to factor out; or 2. A developer unnecessarily followed this pattern because other mojoms were doing it It seems to me that the solution is to have more granular bindings targets, and to migrate their typemap dependencies into isolated components, so this is a problem not with mojo bindings in general but with having massive component targets. It also seems like something that needs to be addressed on a per-mojom basis, rather than something to be solved by/within Mojo per se.
,
Dec 11
|
|||
►
Sign in to add a comment |
|||
Comment 1 by yzshen@chromium.org
, Jul 14 2017