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

Issue 9425006: Make IPC_MESSAGE_EXPORT more robust. (Closed)

Created:
8 years, 10 months ago by Nico
Modified:
8 years, 10 months ago
Reviewers:
dmac, brettw, jam
CC:
chromium-reviews, hclam+watch_chromium.org, scherkus (not reviewing), acolwell+watch_chromium.org, fischman+watch_chromium.org, tfarina, ddorwin+watch_chromium.org, mihaip+watch_chromium.org, dcheng, annacc+watch_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, apatrick_chromium, brettw-cc_chromium.org, vrk (LEFT CHROMIUM), native-client-reviews_googlegroups.com, ihf+watch_chromium.org, Dirk Pranke
Visibility:
Public.

Description

Make IPC_MESSAGE_EXPORT more robust. Currently, files that want to export ipc messages currently do #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT at the top, and files that don't want to export ipc messages just do nothing. This is problematic if a cc file does #include "exported_messages.h" #include "not_exported_messages.h" because the second header file picks up the #define from the first file and declares all its messages as exported. In other translation units, where not_exported_messages.h is #included without another header above it, the messages will get default visibility – so the same class ends up with different visibilities in different translation units. Instead, let ipc_message_macros.h #undef IPC_MESSAGE_EXPORT outside of the include guard, so that all files that don't set the define see it as defined to nothing. (Idea from jam@) Also disable about:ipc in the component build, since ipc logging adds a dependency from chrome on all ipc message classes, so they would all have to be exported. BUG=90078 TEST=No linker errors about IPC messages when doing components build on mac. (Other linker errors remain for now.) TBR=brettw Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=122689 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=122828

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : tests #

Patch Set 4 : shell #

Patch Set 5 : importer tests #

Patch Set 6 : jammify #

Patch Set 7 : . #

Patch Set 8 : linux_shared links #

Patch Set 9 : disable ipc logging if components build enabled #

Patch Set 10 : fff #

Patch Set 11 : ffff #

Total comments: 1

Patch Set 12 : add comment #

Patch Set 13 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -6 lines) Patch
M content/common/intents_messages.h View 1 2 3 4 5 6 7 12 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/media/audio_messages.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/media/media_stream_messages.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/media/video_capture_messages.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/p2p_messages.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/socket_stream_messages.h View 1 2 3 4 5 6 7 8 9 10 12 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/utility_messages.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -0 lines 0 comments Download
M ipc/ipc_message.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -1 line 0 comments Download
M ipc/ipc_message_macros.h View 1 2 3 4 5 2 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Nico
Look at the ipc_message_macros.h change and one random _messages.h file to get the gist of ...
8 years, 10 months ago (2012-02-17 19:48:48 UTC) #1
dmac
lgtm
8 years, 10 months ago (2012-02-17 23:01:50 UTC) #2
Nico
+brettw for OWNERS
8 years, 10 months ago (2012-02-17 23:18:01 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9425006/2001
8 years, 10 months ago (2012-02-17 23:18:36 UTC) #4
commit-bot: I haz the power
Try job failure for 9425006-2001 (retry) on android for steps "build, Compile". It's a second ...
8 years, 10 months ago (2012-02-17 23:27:15 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9425006/1053
8 years, 10 months ago (2012-02-17 23:32:25 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9425006/1055
8 years, 10 months ago (2012-02-17 23:35:52 UTC) #7
commit-bot: I haz the power
Try job failure for 9425006-1055 (retry) on mac_rel for step "compile" (clobber build). It's a ...
8 years, 10 months ago (2012-02-18 00:28:44 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9425006/7006
8 years, 10 months ago (2012-02-18 00:33:54 UTC) #9
Nico
Patch set "jammify" is a lot simpler, thanks to a suggestion by jam. I'm going ...
8 years, 10 months ago (2012-02-18 01:26:16 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9425006/111
8 years, 10 months ago (2012-02-18 01:27:02 UTC) #11
jam
lgtm, thanks!
8 years, 10 months ago (2012-02-18 01:44:24 UTC) #12
commit-bot: I haz the power
Change committed as 122689
8 years, 10 months ago (2012-02-18 08:20:30 UTC) #13
Nico
This got reverted because it broke the windows shared builder. about_ipc_dialog.cc includes a file called ...
8 years, 10 months ago (2012-02-20 23:58:24 UTC) #14
Nico
On 2012/02/20 23:58:24, Nico wrote: > This got reverted because it broke the windows shared ...
8 years, 10 months ago (2012-02-21 02:56:48 UTC) #15
jam
On 2012/02/21 02:56:48, Nico wrote: > On 2012/02/20 23:58:24, Nico wrote: > > This got ...
8 years, 10 months ago (2012-02-21 03:42:57 UTC) #16
Nico
> I agree this sounds like the best solution (even if windows worked). but why ...
8 years, 10 months ago (2012-02-21 03:46:48 UTC) #17
jam
On 2012/02/21 03:46:48, Nico wrote: > > I agree this sounds like the best solution ...
8 years, 10 months ago (2012-02-21 04:13:10 UTC) #18
jam
http://codereview.chromium.org/9425006/diff/2019/ipc/ipc_message.h File ipc/ipc_message.h (right): http://codereview.chromium.org/9425006/diff/2019/ipc/ipc_message.h#newcode15 ipc/ipc_message.h:15: #if !defined(NDEBUG) && !defined(COMPONENT_BUILD) nit: please add a comment ...
8 years, 10 months ago (2012-02-21 04:13:21 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9425006/1074
8 years, 10 months ago (2012-02-21 14:36:26 UTC) #20
commit-bot: I haz the power
8 years, 10 months ago (2012-02-21 16:04:52 UTC) #21
Change committed as 122828

Powered by Google App Engine
This is Rietveld 408576698