|
|
Created:
4 years ago by leonhsl(Using Gerrit) Modified:
3 years, 11 months ago CC:
chromium-reviews, blink-reviews, dglazkov+blink, blink-reviews-api_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix Windows build warning LNK4217 for blink_platform.dll.
[1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink
==> [2] cc/ipc:interfaces_blink
==> [3] gpu/ipc/common:interfaces_blink
The above three targets are all linked into blink_platform.dll,
but [2] and [3] use gfx.mojom.Size typemap defined in
third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h},
which is exported from bink_platform.dll.
Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h
while themselves are part of blink_platform.dll, means they are
importing(dllimport) local defined symbols marked as dllexport, caused LNK4217.
This CL moves this struct traits to a separate source_set target,
instead of exporting it from blink_platform.dll.
BUG=654776, 669352
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Review-Url: https://codereview.chromium.org/2574593003
Cr-Commit-Position: refs/heads/master@{#443994}
Committed: https://chromium.googlesource.com/chromium/src/+/4724c1ac34d346dd8b44c4abc33b344a744a2d69
Patch Set 1 #Patch Set 2 : cc/ipc:interfaces_blink #Patch Set 3 : gpu/ipc/common:interfaces_blink #
Total comments: 1
Patch Set 4 : Do not export geometry struct traits from blink_platform.dll #
Total comments: 2
Patch Set 5 : Address comments from Yuzhu #Patch Set 6 : Rebase, to get https://crrev.com/c868aae8f9b8d51461afff79064c75339e6ce30c #Patch Set 7 : No need to ignore {lnk4217, lnk4049} for blink_platform anymore #Patch Set 8 : Rebase #
Total comments: 5
Patch Set 9 : Rebase and change new code file's license 2016-->2017 #
Messages
Total messages: 76 (51 generated)
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Fix Windows build warning LNK4217 for blink_platform.dll. BUG=669352 ========== to ========== Fix Windows build warning LNK4217 for blink_platform.dll. BUG=669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
Description was changed from ========== Fix Windows build warning LNK4217 for blink_platform.dll. BUG=669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Fix Windows build warning LNK4217 for blink_platform.dll. [1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink ==> [2] cc/ipc:interfaces_blink ==> [3] gpu/ipc/common:interfaces_blink The above three targets are all linked into blink_platform.dll, but [2] and [3] use gfx.mojom.Size typemap defined in third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h}, which is exported from bink_platform.dll. Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h while themselves are part of blink_platform.dll, means they are importing(dllimport) local defined symbols, so we must add the same export macros to them to avoid LNK4217 warnings. BUG=669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
leon.han@intel.com changed reviewers: + jam@chromium.org, yzshen@chromium.org
Hi, would you PTAL at this? Thanks.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn File cc/ipc/BUILD.gn (right): https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn#newcode70 cc/ipc/BUILD.gn:70: export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" I don't understand this change and the next file. Why isn't coe in cc/ using CC_EXPORT?
On 2016/12/14 17:53:39, jam wrote: > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn > File cc/ipc/BUILD.gn (right): > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn#newcode70 > cc/ipc/BUILD.gn:70: export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" > I don't understand this change and the next file. > > Why isn't coe in cc/ using CC_EXPORT? I think the reason is these generated files are compiled into the blink platform target. If we want to make these files a separate target that blink platform depends on, we will need to move some typemapping related code out of blink platform as well. That seems possible in this case.
On 2016/12/14 18:09:53, yzshen1 wrote: > On 2016/12/14 17:53:39, jam wrote: > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn > > File cc/ipc/BUILD.gn (right): > > > > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn#newcode70 > > cc/ipc/BUILD.gn:70: export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" > > I don't understand this change and the next file. > > > > Why isn't coe in cc/ using CC_EXPORT? > > I think the reason is these generated files are compiled into the blink platform > target. > If we want to make these files a separate target that blink platform depends on, > we will need to move some typemapping related code out of blink platform as > well. That seems possible in this case. Hi John, These 2 mojom targets(cc/ipc:interfaces_blink and gpu/ipc/common:interfaces_blink): - are source_set, - are linked into blink_platform.dll, - call functions marked as 'blink export', that is gfx.mojom.size struct traits, - have no other parent target except blink_platform.dll. so we should also mark them as 'blink export'. Hi Yuzhu, Sorry I can't quite understand the suggestion about 'make these files a separate target', would you please help to elaborate more? Thanks:)
On 2016/12/15 03:06:49, leonhsl wrote: > On 2016/12/14 18:09:53, yzshen1 wrote: > > On 2016/12/14 17:53:39, jam wrote: > > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn > > > File cc/ipc/BUILD.gn (right): > > > > > > > > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn#newcode70 > > > cc/ipc/BUILD.gn:70: export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" > > > I don't understand this change and the next file. > > > > > > Why isn't coe in cc/ using CC_EXPORT? > > > > I think the reason is these generated files are compiled into the blink > platform > > target. > > If we want to make these files a separate target that blink platform depends > on, > > we will need to move some typemapping related code out of blink platform as > > well. That seems possible in this case. > > Hi John, > These 2 mojom targets(cc/ipc:interfaces_blink and > gpu/ipc/common:interfaces_blink): > - are source_set, > - are linked into blink_platform.dll, > - call functions marked as 'blink export', that is gfx.mojom.size struct > traits, > - have no other parent target except blink_platform.dll. > so we should also mark them as 'blink export'. > > Hi Yuzhu, > Sorry I can't quite understand the suggestion about 'make these files a separate > target', would you please help to elaborate more? Thanks:) I am fine with your current approach, that idea is a possible alternative. Take cc/ipc:interfaces_blink as example, we could: - create a separate component which links in the generated files of cc/ipc:interfaces_blink, for example, cc/ipc:interface_blink_component. (And we export those mojom definitions properly.) - and then let blink_platform depend on cc/ipc:interface_blink_component. - however, cc/ipc:interface_blink actually needs WebKit/Source/platform/mojo/GeometryStructTraits.{h, cc} because of typemapping, so we need to move those files out of blink_platform as well, either into a separate component or in cc/ipc:interface_blink_component. - usually those struct traits files depend on pretty complex types that are hard to pull out of the original targets. But in this case GeometryStructTraits.{h, cc} only depends on WebSize.h, and therefore shouldn't be a problem.
On 2016/12/15 18:34:58, yzshen1 wrote: > On 2016/12/15 03:06:49, leonhsl wrote: > > On 2016/12/14 18:09:53, yzshen1 wrote: > > > On 2016/12/14 17:53:39, jam wrote: > > > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn > > > > File cc/ipc/BUILD.gn (right): > > > > > > > > > > > > > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn#newcode70 > > > > cc/ipc/BUILD.gn:70: export_class_attribute_blink = "BLINK_PLATFORM_EXPORT" > > > > I don't understand this change and the next file. > > > > > > > > Why isn't coe in cc/ using CC_EXPORT? > > > > > > I think the reason is these generated files are compiled into the blink > > platform > > > target. > > > If we want to make these files a separate target that blink platform depends > > on, > > > we will need to move some typemapping related code out of blink platform as > > > well. That seems possible in this case. > > > > Hi John, > > These 2 mojom targets(cc/ipc:interfaces_blink and > > gpu/ipc/common:interfaces_blink): > > - are source_set, > > - are linked into blink_platform.dll, > > - call functions marked as 'blink export', that is gfx.mojom.size struct > > traits, > > - have no other parent target except blink_platform.dll. > > so we should also mark them as 'blink export'. > > > > Hi Yuzhu, > > Sorry I can't quite understand the suggestion about 'make these files a > separate > > target', would you please help to elaborate more? Thanks:) > > > I am fine with your current approach, that idea is a possible alternative. Take > cc/ipc:interfaces_blink as example, we could: > - create a separate component which links in the generated files of > cc/ipc:interfaces_blink, for example, cc/ipc:interface_blink_component. (And we > export those mojom definitions properly.) > - and then let blink_platform depend on cc/ipc:interface_blink_component. > - however, cc/ipc:interface_blink actually needs > WebKit/Source/platform/mojo/GeometryStructTraits.{h, cc} because of typemapping, > so we need to move those files out of blink_platform as well, either into a > separate component or in cc/ipc:interface_blink_component. > - usually those struct traits files depend on pretty complex types that are hard > to pull out of the original targets. But in this case GeometryStructTraits.{h, > cc} only depends on WebSize.h, and therefore shouldn't be a problem. Understood and thanks! Friendly ping John, WDYT? Thanks.
On 2016/12/16 03:15:14, leonhsl wrote: > On 2016/12/15 18:34:58, yzshen1 wrote: > > On 2016/12/15 03:06:49, leonhsl wrote: > > > On 2016/12/14 18:09:53, yzshen1 wrote: > > > > On 2016/12/14 17:53:39, jam wrote: > > > > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn > > > > > File cc/ipc/BUILD.gn (right): > > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/2574593003/diff/40001/cc/ipc/BUILD.gn#newcode70 > > > > > cc/ipc/BUILD.gn:70: export_class_attribute_blink = > "BLINK_PLATFORM_EXPORT" > > > > > I don't understand this change and the next file. > > > > > > > > > > Why isn't coe in cc/ using CC_EXPORT? > > > > > > > > I think the reason is these generated files are compiled into the blink > > > platform > > > > target. > > > > If we want to make these files a separate target that blink platform > depends > > > on, > > > > we will need to move some typemapping related code out of blink platform > as > > > > well. That seems possible in this case. > > > > > > Hi John, > > > These 2 mojom targets(cc/ipc:interfaces_blink and > > > gpu/ipc/common:interfaces_blink): > > > - are source_set, > > > - are linked into blink_platform.dll, > > > - call functions marked as 'blink export', that is gfx.mojom.size struct > > > traits, > > > - have no other parent target except blink_platform.dll. > > > so we should also mark them as 'blink export'. > > > > > > Hi Yuzhu, > > > Sorry I can't quite understand the suggestion about 'make these files a > > separate > > > target', would you please help to elaborate more? Thanks:) > > > > > > I am fine with your current approach, that idea is a possible alternative. > Take > > cc/ipc:interfaces_blink as example, we could: > > - create a separate component which links in the generated files of > > cc/ipc:interfaces_blink, for example, cc/ipc:interface_blink_component. (And > we > > export those mojom definitions properly.) > > - and then let blink_platform depend on cc/ipc:interface_blink_component. > > - however, cc/ipc:interface_blink actually needs > > WebKit/Source/platform/mojo/GeometryStructTraits.{h, cc} because of > typemapping, > > so we need to move those files out of blink_platform as well, either into a > > separate component or in cc/ipc:interface_blink_component. > > - usually those struct traits files depend on pretty complex types that are > hard > > to pull out of the original targets. But in this case GeometryStructTraits.{h, > > cc} only depends on WebSize.h, and therefore shouldn't be a problem. > > Understood and thanks! > > Friendly ping John, WDYT? Thanks. Yes that sounds like a better approach, it's odd to see src/cc targets using BLINK_PLATFORM_EXPORT=1 and that could also make things fragile
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_trusty_blink_rel on master.tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_trusty_blink_rel/b...) android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm6...) cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Patchset #4 (id:60001) has been deleted
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Fix Windows build warning LNK4217 for blink_platform.dll. [1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink ==> [2] cc/ipc:interfaces_blink ==> [3] gpu/ipc/common:interfaces_blink The above three targets are all linked into blink_platform.dll, but [2] and [3] use gfx.mojom.Size typemap defined in third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h}, which is exported from bink_platform.dll. Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h while themselves are part of blink_platform.dll, means they are importing(dllimport) local defined symbols, so we must add the same export macros to them to avoid LNK4217 warnings. BUG=669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Fix Windows build warning LNK4217 for blink_platform.dll. [1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink ==> [2] cc/ipc:interfaces_blink ==> [3] gpu/ipc/common:interfaces_blink The above three targets are all linked into blink_platform.dll, but [2] and [3] use gfx.mojom.Size typemap defined in third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h}, which is exported from bink_platform.dll. Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h while themselves are part of blink_platform.dll, means they are importing(dllimport) local defined symbols marked as dllexport, caused LNK4217. This CL moves this struct traits to a separate source_set target, instead of exporting it from blink_platform.dll. BUG=669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Hi, Yuzhu, John, I considered another option maybe we can take, uploaded ps#4, which has passed all trybots and I've confirmed the LNK4217 warnings for blink_platform have also disappeared, would you PTAnL? Thanks.
leon.han@intel.com changed reviewers: + tsepez@chromium.org
+Tom, Thanks.
https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/mojo/BUILD.gn (right): https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mojo/BUILD.gn:13: "//ui/gfx/geometry/mojo:mojo_blink__generator", Can it depend on ui/gfx/geometry/mojo:mojo_shared_cpp_sources? __generator is not meant to be a public-facing target. You need to change the include in GeometryStructTraits.h to geometry.mojom-shared.h. And I don't think you need "//mojo/public/cpp/bindings:wtf_support" either.
On 2016/12/19 17:34:56, yzshen1 wrote: > https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour... > File third_party/WebKit/Source/platform/mojo/BUILD.gn (right): > > https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour... > third_party/WebKit/Source/platform/mojo/BUILD.gn:13: > "//ui/gfx/geometry/mojo:mojo_blink__generator", > Can it depend on ui/gfx/geometry/mojo:mojo_shared_cpp_sources? __generator is > not meant to be a public-facing target. > > You need to change the include in GeometryStructTraits.h to > geometry.mojom-shared.h. And I don't think you need > "//mojo/public/cpp/bindings:wtf_support" either. Code itself seems OK, but get sign-off from jam/yzshen on the layering.
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Uploaded ps#5, PTAnL, Thanks. #Also confirmed that LNK4217 warnings for blink_platform have disappeared. https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/mojo/BUILD.gn (right): https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/mojo/BUILD.gn:13: "//ui/gfx/geometry/mojo:mojo_blink__generator", On 2016/12/19 17:34:56, yzshen1 wrote: > Can it depend on ui/gfx/geometry/mojo:mojo_shared_cpp_sources? __generator is > not meant to be a public-facing target. > > You need to change the include in GeometryStructTraits.h to > geometry.mojom-shared.h. And I don't think you need > "//mojo/public/cpp/bindings:wtf_support" either. Done and Thanks. Understood more about traits now!
Description was changed from ========== Fix Windows build warning LNK4217 for blink_platform.dll. [1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink ==> [2] cc/ipc:interfaces_blink ==> [3] gpu/ipc/common:interfaces_blink The above three targets are all linked into blink_platform.dll, but [2] and [3] use gfx.mojom.Size typemap defined in third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h}, which is exported from bink_platform.dll. Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h while themselves are part of blink_platform.dll, means they are importing(dllimport) local defined symbols marked as dllexport, caused LNK4217. This CL moves this struct traits to a separate source_set target, instead of exporting it from blink_platform.dll. BUG=669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Fix Windows build warning LNK4217 for blink_platform.dll. [1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink ==> [2] cc/ipc:interfaces_blink ==> [3] gpu/ipc/common:interfaces_blink The above three targets are all linked into blink_platform.dll, but [2] and [3] use gfx.mojom.Size typemap defined in third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h}, which is exported from bink_platform.dll. Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h while themselves are part of blink_platform.dll, means they are importing(dllimport) local defined symbols marked as dllexport, caused LNK4217. This CL moves this struct traits to a separate source_set target, instead of exporting it from blink_platform.dll. BUG=654776,669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ==========
Soft ping~
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/12/23 00:38:57, leonhsl wrote: > Soft ping~ RS LGTM, but be sure about the layering.
Ping John and Yuzhu, thanks.
On 2017/01/06 09:53:56, leonhsl wrote: > Ping John and Yuzhu, thanks. LGTM Sorry I thought I have LGed.
Ping John~
The CQ bit was checked by leon.han@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
leon.han@intel.com changed reviewers: + haraken@chromium.org
+haraken@, would you mind to take an OWNER review for this? Thanks.
haraken@chromium.org changed reviewers: + esprehn@chromium.org
https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/mojo/BUILD.gn (right): https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/mojo/BUILD.gn:1: # Copyright 2016 The Chromium Authors. All rights reserved. 2017 https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h (right): https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h:9: #include "ui/gfx/geometry/mojo/geometry.mojom-shared.h" Would you help me understand what *-shared.h means? How is it different from *-blink.h? In general, our convention has been that we only include *-blink.h in Blink. +esprehn
Thank you for review! And sorry for my late reply.. https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/mojo/BUILD.gn (right): https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/mojo/BUILD.gn:1: # Copyright 2016 The Chromium Authors. All rights reserved. On 2017/01/16 12:31:46, haraken wrote: > > 2017 Acknowledged. https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h (right): https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h:9: #include "ui/gfx/geometry/mojo/geometry.mojom-shared.h" On 2017/01/16 12:31:46, haraken wrote: > > Would you help me understand what *-shared.h means? How is it different from > *-blink.h? > > In general, our convention has been that we only include *-blink.h in Blink. > > +esprehn xxx.mojom-shared.h is included by both xxx.mojom.h and xxx.mojom-blink.h, it defines xxx::mojom::FooDataView class used by mojo internal serialization/deserialization process for both xxx::mojom::Foo and xxx::mojom::blink::Foo, so actually just providing struct traits impl for xxx::mojom::FooDataView(defined in *-shared.h) is enough to do typemapping for both Chromium variant and Blink variant. Including xxx.mojom-blink.h instead would possibly bring in some unnecessary headers/deps. I switched to use *-shared.h at ps#5 to address comments from Yuzhu at https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour.... Also, I found some other places in Blink are using *-shared.h in struct traits: https://cs.chromium.org/search/?q=mojom-shared.h+file:%5Esrc/third_party/WebK... And actually this CL is doing the similar work with third_party/WebKit/public/web/window_features.typemap, putting struct traits impl into a separate source_set target which is declared as a dep by the xxxx.typemap file.
On 2017/01/17 03:40:07, leonhsl wrote: > Thank you for review! And sorry for my late reply.. > > https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... > File third_party/WebKit/Source/platform/mojo/BUILD.gn (right): > > https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... > third_party/WebKit/Source/platform/mojo/BUILD.gn:1: # Copyright 2016 The > Chromium Authors. All rights reserved. > On 2017/01/16 12:31:46, haraken wrote: > > > > 2017 > > Acknowledged. > > https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... > File third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h (right): > > https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... > third_party/WebKit/Source/platform/mojo/GeometryStructTraits.h:9: #include > "ui/gfx/geometry/mojo/geometry.mojom-shared.h" > On 2017/01/16 12:31:46, haraken wrote: > > > > Would you help me understand what *-shared.h means? How is it different from > > *-blink.h? > > > > In general, our convention has been that we only include *-blink.h in Blink. > > > > +esprehn > > xxx.mojom-shared.h is included by both xxx.mojom.h and xxx.mojom-blink.h, it > defines xxx::mojom::FooDataView class used by mojo internal > serialization/deserialization process for both xxx::mojom::Foo and > xxx::mojom::blink::Foo, so actually just providing struct traits impl for > xxx::mojom::FooDataView(defined in *-shared.h) is enough to do typemapping for > both Chromium variant and Blink variant. Including xxx.mojom-blink.h instead > would possibly bring in some unnecessary headers/deps. > I switched to use *-shared.h at ps#5 to address comments from Yuzhu at > https://codereview.chromium.org/2574593003/diff/80001/third_party/WebKit/Sour.... > > Also, I found some other places in Blink are using *-shared.h in struct traits: > https://cs.chromium.org/search/?q=mojom-shared.h+file:%5Esrc/third_party/WebK... > And actually this CL is doing the similar work with > third_party/WebKit/public/web/window_features.typemap, putting struct traits > impl into a separate source_set target which is declared as a dep by the > xxxx.typemap file. Thanks for the clarification. LGTM.
https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/mojo/BUILD.gn (right): https://codereview.chromium.org/2574593003/diff/160001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/mojo/BUILD.gn:1: # Copyright 2016 The Chromium Authors. All rights reserved. On 2017/01/17 03:40:07, leonhsl wrote: > On 2017/01/16 12:31:46, haraken wrote: > > > > 2017 > > Acknowledged. Done.
The CQ bit was checked by leon.han@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from tsepez@chromium.org, haraken@chromium.org, yzshen@chromium.org Link to the patchset: https://codereview.chromium.org/2574593003/#ps180001 (title: "Rebase and change new code file's license 2016-->2017")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 180001, "attempt_start_ts": 1484629573895000, "parent_rev": "acfaa8216d01efc4da558881290577e79b4c950b", "commit_rev": "4724c1ac34d346dd8b44c4abc33b344a744a2d69"}
Message was sent while issue was closed.
Description was changed from ========== Fix Windows build warning LNK4217 for blink_platform.dll. [1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink ==> [2] cc/ipc:interfaces_blink ==> [3] gpu/ipc/common:interfaces_blink The above three targets are all linked into blink_platform.dll, but [2] and [3] use gfx.mojom.Size typemap defined in third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h}, which is exported from bink_platform.dll. Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h while themselves are part of blink_platform.dll, means they are importing(dllimport) local defined symbols marked as dllexport, caused LNK4217. This CL moves this struct traits to a separate source_set target, instead of exporting it from blink_platform.dll. BUG=654776,669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel ========== to ========== Fix Windows build warning LNK4217 for blink_platform.dll. [1] third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink ==> [2] cc/ipc:interfaces_blink ==> [3] gpu/ipc/common:interfaces_blink The above three targets are all linked into blink_platform.dll, but [2] and [3] use gfx.mojom.Size typemap defined in third_party/WebKit/Source/platform/mojo/GeometryStructTraits.{cpp,h}, which is exported from bink_platform.dll. Thus, generated C++ bindings of [2] and [3] include GeometryStructTraits.h while themselves are part of blink_platform.dll, means they are importing(dllimport) local defined symbols marked as dllexport, caused LNK4217. This CL moves this struct traits to a separate source_set target, instead of exporting it from blink_platform.dll. BUG=654776,669352 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2574593003 Cr-Commit-Position: refs/heads/master@{#443994} Committed: https://chromium.googlesource.com/chromium/src/+/4724c1ac34d346dd8b44c4abc33b... ==========
Message was sent while issue was closed.
Committed patchset #9 (id:180001) as https://chromium.googlesource.com/chromium/src/+/4724c1ac34d346dd8b44c4abc33b... |