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

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

Issue 651253002: Enforce handle ownership in base::Process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add empty line Created 6 years, 2 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
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 a5e9dde5974c8f13d19ec19c1e750d62fc05f912..ba098ddaae84ad25569730acae126a2ea6920a57 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1280,12 +1280,12 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
base::ProcessHandle RenderProcessHostImpl::GetHandle() const {
if (run_renderer_in_process())
- return base::Process::Current().handle();
+ return base::GetCurrentProcessHandle();
if (!child_process_launcher_.get() || child_process_launcher_->IsStarting())
return base::kNullProcessHandle;
- return child_process_launcher_->GetHandle();
+ return child_process_launcher_->GetProcess().Handle();
}
bool RenderProcessHostImpl::FastShutdownIfPossible() {
@@ -2073,11 +2073,7 @@ void RenderProcessHostImpl::OnProcessLaunched() {
return;
if (child_process_launcher_) {
- if (!child_process_launcher_->GetHandle()) {
- OnChannelError();
- return;
- }
-
+ DCHECK(child_process_launcher_->GetProcess().IsValid());
SetBackgrounded(backgrounded_);
}
« no previous file with comments | « content/browser/fileapi/fileapi_message_filter_unittest.cc ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698