summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 07:00:58 +0000
committerdarin@google.com <darin@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-07 07:00:58 +0000
commita7ae6bd90fe0094788c359cae7c485942712c2a8 (patch)
treedfb8df22a13bfd20083a5388f4045b269be9589f /chrome
parentaeab4c7449f26ac71546c1419c524c0870bc155a (diff)
downloadchromium_src-a7ae6bd90fe0094788c359cae7c485942712c2a8.zip
chromium_src-a7ae6bd90fe0094788c359cae7c485942712c2a8.tar.gz
chromium_src-a7ae6bd90fe0094788c359cae7c485942712c2a8.tar.bz2
fix unit_test failures, where process_.handle() may be null
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/render_process_host.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/render_process_host.cc b/chrome/browser/render_process_host.cc
index 3dea5c0..ccf252a 100644
--- a/chrome/browser/render_process_host.cc
+++ b/chrome/browser/render_process_host.cc
@@ -467,7 +467,10 @@ void RenderProcessHost::Release(int listener_id) {
if (!notified_termination_) {
// It is possible that the renderer died already even though we haven't
// broken the pipe yet. We should take care to count this as unexpected.
- bool clean_shutdown = !process_util::DidProcessCrash(process_.handle());
+ // In unit tests, we do not have a valid process handle.
+ bool clean_shutdown = true;
+ if (process_.handle())
+ clean_shutdown = !process_util::DidProcessCrash(process_.handle());
NotificationService::current()->Notify(NOTIFY_RENDERER_PROCESS_TERMINATED,
Source<RenderProcessHost>(this),
Details<bool>(&clean_shutdown));