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

Issue 1094653003: Refactor NaClProcessHost. Reduce chances to leak the resource. (Closed)

Created:
5 years, 8 months ago by hidehiko
Modified:
5 years, 7 months ago
Reviewers:
Mark Seaborn
CC:
chromium-reviews, hamaji, mazda
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor NaClProcessHost. Reduce chances to leak the resource. This is preparation to address review comments of https://codereview.chromium.org/1051243002/ Currently, there are some resource leak paths in nacl_process_host.cc. This CL removes those leaks, which are related to NaCl IPC types, defined in nacl_types.h. TEST=Ran bots. BUG=358417 Committed: https://crrev.com/b577bc48a00cd70600aa310eaf66faf3ec80758d Cr-Commit-Position: refs/heads/master@{#328698}

Patch Set 1 : #

Total comments: 29

Patch Set 2 : #

Total comments: 22

Patch Set 3 : Rebase #

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+195 lines, -141 lines) Patch
M components/nacl/browser/nacl_process_host.h View 1 2 chunks +6 lines, -4 lines 0 comments Download
M components/nacl/browser/nacl_process_host.cc View 1 2 3 5 chunks +168 lines, -102 lines 2 comments Download
M components/nacl/common/nacl_types.h View 1 2 3 4 chunks +3 lines, -24 lines 0 comments Download
M components/nacl/common/nacl_types.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/nacl/renderer/ppb_nacl_private_impl.cc View 1 2 3 7 chunks +16 lines, -9 lines 0 comments Download

Messages

Total messages: 26 (11 generated)
hidehiko
PTAL. Note: This is the CL for the preparation of addressing your comment https://codereview.chromium.org/1051243002/ (about ...
5 years, 8 months ago (2015-04-17 07:25:33 UTC) #4
hidehiko
On 2015/04/17 07:25:33, hidehiko wrote: > PTAL. > > Note: This is the CL for ...
5 years, 8 months ago (2015-04-17 07:33:08 UTC) #5
Mark Seaborn
https://codereview.chromium.org/1094653003/diff/40001/components/nacl/browser/nacl_process_host.cc File components/nacl/browser/nacl_process_host.cc (right): https://codereview.chromium.org/1094653003/diff/40001/components/nacl/browser/nacl_process_host.cc#newcode156 components/nacl/browser/nacl_process_host.cc:156: // Usually, NaClProcessHost is working on IO thread, where ...
5 years, 8 months ago (2015-04-17 22:13:45 UTC) #6
hidehiko
PTAL. Note: IPC between browser process and a plug-in process is addressed by other CLs ...
5 years, 7 months ago (2015-04-30 16:33:02 UTC) #12
hidehiko
On 2015/04/30 16:33:02, hidehiko wrote: > PTAL. > > Note: IPC between browser process and ...
5 years, 7 months ago (2015-05-01 16:27:01 UTC) #13
hidehiko
Friendly ping? On 2015/05/01 16:27:01, hidehiko wrote: > On 2015/04/30 16:33:02, hidehiko wrote: > > ...
5 years, 7 months ago (2015-05-01 16:27:18 UTC) #14
hidehiko
Friendly ping? On 2015/05/01 16:27:18, hidehiko wrote: > Friendly ping? > > On 2015/05/01 16:27:01, ...
5 years, 7 months ago (2015-05-04 16:21:43 UTC) #15
hidehiko
Friendly ping? On 2015/05/04 16:21:43, hidehiko wrote: > Friendly ping? > > On 2015/05/01 16:27:18, ...
5 years, 7 months ago (2015-05-06 13:17:27 UTC) #16
Mark Seaborn
In the commit message, can you say "FDs/handles" rather than "resources", to be more specific, ...
5 years, 7 months ago (2015-05-06 21:24:53 UTC) #17
hidehiko
Thank you for review. Submitting. https://codereview.chromium.org/1094653003/diff/140001/components/nacl/browser/nacl_process_host.cc File components/nacl/browser/nacl_process_host.cc (right): https://codereview.chromium.org/1094653003/diff/140001/components/nacl/browser/nacl_process_host.cc#newcode248 components/nacl/browser/nacl_process_host.cc:248: // class. This function ...
5 years, 7 months ago (2015-05-07 01:29:07 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1094653003/220001
5 years, 7 months ago (2015-05-07 01:31:12 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:220001)
5 years, 7 months ago (2015-05-07 03:46:13 UTC) #23
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/b577bc48a00cd70600aa310eaf66faf3ec80758d Cr-Commit-Position: refs/heads/master@{#328698}
5 years, 7 months ago (2015-05-07 03:47:40 UTC) #24
Mark Seaborn
https://codereview.chromium.org/1094653003/diff/220001/components/nacl/browser/nacl_process_host.cc File components/nacl/browser/nacl_process_host.cc (right): https://codereview.chromium.org/1094653003/diff/220001/components/nacl/browser/nacl_process_host.cc#newcode746 components/nacl/browser/nacl_process_host.cc:746: IPC::TakeFileHandleForProcess(socket_for_renderer_.Pass(), Looking again, I noticed that you're not checking ...
5 years, 7 months ago (2015-05-07 22:19:56 UTC) #25
hidehiko
5 years, 7 months ago (2015-05-11 12:08:35 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/1094653003/diff/220001/components/nacl/browse...
File components/nacl/browser/nacl_process_host.cc (right):

https://codereview.chromium.org/1094653003/diff/220001/components/nacl/browse...
components/nacl/browser/nacl_process_host.cc:746:
IPC::TakeFileHandleForProcess(socket_for_renderer_.Pass(),
On 2015/05/07 22:19:56, Mark Seaborn wrote:
> Looking again, I noticed that you're not checking for an error here.
> 
> Shouldn't this do the same as the ShareToProcess() call below, and set
> error_message etc. on error?
> 
> If imc_handle_for_renderer is invalid, I don't think the later code paths
check
> for that gracefully and abort the process's startup (i.e. LaunchSelLdr() in
> ppb_nacl_private_impl.cc and its caller in service_runtime.cc).

Ah, you're right. I'll send another CL.

Powered by Google App Engine
This is Rietveld 408576698