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

Issue 2850903002: Clean up Linux zygote creation code (Closed)

Created:
3 years, 7 months ago by James Cook
Modified:
3 years, 7 months ago
Reviewers:
Greg K, jam, mdempsky
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, creis+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up Linux zygote creation code The browser code contains partial support for using multiple zygote processes, which exists to support Flash component updates. However, at present the browser process only creates a single zygote, on startup, and uses that for everything. Clean up the code to make that more clear. * Remove probably-unused lazy zygote creation code. * Always use ZygoteHandle instead of ZygoteHandle*. ZygoteHandle is always a pointer under the hood. * Add CHECKs to validate the assumption there is only one zygote. This came up while investigating a zygote check failure on Chrome OS. I'm concerned that the lazy-launch code could be starting a zygote during browser process shutdown. See crbug.com/692227 BUG=692227, 569191 TEST=manually load web pages, extensions and nacl apps to trigger child process creation, verify they load properly Review-Url: https://codereview.chromium.org/2850903002 Cr-Commit-Position: refs/heads/master@{#468331} Committed: https://chromium.googlesource.com/chromium/src/+/ca8595ada8cf0a185b7abc5d112c7e9dcd66e3bb

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -33 lines) Patch
M components/nacl/browser/nacl_process_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/browser_main_loop.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/child_process_launcher_helper_linux.cc View 1 chunk +10 lines, -13 lines 1 comment Download
M content/browser/ppapi_plugin_process_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/utility_process_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/zygote_host/zygote_communication_linux.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/zygote_host/zygote_handle_linux.cc View 1 chunk +14 lines, -7 lines 2 comments Download
M content/public/browser/zygote_handle_linux.h View 1 chunk +4 lines, -3 lines 0 comments Download
M content/public/common/sandboxed_process_launcher_delegate.h View 1 chunk +5 lines, -2 lines 0 comments Download
M content/public/common/sandboxed_process_launcher_delegate.cc View 2 chunks +4 lines, -2 lines 2 comments Download

Messages

Total messages: 18 (10 generated)
James Cook
kerrnel, please take a look. https://codereview.chromium.org/2850903002/diff/1/content/browser/child_process_launcher_helper_linux.cc File content/browser/child_process_launcher_helper_linux.cc (left): https://codereview.chromium.org/2850903002/diff/1/content/browser/child_process_launcher_helper_linux.cc#oldcode75 content/browser/child_process_launcher_helper_linux.cc:75: if (*zygote_handle == nullptr) ...
3 years, 7 months ago (2017-04-28 20:07:52 UTC) #4
Greg K
On 2017/04/28 20:07:52, James Cook wrote: > kerrnel, please take a look. > > https://codereview.chromium.org/2850903002/diff/1/content/browser/child_process_launcher_helper_linux.cc ...
3 years, 7 months ago (2017-04-28 20:51:40 UTC) #5
James Cook
mdempsky, can you take a look? Thanks.
3 years, 7 months ago (2017-04-28 21:39:12 UTC) #9
mdempsky
lgtm Like you identified, the pointer-to-handle pattern was used so we could centralize the code ...
3 years, 7 months ago (2017-04-28 22:13:45 UTC) #10
James Cook
jam, can I get OWNERS? mdempsky, thanks for the quick review.
3 years, 7 months ago (2017-04-28 22:16:39 UTC) #12
jam
lgtm
3 years, 7 months ago (2017-05-01 15:34:44 UTC) #13
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/2850903002/1
3 years, 7 months ago (2017-05-01 15:36:48 UTC) #15
commit-bot: I haz the power
3 years, 7 months ago (2017-05-01 16:58:50 UTC) #18
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/ca8595ada8cf0a185b7abc5d112c...

Powered by Google App Engine
This is Rietveld 408576698