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

Issue 681733003: Removed the ProcessHandle from the RendererClosedDetails payload (Closed)

Created:
6 years, 1 month ago by sramajay
Modified:
6 years ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, arunprasadr, no sievers, Alexei Svitkine (slow), rohitrao (ping after 24h)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Remove the ProcessHandle from the RendererClosedDetails payload NOTIFICATION_RENDERER_PROCESS_CLOSED is sent out after the closing the render process. ProcessHandle passed via this notification is invalid and useless. This cl is to remove it from the notification payload. MachBroker is relying on this notification to do clean-up of its map between ProcessHandle and mach_port_t. Since ProcessHandle is invalid, there is a TODO to handle it in proper way, which is also fixed as it is dependent. Each Child Process (Renderer, Plugin) has its own id generated out of ChildProcessHostImpl[1], which is a common unique id generator. Refer [2] for documentation of this ID related to Render Process. [1] https://code.google.com/p/chromium/codesearch#chromium/src/content/common/child_process_host_impl.cc&l=219&rcl=1415723309 [2] https://code.google.com/p/chromium/codesearch#chromium/src/content/public/browser/render_process_host.h&sq=package:chromium&rcl=1415723309&l=141 Related CLs - https://codereview.chromium.org/644473004/ and https://codereview.chromium.org/662103002/ BUG=432486 Committed: https://crrev.com/52ac072bc8501be29ce92f8aac8343bfc525c851 Cr-Commit-Position: refs/heads/master@{#306407}

Patch Set 1 : Removed ProcessHandle from the RendererClosedDetails #

Patch Set 2 : Fixed the mac unit test cases #

Patch Set 3 : Fixed mac issues #

Total comments: 8

Patch Set 4 : Fixed review comments #

Total comments: 8

Patch Set 5 : Used range-based loop #

Total comments: 7

Patch Set 6 : Removed InvalidatePid and modified process id map #

Total comments: 8

Patch Set 7 : Optimized mach_map_ traversal #

Total comments: 2

Patch Set 8 : Corrected Indentation #

Patch Set 9 : Fixed chromeos dependency #

Total comments: 7

Patch Set 10 : Updated child_process_id to child_process_host_id #

Total comments: 2

Patch Set 11 : Corrected spelling #

Patch Set 12 : Fixed browser_test failures for chromeos #

Total comments: 12

