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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2926563005: [GRC] Correctly Invalidate RenderProcessHost's CU Interface (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index fc876c671daea63b084e640a2cb2fdc474ce576d..b5bb568a70873dd943811c353240323720ea3125 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1778,11 +1778,14 @@ mojom::Renderer* RenderProcessHostImpl::GetRendererInterface() {
resource_coordinator::ResourceCoordinatorInterface*
RenderProcessHostImpl::GetProcessResourceCoordinator() {
if (!process_resource_coordinator_) {
+ base::ProcessHandle process_handle = GetHandle();
+ DCHECK(process_handle);
+
process_resource_coordinator_ =
base::MakeUnique<resource_coordinator::ResourceCoordinatorInterface>(
ServiceManagerConnection::GetForProcess()->GetConnector(),
resource_coordinator::CoordinationUnitType::kProcess,
- base::Process(GetHandle()).Pid());
+ base::Process(process_handle).Pid());
}
return process_resource_coordinator_.get();
}
@@ -3201,6 +3204,7 @@ void RenderProcessHostImpl::ProcessDied(bool already_dead,
if (route_provider_binding_.is_bound())
route_provider_binding_.Close();
associated_interfaces_.reset();
+ process_resource_coordinator_.reset();
ResetChannelProxy();
UpdateProcessPriority();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698