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

Issue 1061413002: Shell: Make a separate binary for child processes. (Closed)

Created:
5 years, 8 months ago by viettrungluu
Modified:
5 years, 8 months ago
Reviewers:
DaveMoore, qsr
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Shell: Make separate binary for child processes. To do (separately): Slim down the deps for the child process. For comparison, on an Android Debug build, the stripped binary for the main process is ~2.4 MB whereas the child is ~850 kB (as seen in MojoShell.apk). R=davemoore@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/e0a4a1866c09a92d34539c652e0301fcb70c65c6

Patch Set 1 #

Patch Set 2 : those tests are already disabledgit commit -a 1git commit -a 1! #

Patch Set 3 : rebased #

Total comments: 2

Patch Set 4 : Don't look at kChildProcess in desktop/main.cc. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -130 lines) Patch
M shell/BUILD.gn View 1 2 3 6 chunks +29 lines, -7 lines 0 comments Download
M shell/android/apk/src/org/chromium/mojo/shell/ShellMain.java View 5 chunks +18 lines, -3 lines 1 comment Download
M shell/android/main.cc View 5 chunks +24 lines, -6 lines 1 comment Download
D shell/child_main.h View 1 chunk +0 lines, -20 lines 0 comments Download
M shell/child_main.cc View 4 chunks +19 lines, -14 lines 0 comments Download
M shell/child_process_host.cc View 1 chunk +1 line, -0 lines 0 comments Download
M shell/context.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M shell/context.cc View 1 2 3 1 chunk +12 lines, -4 lines 0 comments Download
M shell/desktop/main.cc View 1 2 3 2 chunks +54 lines, -67 lines 0 comments Download
M shell/shell_test_main.cc View 1 chunk +2 lines, -7 lines 0 comments Download
M shell/switches.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
viettrungluu
5 years, 8 months ago (2015-04-07 21:33:13 UTC) #2
DaveMoore
https://codereview.chromium.org/1061413002/diff/40001/shell/child_main.cc File shell/child_main.cc (right): https://codereview.chromium.org/1061413002/diff/40001/shell/child_main.cc#newcode291 shell/child_main.cc:291: switches::kChildProcess)); this seems unnecessary. Why bother with having a ...
5 years, 8 months ago (2015-04-07 22:27:30 UTC) #3
viettrungluu
On 2015/04/07 22:27:30, DaveMoore wrote: > https://codereview.chromium.org/1061413002/diff/40001/shell/child_main.cc > File shell/child_main.cc (right): > > https://codereview.chromium.org/1061413002/diff/40001/shell/child_main.cc#newcode291 > ...
5 years, 8 months ago (2015-04-07 22:35:25 UTC) #4
DaveMoore
lgtm
5 years, 8 months ago (2015-04-07 23:13:33 UTC) #5
viettrungluu
Committed patchset #4 (id:60001) manually as e0a4a1866c09a92d34539c652e0301fcb70c65c6 (presubmit successful).
5 years, 8 months ago (2015-04-07 23:28:06 UTC) #6
qsr
5 years, 8 months ago (2015-04-08 09:27:44 UTC) #8
Message was sent while issue was closed.
https://codereview.chromium.org/1061413002/diff/60001/shell/android/apk/src/o...
File shell/android/apk/src/org/chromium/mojo/shell/ShellMain.java (right):

https://codereview.chromium.org/1061413002/diff/60001/shell/android/apk/src/o...
shell/android/apk/src/org/chromium/mojo/shell/ShellMain.java:30: // Not really
an executable, but what we'll use for "argv[0]" (along with the path).
It is an executable. android executable are pie, which mean they can be used as
shared libraries. Now, if we do not execute it anymore, we do not need to set it
to argv[0] anymore.

https://codereview.chromium.org/1061413002/diff/60001/shell/android/main.cc
File shell/android/main.cc (right):

https://codereview.chromium.org/1061413002/diff/60001/shell/android/main.cc#n...
shell/android/main.cc:230: // TODO(vtl): We need a main(), even though it should
never be called.
If we do not need to run this anymore, I'll need to redefine this as a
shared_library instead of an executable, and we won't need this main anymore.

Powered by Google App Engine
This is Rietveld 408576698