diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 15:27:56 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-09 15:27:56 +0000 |
commit | a44375fdc0f2ce09666dbac9e352067d05945282 (patch) | |
tree | 6d0153db8071c3b1f3296157d61a7e9efb30af92 /content/shell/webkit_test_controller.cc | |
parent | 161245db8758536aa3afd83ff1f8b99f20ff68d5 (diff) | |
download | chromium_src-a44375fdc0f2ce09666dbac9e352067d05945282.zip chromium_src-a44375fdc0f2ce09666dbac9e352067d05945282.tar.gz chromium_src-a44375fdc0f2ce09666dbac9e352067d05945282.tar.bz2 |
Don't attempt to read the process id for a NULL handle
BUG=111316
TBR=ricow@chromium.org
Review URL: https://codereview.chromium.org/11817014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/webkit_test_controller.cc')
-rw-r--r-- | content/shell/webkit_test_controller.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc index f12c4a4..af585b6 100644 --- a/content/shell/webkit_test_controller.cc +++ b/content/shell/webkit_test_controller.cc @@ -273,9 +273,10 @@ void WebKitTestController::PluginCrashed(const FilePath& plugin_path) { void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) { DCHECK(CalledOnValidThread()); - // Might be kNullProcessId, in which case we will receive a notification later - // when the RenderProcessHost was created. - current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle()); + // Might be kNullProcessHandle, in which case we will receive a notification + // later when the RenderProcessHost was created. + if (render_view_host->GetProcess()->GetHandle() != base::kNullProcessHandle) + current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle()); render_view_host->Send(new ShellViewMsg_SetCurrentWorkingDirectory( render_view_host->GetRoutingID(), current_working_directory_)); } |