Index: content/browser/ppapi_plugin_process_host.cc |
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc |
index 0d8d1708f9d67e61f29b968c241e018570ae4743..5b1f18a1b557cce71c9d24df757fd5330069ae39 100644 |
--- a/content/browser/ppapi_plugin_process_host.cc |
+++ b/content/browser/ppapi_plugin_process_host.cc |
@@ -471,8 +471,12 @@ void PpapiPluginProcessHost::RequestPluginChannel(Client* client) { |
int renderer_child_id; |
client->GetPpapiChannelInfo(&process_handle, &renderer_child_id); |
- base::ProcessId process_id = (process_handle == base::kNullProcessHandle) ? |
- 0 : base::GetProcId(process_handle); |
+ base::ProcessId process_id = base::kNullProcessId; |
+ if (process_handle != base::kNullProcessHandle) { |
+ // This channel is not used by the browser itself. |
+ process_id = base::GetProcId(process_handle); |
+ CHECK_NE(base::kNullProcessId, process_id); |
+ } |
// We can't send any sync messages from the browser because it might lead to |
// a hang. See the similar code in PluginProcessHost for more description. |