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

Unified Diff: content/shell/webkit_test_controller.cc

Issue 11817014: Don't attempt to read the process id for a NULL handle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/shell/webkit_test_controller.cc
diff --git a/content/shell/webkit_test_controller.cc b/content/shell/webkit_test_controller.cc
index f12c4a42e1959ae4abf3fe6e0bf3a070ddb86b01..af585b6c83ca742ba988f54d3b63e98ac0e6515f 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_));
}
« 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