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

Issue 8893009: Move content::MakeSharedMemorySegmentViaIPC into its own file (Closed)

Created:
9 years ago by Roland McGrath
Modified:
9 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, dpranke-watch+content_chromium.org
Visibility:
Public.

Description

Move content::MakeSharedMemorySegmentViaIPC into its own file The nacl_helper program uses content::MakeSharedMemorySegmentViaIPC but none of the other proxy functions in the same source file. Some of those functions refer to symbols that bring in a great deal of other code, e.g. most of v8. We don't want all that code linked into nacl_helper--it bloats the binary by a factor of ten or so. Moving the function out to its own file prevents the other dependencies coming in unnecessarily. BUG= http://code.google.com/p/chromium/issues/detail?id=106986 TEST= still builds and nacl_helper binary is much smaller R=jam@chromium.org,bradchen@google.com Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114539

Patch Set 1 #

Patch Set 2 : ftso gyp #

Patch Set 3 : minimal dependencies #

Total comments: 2

Patch Set 4 : put function directly in nacl code #

Patch Set 5 : back to like patch set 3 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -25 lines) Patch
M chrome/nacl.gypi View 1 2 3 4 2 chunks +4 lines, -4 lines 1 comment Download
M content/common/child_process_sandbox_support_impl_linux.h View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M content/common/child_process_sandbox_support_impl_linux.cc View 1 2 3 4 2 chunks +1 line, -21 lines 1 comment Download
A content/common/child_process_sandbox_support_impl_shm_linux.cc View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Roland McGrath
9 years ago (2011-12-09 20:36:11 UTC) #1
jam
This sort of tricks are not maintainable. We used to have tons of ifdefs for ...
9 years ago (2011-12-10 00:29:47 UTC) #2
Brad Chen (chromium)
John, I don't quite understand your objection here. There aren't any ifdefs involved here, only ...
9 years ago (2011-12-10 14:12:47 UTC) #3
jam
My issue is with wanting to build a small target (nacl_helper), but having it depend ...
9 years ago (2011-12-10 17:00:38 UTC) #4
Brad Chen
Okay; so we could make nacl_helper depend on a bunch of cc files instead of ...
9 years ago (2011-12-10 17:29:02 UTC) #5
jam
On Sat, Dec 10, 2011 at 7:28 PM, Brad Chen <bradchen@google.com> wrote: > Okay; so ...
9 years ago (2011-12-11 00:17:07 UTC) #6
Use chromium.org instead
I'm already working on doing John's initial suggestion of listing the individual source files. It's ...
9 years ago (2011-12-12 17:51:10 UTC) #7
Roland McGrath
I've changed the build rules to use minimal dependencies. PTAL
9 years ago (2011-12-12 19:06:34 UTC) #8
jam
http://codereview.chromium.org/8893009/diff/6002/content/common/child_process_sandbox_support_impl_shm_linux.cc File content/common/child_process_sandbox_support_impl_shm_linux.cc (right): http://codereview.chromium.org/8893009/diff/6002/content/common/child_process_sandbox_support_impl_shm_linux.cc#newcode1 content/common/child_process_sandbox_support_impl_shm_linux.cc:1: // Copyright (c) 2011 The Chromium Authors. All rights ...
9 years ago (2011-12-14 01:14:28 UTC) #9
Roland McGrath
PTAL On 2011/12/14 01:14:28, John Abd-El-Malek wrote: > actually, looking at this more, there's only ...
9 years ago (2011-12-14 18:37:54 UTC) #10
jam
Roland: I apologize, but when I made my earlier comments, I completely forgot that the ...
9 years ago (2011-12-14 23:14:53 UTC) #11
jam
http://codereview.chromium.org/8893009/diff/18001/chrome/nacl.gypi File chrome/nacl.gypi (right): http://codereview.chromium.org/8893009/diff/18001/chrome/nacl.gypi#newcode146 chrome/nacl.gypi:146: '../content/common/child_process_sandbox_support_impl_shm_linux.cc', nit: ". cc" http://codereview.chromium.org/8893009/diff/18001/content/common/child_process_sandbox_support_impl_linux.cc File content/common/child_process_sandbox_support_impl_linux.cc (right): http://codereview.chromium.org/8893009/diff/18001/content/common/child_process_sandbox_support_impl_linux.cc#newcode12 ...
9 years ago (2011-12-15 01:08:31 UTC) #12
Roland McGrath
Note this was already landed and reverted because of some obscure build issues with nonstandard ...
9 years ago (2011-12-15 18:06:38 UTC) #13
jam
9 years ago (2011-12-15 23:46:11 UTC) #14
On 2011/12/15 18:06:38, Roland McGrath wrote:
> Note this was already landed and reverted because of some obscure build
> issues with nonstandard configurations that I'll be looking into today.  So
> I'll be sending a new version separately sometime soon, and you can review
> it freshly then.
> 
> On 2011/12/15 01:08:31, John Abd-El-Malek wrote:
> > http://codereview.chromium.org/8893009/diff/18001/chrome/nacl.gypi
> > File chrome/nacl.gypi (right):
> > 
> >
http://codereview.chromium.org/8893009/diff/18001/chrome/nacl.gypi#newcode146
> > chrome/nacl.gypi:146:
> > '../content/common/child_process_sandbox_support_impl_shm_linux.cc',
> > nit: ". cc"
> 
> Say what?

argh, i'm behind a funky mobile wireless proxy that's changing html. ignore this
:)
> 
> >
>
http://codereview.chromium.org/8893009/diff/18001/content/common/child_proces...
> > File content/common/child_process_sandbox_support_impl_linux.cc (right):
> > 
> >
>
http://codereview.chromium.org/8893009/diff/18001/content/common/child_proces...
> > content/common/child_process_sandbox_support_impl_linux.cc:12: #include
> > "content/common/child_process_sandbox_support_impl_linux.h"
> > nit: redundant
> 
> Oops!  I didn't notice the first one because it was out of order.
> Is there some style guideline that says the header directly for the
> thing being implemented is supposed to be in its own stanza and before
> the system (<...>) header #includes?

yep:
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Names_and_Orde...

this helps avoid sudden compile errors when someone else includes a header,
because it doesn't include everything that it needs
> 
> 
> Thanks,
> Roland

Powered by Google App Engine
This is Rietveld 408576698