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

Issue 2594203004: Unifying ChildProcessLauncher across platforms. (Closed)

Created:
4 years ago by Jay Civelli
Modified:
3 years, 11 months ago
CC:
chromium-reviews, jam, darin-cc_chromium.org, mac-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Unifying ChildProcessLauncher across platforms. Refactored ChildProcessLauncher in an attempt to unify the API across platforms and split the implementation in platform specific files, replacing the existing ifdef's spaghetti code. A new ref counted Helper class is added to ChildProcessLauncher that is used with the various posted tasks (ChildProcessLauncher is owned by the client code and can be destroyed at any point) and contains most of the platform specific code. In some cases, some minimal amount of code is duplicated in the platform specific files, but it keeps the code clearer and easier to follow. Non trivial shared code between Posix implementations is in child_process_launcher_posix.cc. BUG=675294 Review-Url: https://codereview.chromium.org/2594203004 Cr-Commit-Position: refs/heads/master@{#444442} Committed: https://chromium.googlesource.com/chromium/src/+/828cd7f49f285857a741f6f255193ca6bbb011cd

Patch Set 1 #

Patch Set 2 : Linux and Android working. #

Patch Set 3 : Windows working. #

Patch Set 4 : Clean-up. #

Patch Set 5 : Mac compiling. #

Patch Set 6 : More work. #

Patch Set 7 : Mac running. #

Patch Set 8 : Fix Mac. #

Patch Set 9 : Now work on all platforms. #

Patch Set 10 : Fix Windows test. #

Patch Set 11 : Fixed Mac tests. #

Total comments: 30

Patch Set 12 : Addressed boliu@'s comments. #

Total comments: 29

Patch Set 13 : Addressed boliu@'s comments #

Total comments: 14

Patch Set 14 : Addressed jam@'s and boliu@'s comments #

Patch Set 15 : Fix builds. #

Patch Set 16 : Fixed Win build. #

Patch Set 17 : Clean-up. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1189 lines, -579 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +8 lines, -0 lines 0 comments Download
D content/browser/android/child_process_launcher_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -13 lines 0 comments Download
D content/browser/android/child_process_launcher_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -10 lines 0 comments Download
M content/browser/browser_child_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/child_process_launcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +29 lines, -29 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +49 lines, -499 lines 0 comments Download
A content/browser/child_process_launcher_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +191 lines, -0 lines 0 comments Download
A content/browser/child_process_launcher_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +165 lines, -0 lines 0 comments Download
A content/browser/child_process_launcher_helper_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +183 lines, -0 lines 0 comments Download
A content/browser/child_process_launcher_helper_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +176 lines, -0 lines 0 comments Download
A content/browser/child_process_launcher_helper_mac.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +150 lines, -0 lines 0 comments Download
A content/browser/child_process_launcher_helper_posix.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +38 lines, -0 lines 0 comments Download
A content/browser/child_process_launcher_helper_posix.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +43 lines, -0 lines 0 comments Download
A content/browser/child_process_launcher_helper_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +119 lines, -0 lines 0 comments Download
M content/browser/file_descriptor_info_impl.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/browser/file_descriptor_info_impl.cc View 1 2 3 4 5 6 2 chunks +5 lines, -3 lines 0 comments Download
M content/browser/file_descriptor_info_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -9 lines 0 comments Download
M content/public/browser/browser_message_filter.cc View 1 2 3 4 2 chunks +3 lines, -10 lines 0 comments Download
M content/public/browser/file_descriptor_info.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 62 (47 generated)
Jay Civelli
3 years, 11 months ago (2017-01-11 01:00:45 UTC) #15
boliu
I only traced through the android start up sequence, probably need to check other platforms ...
3 years, 11 months ago (2017-01-12 02:00:07 UTC) #23
Jay Civelli
https://codereview.chromium.org/2594203004/diff/200001/content/browser/android/child_process_launcher_android_jni.cc File content/browser/android/child_process_launcher_android_jni.cc (right): https://codereview.chromium.org/2594203004/diff/200001/content/browser/android/child_process_launcher_android_jni.cc#newcode137 content/browser/android/child_process_launcher_android_jni.cc:137: auto region = files_to_register->GetRegionAt(i); On 2017/01/12 02:00:07, boliu wrote: ...
3 years, 11 months ago (2017-01-12 23:05:41 UTC) #26
Jay Civelli
On 2017/01/12 02:00:07, boliu wrote: > I only traced through the android start up sequence, ...
3 years, 11 months ago (2017-01-12 23:10:28 UTC) #27
boliu
didn't have time to look at more code, but had one reply also CL descriptions ...
3 years, 11 months ago (2017-01-13 01:33:50 UTC) #28
Jay Civelli
On 2017/01/13 01:33:50, boliu wrote: > didn't have time to look at more code, but ...
3 years, 11 months ago (2017-01-13 18:07:26 UTC) #30
Jay Civelli
https://codereview.chromium.org/2594203004/diff/200001/content/browser/child_process_launcher_android.cc File content/browser/child_process_launcher_android.cc (right): https://codereview.chromium.org/2594203004/diff/200001/content/browser/child_process_launcher_android.cc#newcode148 content/browser/child_process_launcher_android.cc:148: new ChildProcessHelperHolder(this))); On 2017/01/13 01:33:50, boliu wrote: > On ...
3 years, 11 months ago (2017-01-13 18:08:01 UTC) #31
jam
first round of comments https://codereview.chromium.org/2594203004/diff/260001/content/browser/child_process_launcher.h File content/browser/child_process_launcher.h (right): https://codereview.chromium.org/2594203004/diff/260001/content/browser/child_process_launcher.h#newcode40 content/browser/child_process_launcher.h:40: using FileMappedForLaunch = base::HandlesToInheritVector ; ...
3 years, 11 months ago (2017-01-13 18:42:20 UTC) #32
boliu
all comments on older PS14, except that one about binding https://codereview.chromium.org/2594203004/diff/240001/content/browser/android/child_process_launcher_android_jni.h File content/browser/android/child_process_launcher_android_jni.h (right): https://codereview.chromium.org/2594203004/diff/240001/content/browser/android/child_process_launcher_android_jni.h#newcode15 ...
3 years, 11 months ago (2017-01-13 19:00:56 UTC) #33
Jay Civelli
https://codereview.chromium.org/2594203004/diff/240001/content/browser/android/child_process_launcher_android_jni.h File content/browser/android/child_process_launcher_android_jni.h (right): https://codereview.chromium.org/2594203004/diff/240001/content/browser/android/child_process_launcher_android_jni.h#newcode15 content/browser/android/child_process_launcher_android_jni.h:15: // Contains the methods either being called from or ...
3 years, 11 months ago (2017-01-17 17:50:03 UTC) #51
boliu
lgtm but I guess wait for other reviewers I didn't trace through and compare code ...
3 years, 11 months ago (2017-01-17 23:28:41 UTC) #55
jam
3 years, 11 months ago (2017-01-18 17:58:37 UTC) #56
jam
lgtm
3 years, 11 months ago (2017-01-18 17:58:39 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2594203004/340001
3 years, 11 months ago (2017-01-18 18:00:09 UTC) #59
commit-bot: I haz the power
3 years, 11 months ago (2017-01-18 19:51:20 UTC) #62
Message was sent while issue was closed.
Committed patchset #17 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/828cd7f49f285857a741f6f25519...

Powered by Google App Engine
This is Rietveld 408576698