summaryrefslogtreecommitdiffstats
path: root/chrome/browser/render_process_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/render_process_host.cc')
-rw-r--r--chrome/browser/render_process_host.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/render_process_host.cc b/chrome/browser/render_process_host.cc
index bb048ff..43ebb64 100644
--- a/chrome/browser/render_process_host.cc
+++ b/chrome/browser/render_process_host.cc
@@ -202,7 +202,7 @@ RenderProcessHost::~RenderProcessHost() {
channel_.reset();
if (process_.handle() && !run_renderer_in_process_) {
- watcher_.StopWatching();
+ MessageLoop::current()->WatchObject(process_.handle(), NULL);
ProcessWatcher::EnsureProcessTerminated(process_.handle());
}
@@ -420,7 +420,7 @@ bool RenderProcessHost::Init() {
process_.set_handle(process);
}
- watcher_.StartWatching(process_.handle(), this);
+ MessageLoop::current()->WatchObject(process_.handle(), this);
}
}
@@ -576,7 +576,7 @@ void RenderProcessHost::OnChannelConnected(int32 peer_pid) {
// returned by CreateProcess() has to the process object.
process_.set_handle(OpenProcess(MAXIMUM_ALLOWED, FALSE, peer_pid));
DCHECK(process_.handle());
- watcher_.StartWatching(process_.handle(), this);
+ MessageLoop::current()->WatchObject(process_.handle(), this);
}
} else {
// Need to verify that the peer_pid is actually the process we know, if
@@ -591,6 +591,8 @@ void RenderProcessHost::OnObjectSignaled(HANDLE object) {
DCHECK(channel_.get());
DCHECK_EQ(object, process_.handle());
+ MessageLoop::current()->WatchObject(object, NULL);
+
bool clean_shutdown = !process_util::DidProcessCrash(object);
process_.Close();