Patch Set 13 : Fixed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -108 lines) Patch
M chrome/browser/chromeos/memory/oom_priority_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +16 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/memory/oom_priority_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +36 lines, -38 lines 0 comments Download
M chrome/browser/chromeos/memory/oom_priority_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +54 lines, -20 lines 0 comments Download
M content/browser/child_process_launcher.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_manager_unittest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/mach_broker_mac.h View 1 2 3 4 5 6 4 chunks +11 lines, -6 lines 0 comments Download
M content/browser/mach_broker_mac.mm View 1 2 3 4 5 6 7 3 chunks +21 lines, -20 lines 0 comments Download
M content/browser/mach_broker_mac_unittest.cc View 1 2 3 4 5 3 chunks +23 lines, -8 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 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/render_process_host.h View 2 3 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 54 (16 generated)
sramajay
PTAL. Note- Macx64 is failing on PartitionAllocTest.RepeatedReturnNull, in which 6GB of memory allocation is expected ...
6 years, 1 month ago (2014-11-10 10:14:42 UTC) #4
Charlie Reis
Thanks for following up here. You have a lot of reviewers listed, so please say ...
6 years, 1 month ago (2014-11-10 19:57:25 UTC) #5
sramajay
Reviewers list was based on last review and added Alexei as he was mac expert. ...
6 years, 1 month ago (2014-11-11 14:16:06 UTC) #7
Charlie Reis
Thanks for adding the test. A few comments below. Would it be possible to add ...
6 years, 1 month ago (2014-11-12 00:44:19 UTC) #8
rohitrao (ping after 24h)
Adding Mark for the Mac parts, since I'm several years removed from this code.
6 years, 1 month ago (2014-11-12 01:52:52 UTC) #10
Mark Mentovai
Can you explain more about what this is doing, what the different IDs are, during ...
6 years, 1 month ago (2014-11-12 15:27:17 UTC) #12
sramajay
On 2014/11/12 15:27:17, Mark Mentovai wrote: > Can you explain more about what this is ...
6 years, 1 month ago (2014-11-13 12:18:51 UTC) #14
sramajay
Incorporated the comemnts. mac_x64_rel is failing on wtf_unittests.RepeatedReturnNull. It is passing locally in Mac i5 ...
6 years, 1 month ago (2014-11-13 13:16:50 UTC) #15
Mark Mentovai
https://codereview.chromium.org/681733003/diff/120001/content/browser/mach_broker_mac.mm File content/browser/mach_broker_mac.mm (right): https://codereview.chromium.org/681733003/diff/120001/content/browser/mach_broker_mac.mm#newcode217 content/browser/mach_broker_mac.mm:217: InvalidatePid(data.handle); Why don’t you get rid of InvalidatePid and ...
6 years, 1 month ago (2014-11-13 14:00:10 UTC) #16
sramajay
https://codereview.chromium.org/681733003/diff/120001/content/browser/mach_broker_mac.mm File content/browser/mach_broker_mac.mm (right): https://codereview.chromium.org/681733003/diff/120001/content/browser/mach_broker_mac.mm#newcode217 content/browser/mach_broker_mac.mm:217: InvalidatePid(data.handle); On 2014/11/13 14:00:10, Mark Mentovai wrote: > Why ...
6 years, 1 month ago (2014-11-13 15:45:28 UTC) #17
Mark Mentovai
https://codereview.chromium.org/681733003/diff/120001/content/browser/mach_broker_mac.mm File content/browser/mach_broker_mac.mm (right): https://codereview.chromium.org/681733003/diff/120001/content/browser/mach_broker_mac.mm#newcode277 content/browser/mach_broker_mac.mm:277: if (it.second == child_process_id) { On 2014/11/13 15:45:28, sramajay ...
6 years, 1 month ago (2014-11-13 16:04:53 UTC) #18
sramajay
After removing InvalidatePid() and by swapping the ChildProcessIdMap, I am able to handle all scenarios. ...
6 years, 1 month ago (2014-11-17 18:53:20 UTC) #20
Mark Mentovai
https://codereview.chromium.org/681733003/diff/160001/content/browser/mach_broker_mac.h File content/browser/mach_broker_mac.h (right): https://codereview.chromium.org/681733003/diff/160001/content/browser/mach_broker_mac.h#newcode118 content/browser/mach_broker_mac.h:118: // Mutex that guards |mach_map_|. It also guards child_process_id_map_. ...
6 years, 1 month ago (2014-11-17 19:17:46 UTC) #21
sramajay
PTAL https://codereview.chromium.org/681733003/diff/160001/content/browser/mach_broker_mac.h File content/browser/mach_broker_mac.h (right): https://codereview.chromium.org/681733003/diff/160001/content/browser/mach_broker_mac.h#newcode118 content/browser/mach_broker_mac.h:118: // Mutex that guards |mach_map_|. On 2014/11/17 19:17:46, ...
6 years, 1 month ago (2014-11-18 14:15:20 UTC) #22
Mark Mentovai
https://codereview.chromium.org/681733003/diff/180001/content/browser/mach_broker_mac.mm File content/browser/mach_broker_mac.mm (right): https://codereview.chromium.org/681733003/diff/180001/content/browser/mach_broker_mac.mm#newcode270 content/browser/mach_broker_mac.mm:270: kern_return_t kr = mach_port_deallocate(mach_task_self(), Indentation in this block.
6 years, 1 month ago (2014-11-18 14:20:20 UTC) #23
sramajay
PTAL https://codereview.chromium.org/681733003/diff/180001/content/browser/mach_broker_mac.mm File content/browser/mach_broker_mac.mm (right): https://codereview.chromium.org/681733003/diff/180001/content/browser/mach_broker_mac.mm#newcode270 content/browser/mach_broker_mac.mm:270: kern_return_t kr = mach_port_deallocate(mach_task_self(), On 2014/11/18 14:20:19, Mark ...
6 years, 1 month ago (2014-11-18 14:32:58 UTC) #25
Mark Mentovai
LGTM
6 years, 1 month ago (2014-11-18 14:56:17 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/681733003/220001
6 years, 1 month ago (2014-11-19 04:06:34 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/25107)
6 years, 1 month ago (2014-11-19 04:11:46 UTC) #30
sramajay
On 2014/11/18 14:56:17, Mark Mentovai wrote: > LGTM Presubmit is failing with below message, Could ...
6 years, 1 month ago (2014-11-19 04:19:26 UTC) #31
Mark Mentovai
You need an LG from a reviewer listed in content/OWNERS, like creis.
6 years, 1 month ago (2014-11-19 05:32:08 UTC) #32
sramajay
I have missed the ChromeOS changes for the ProcessHandle removal. Fixed now. Please take a ...
6 years, 1 month ago (2014-11-19 13:54:02 UTC) #34
Charlie Reis
Thanks for sticking with this. content/ LGTM, but you'll need an owner to review chrome/browser/chromeos/memory. ...
6 years, 1 month ago (2014-11-19 17:16:39 UTC) #36
James Cook
What is the overall goal of this change? It's not clear to me from the ...
6 years, 1 month ago (2014-11-19 18:55:51 UTC) #37
sramajay
On 2014/11/19 18:55:51, James Cook wrote: > What is the overall goal of this change? ...
6 years, 1 month ago (2014-11-20 03:30:19 UTC) #38
James Cook
https://codereview.chromium.org/681733003/diff/260001/chrome/browser/chromeos/memory/oom_priority_manager.h File chrome/browser/chromeos/memory/oom_priority_manager.h (right): https://codereview.chromium.org/681733003/diff/260001/chrome/browser/chromeos/memory/oom_priority_manager.h#newcode82 chrome/browser/chromeos/memory/oom_priority_manager.h:82: int child_process_id; I'm confused. This code only runs on ...
6 years, 1 month ago (2014-11-20 16:50:35 UTC) #39
Charlie Reis
https://codereview.chromium.org/681733003/diff/260001/chrome/browser/chromeos/memory/oom_priority_manager.h File chrome/browser/chromeos/memory/oom_priority_manager.h (right): https://codereview.chromium.org/681733003/diff/260001/chrome/browser/chromeos/memory/oom_priority_manager.h#newcode82 chrome/browser/chromeos/memory/oom_priority_manager.h:82: int child_process_id; On 2014/11/20 16:50:35, James Cook wrote: > ...
6 years, 1 month ago (2014-11-20 17:07:45 UTC) #40
sramajay
PTAL https://codereview.chromium.org/681733003/diff/260001/chrome/browser/chromeos/memory/oom_priority_manager.h File chrome/browser/chromeos/memory/oom_priority_manager.h (right): https://codereview.chromium.org/681733003/diff/260001/chrome/browser/chromeos/memory/oom_priority_manager.h#newcode82 chrome/browser/chromeos/memory/oom_priority_manager.h:82: int child_process_id; On 2014/11/20 17:07:45, Charlie Reis wrote: ...
6 years, 1 month ago (2014-11-21 12:18:47 UTC) #41
James Cook
LGTM with nit. Apologies for the delay in reviewing this. https://codereview.chromium.org/681733003/diff/280001/chrome/browser/chromeos/memory/oom_priority_manager.h File chrome/browser/chromeos/memory/oom_priority_manager.h (right): https://codereview.chromium.org/681733003/diff/280001/chrome/browser/chromeos/memory/oom_priority_manager.h#newcode147 ...
6 years, 1 month ago (2014-11-22 00:38:46 UTC) #42
sramajay
https://codereview.chromium.org/681733003/diff/280001/chrome/browser/chromeos/memory/oom_priority_manager.h File chrome/browser/chromeos/memory/oom_priority_manager.h (right): https://codereview.chromium.org/681733003/diff/280001/chrome/browser/chromeos/memory/oom_priority_manager.h#newcode147 chrome/browser/chromeos/memory/oom_priority_manager.h:147: // Holds the focussed tab's child process host id. ...
6 years ago (2014-11-24 12:00:07 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/681733003/300001
6 years ago (2014-11-24 12:01:07 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/1791)
6 years ago (2014-11-24 13:07:28 UTC) #47
sramajay
browser_tests were failing because RenderProcessHost::FromID has been called from FILE Thread. In all the instances, ...
6 years ago (2014-11-26 05:27:31 UTC) #48
James Cook
LGTM with nits. Nice patch. https://codereview.chromium.org/681733003/diff/320001/chrome/browser/chromeos/memory/oom_priority_manager.cc File chrome/browser/chromeos/memory/oom_priority_manager.cc (right): https://codereview.chromium.org/681733003/diff/320001/chrome/browser/chromeos/memory/oom_priority_manager.cc#newcode461 chrome/browser/chromeos/memory/oom_priority_manager.cc:461: focused_tab_process_info_.second, chrome::kLowestRendererOomScore); nit: Please ...
6 years ago (2014-12-01 19:25:58 UTC) #49
sramajay
https://codereview.chromium.org/681733003/diff/320001/chrome/browser/chromeos/memory/oom_priority_manager.cc File chrome/browser/chromeos/memory/oom_priority_manager.cc (right): https://codereview.chromium.org/681733003/diff/320001/chrome/browser/chromeos/memory/oom_priority_manager.cc#newcode461 chrome/browser/chromeos/memory/oom_priority_manager.cc:461: focused_tab_process_info_.second, chrome::kLowestRendererOomScore); On 2014/12/01 19:25:58, James Cook wrote: > ...
6 years ago (2014-12-02 15:36:58 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/681733003/340001
6 years ago (2014-12-02 15:38:04 UTC) #52
commit-bot: I haz the power
Committed patchset #13 (id:340001)
6 years ago (2014-12-02 17:18:48 UTC) #53
commit-bot: I haz the power
6 years ago (2014-12-02 17:19:34 UTC) #54
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/52ac072bc8501be29ce92f8aac8343bfc525c851
Cr-Commit-Position: refs/heads/master@{#306407}

Powered by Google App Engine
This is Rietveld 408576698