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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 2069853002: Ignore certain messages in plugin broker process if they are not sent by the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 478f476f36d1370785b56029fe2e4173c588db02..6e306934c07b8f31cd0f4014e186bbef33ad6056 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -467,8 +467,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.

Powered by Google App Engine
This is Rietveld 408576698