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

Unified Diff: ppapi/proxy/plugin_message_filter.cc

Issue 563073002: Pepper UDP socket: buffer received packets in the plugin process to improve performance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « ppapi/host/resource_message_filter.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/plugin_message_filter.cc
diff --git a/ppapi/proxy/plugin_message_filter.cc b/ppapi/proxy/plugin_message_filter.cc
index 18469579b3839b002afe49272a7d6fa4ee5d6e4d..f2f1cbeef144475778d7119a4dcfc2b4d04d99b1 100644
--- a/ppapi/proxy/plugin_message_filter.cc
+++ b/ppapi/proxy/plugin_message_filter.cc
@@ -83,12 +83,16 @@ void PluginMessageFilter::OnMsgResourceReply(
const ResourceMessageReplyParams& reply_params,
const IPC::Message& nested_msg) {
scoped_refptr<base::MessageLoopProxy> target =
- resource_reply_thread_registrar_->GetTargetThreadAndUnregister(
- reply_params.pp_resource(), reply_params.sequence());
-
- target->PostTask(
- FROM_HERE,
- base::Bind(&DispatchResourceReply, reply_params, nested_msg));
+ resource_reply_thread_registrar_->GetTargetThread(reply_params,
+ nested_msg);
+
+ if (!target.get()) {
+ DispatchResourceReply(reply_params, nested_msg);
+ } else {
+ target->PostTask(
+ FROM_HERE,
+ base::Bind(&DispatchResourceReply, reply_params, nested_msg));
+ }
}
// static
« no previous file with comments | « ppapi/host/resource_message_filter.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698