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

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
« no previous file with comments | « content/browser/ppapi_plugin_process_host.h ('k') | content/ppapi_plugin/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « content/browser/ppapi_plugin_process_host.h ('k') | content/ppapi_plugin/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698