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

Issue 759903002: Upgrade the windows specific version of LaunchProcess to avoid raw handles. (Closed)

Created:
6 years ago by rvargas (doing something else)
Modified:
6 years ago
CC:
chromium-reviews, extensions-reviews_chromium.org, chromoting-reviews_chromium.org, grt+watch_chromium.org, jam, wfh+watch_chromium.org, darin-cc_chromium.org, tfarina, chromium-apps-reviews_chromium.org, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Upgrade the windows specific version of LaunchProcess to avoid raw handles. This change implies that extensions::LaunchNativeProcess also changes to return base::Process, and that requires base::EnsureProcessTerminated to deal with base:Process (as it basically claims ownership of the process). This CL fixes some leaks all around. BUG=417532 Committed: https://crrev.com/6b687a5e232c80539772dc3dbe35b98095064c38 Cr-Commit-Position: refs/heads/master@{#306687} Committed: https://crrev.com/61812774784a9ad2e874e737ebc1b6507da314e2 Cr-Commit-Position: refs/heads/master@{#306963}

Patch Set 1 #

Total comments: 17

Patch Set 2 : Review feedback #

Total comments: 2

Patch Set 3 : Rebase #

Patch Set 4 : Fix chrome build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -108 lines) Patch
M base/process/kill.h View 2 chunks +4 lines, -3 lines 0 comments Download
M base/process/kill_mac.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/process/kill_posix.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M base/process/kill_win.cc View 1 5 chunks +12 lines, -15 lines 0 comments Download
M base/process/launch.h View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M base/process/launch_win.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M base/process/process_util_unittest.cc View 1 2 2 chunks +10 lines, -12 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host.h View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host.cc View 4 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_process_launcher.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_process_launcher.cc View 4 chunks +11 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc View 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_process_launcher_win.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/first_run/upgrade_util_win.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/uninstall_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/installer/gcapi/gcapi.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/installer/test/alternate_version_generator.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/installer/util/google_update_util.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/installer/util/install_util.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M cloud_print/virtual_driver/win/install/setup.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M components/storage_monitor/storage_monitor_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/zygote/zygote_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/setup/daemon_installer_win.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M win8/delegate_execute/chrome_util.cc View 1 2 3 4 chunks +9 lines, -8 lines 0 comments Download
M win8/test/metro_registration_helper.cc View 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 34 (6 generated)
rvargas (doing something else)
finnur -> extensions gab -> installer cpu -> everything else
6 years ago (2014-11-26 02:28:12 UTC) #2
grt (UTC plus 2)
https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (right): https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc#newcode154 chrome/browser/extensions/api/messaging/native_process_launcher_win.cc:154: base::Process cmd_process = base::LaunchProcess(command.c_str(), options); Gab discovered in crbug.com/436072 ...
6 years ago (2014-11-26 16:14:14 UTC) #3
rvargas (doing something else)
Thanks https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (right): https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc#newcode154 chrome/browser/extensions/api/messaging/native_process_launcher_win.cc:154: base::Process cmd_process = base::LaunchProcess(command.c_str(), options); On 2014/11/26 16:14:13, ...
6 years ago (2014-11-26 18:16:20 UTC) #4
grt (UTC plus 2)
On 2014/11/26 18:16:20, rvargas wrote: > Thanks > > https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc > File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc > (right): ...
6 years ago (2014-11-26 19:40:07 UTC) #5
rvargas (doing something else)
On 2014/11/26 19:40:07, grt wrote: > On 2014/11/26 18:16:20, rvargas wrote: > > Thanks > ...
6 years ago (2014-11-27 00:51:59 UTC) #6
gab
installer lgtm + comments/questions in other parts as I read all of this most interesting ...
6 years ago (2014-11-27 13:28:45 UTC) #7
Finnur
Extensions rubberstamp LGTM.
6 years ago (2014-11-27 13:58:10 UTC) #8
Finnur
... With one question: https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc File chrome/browser/extensions/api/messaging/native_message_process_host.cc (left): https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc#oldcode362 chrome/browser/extensions/api/messaging/native_message_process_host.cc:362: process_handle_ = base::kNullProcessHandle; Is it ...
6 years ago (2014-11-27 13:58:26 UTC) #9
gab
Replying to finnur inline. https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc File chrome/browser/extensions/api/messaging/native_message_process_host.cc (left): https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc#oldcode362 chrome/browser/extensions/api/messaging/native_message_process_host.cc:362: process_handle_ = base::kNullProcessHandle; On 2014/11/27 ...
6 years ago (2014-11-27 14:29:51 UTC) #10
Finnur
https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc File chrome/browser/extensions/api/messaging/native_message_process_host.cc (left): https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc#oldcode362 chrome/browser/extensions/api/messaging/native_message_process_host.cc:362: process_handle_ = base::kNullProcessHandle; Haven't used Pass() all that much, ...
6 years ago (2014-11-27 16:41:59 UTC) #11
gab
NP, explanation below. https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc File chrome/browser/extensions/api/messaging/native_message_process_host.cc (left): https://codereview.chromium.org/759903002/diff/1/chrome/browser/extensions/api/messaging/native_message_process_host.cc#oldcode362 chrome/browser/extensions/api/messaging/native_message_process_host.cc:362: process_handle_ = base::kNullProcessHandle; On 2014/11/27 16:41:59, ...
6 years ago (2014-11-27 16:47:39 UTC) #12
rvargas (doing something else)
Thanks for all the comments. Updated a new version. https://codereview.chromium.org/759903002/diff/1/base/process/kill_win.cc File base/process/kill_win.cc (right): https://codereview.chromium.org/759903002/diff/1/base/process/kill_win.cc#newcode53 base/process/kill_win.cc:53: ...
6 years ago (2014-12-01 20:50:36 UTC) #13
gab
lgtm++ https://codereview.chromium.org/759903002/diff/1/base/process/kill_win.cc File base/process/kill_win.cc (right): https://codereview.chromium.org/759903002/diff/1/base/process/kill_win.cc#newcode53 base/process/kill_win.cc:53: Process process_; On 2014/12/01 20:50:36, rvargas wrote: > ...
6 years ago (2014-12-01 21:31:05 UTC) #14
cpu_(ooo_6.6-7.5)
lgtm with one question. Second I think you need owners for remoting and for UI. ...
6 years ago (2014-12-01 22:36:13 UTC) #15
cpu_(ooo_6.6-7.5)
nevermind on the UI file, that file lgtm
6 years ago (2014-12-01 22:37:35 UTC) #16
rvargas (doing something else)
Thanks. +wez for remoting. https://codereview.chromium.org/759903002/diff/20001/components/storage_monitor/storage_monitor_linux.cc File components/storage_monitor/storage_monitor_linux.cc (right): https://codereview.chromium.org/759903002/diff/20001/components/storage_monitor/storage_monitor_linux.cc#newcode218 components/storage_monitor/storage_monitor_linux.cc:218: if (!base::LaunchProcess(command, options, &handle)) On ...
6 years ago (2014-12-01 23:02:54 UTC) #18
rvargas (doing something else)
I forgot to reply to this comment. https://codereview.chromium.org/759903002/diff/1/base/process/kill_win.cc File base/process/kill_win.cc (right): https://codereview.chromium.org/759903002/diff/1/base/process/kill_win.cc#newcode53 base/process/kill_win.cc:53: Process process_; ...
6 years ago (2014-12-02 21:07:47 UTC) #19
rvargas (doing something else)
+sergeyu for remoting
6 years ago (2014-12-03 20:25:04 UTC) #21
Wez
remoting/ LGTM
6 years ago (2014-12-03 20:33:58 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759903002/40001
6 years ago (2014-12-03 21:06:54 UTC) #25
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years ago (2014-12-03 22:24:28 UTC) #26
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/6b687a5e232c80539772dc3dbe35b98095064c38 Cr-Commit-Position: refs/heads/master@{#306687}
6 years ago (2014-12-03 22:25:14 UTC) #27
Rune Fevang
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/780653003/ by rfevang@chromium.org. ...
6 years ago (2014-12-03 23:41:24 UTC) #28
rvargas (doing something else)
cpu, do you mind looking at the change to win8/delegate_execute/chrome_util.cc ?
6 years ago (2014-12-04 02:28:50 UTC) #29
cpu_(ooo_6.6-7.5)
lgtm
6 years ago (2014-12-04 23:55:07 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759903002/60001
6 years ago (2014-12-05 01:27:23 UTC) #32
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years ago (2014-12-05 03:15:11 UTC) #33
commit-bot: I haz the power
6 years ago (2014-12-05 03:15:53 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/61812774784a9ad2e874e737ebc1b6507da314e2
Cr-Commit-Position: refs/heads/master@{#306963}

Powered by Google App Engine
This is Rietveld 408576698