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

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 869883003: Never lock the Pepper proxy lock on the IO thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix size_t vs int32_t Created 5 years, 9 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/ppapi_plugin/ppapi_thread.cc
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc
index 8b612fbe97b9d02238dd7c3f80952e2ece24479a..88b824f41b3f7bec485eb06580023526a977220a 100644
--- a/content/ppapi_plugin/ppapi_thread.cc
+++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -101,21 +101,23 @@ typedef int32_t (*InitializeBrokerFunc)
PpapiThread::PpapiThread(const base::CommandLine& command_line, bool is_broker)
: is_broker_(is_broker),
+ plugin_globals_(GetIOTaskRunner()),
connect_instance_func_(NULL),
local_pp_module_(base::RandInt(0, std::numeric_limits<PP_Module>::max())),
next_plugin_dispatcher_id_(1) {
- ppapi::proxy::PluginGlobals* globals = ppapi::proxy::PluginGlobals::Get();
- globals->SetPluginProxyDelegate(this);
- globals->set_command_line(
+ plugin_globals_.SetPluginProxyDelegate(this);
+ plugin_globals_.set_command_line(
command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs));
blink_platform_impl_.reset(new PpapiBlinkPlatformImpl);
blink::initialize(blink_platform_impl_.get());
if (!is_broker_) {
- channel()->AddFilter(
+ scoped_refptr<ppapi::proxy::PluginMessageFilter> plugin_filter(
new ppapi::proxy::PluginMessageFilter(
- NULL, globals->resource_reply_thread_registrar()));
+ NULL, plugin_globals_.resource_reply_thread_registrar()));
+ channel()->AddFilter(plugin_filter.get());
+ plugin_globals_.RegisterResourceMessageFilters(plugin_filter.get());
}
}
« no previous file with comments | « content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc ('k') | ppapi/nacl_irt/plugin_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698