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

Unified Diff: ppapi/proxy/ppapi_proxy_test.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
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/resource_message_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppapi_proxy_test.cc
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc
index 14362d964afca40a9e03516f075fc274edbad5bd..fdd16043515d1bf506a78238cb84746146e22bb9 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/ppapi/proxy/ppapi_proxy_test.cc
@@ -163,7 +163,7 @@ Dispatcher* PluginProxyTestHarness::GetDispatcher() {
void PluginProxyTestHarness::SetUpHarness() {
// These must be first since the dispatcher set-up uses them.
- CreatePluginGlobals();
+ CreatePluginGlobals(nullptr /* ipc_task_runner */);
// Some of the methods called during set-up check that the lock is held.
ProxyAutoLock lock;
@@ -190,7 +190,8 @@ void PluginProxyTestHarness::SetUpHarnessWithChannel(
base::WaitableEvent* shutdown_event,
bool is_client) {
// These must be first since the dispatcher set-up uses them.
- CreatePluginGlobals();
+ scoped_refptr<base::TaskRunner> ipc_task_runner(ipc_message_loop);
+ CreatePluginGlobals(ipc_message_loop);
// Some of the methods called during set-up check that the lock is held.
ProxyAutoLock lock;
@@ -223,12 +224,14 @@ void PluginProxyTestHarness::TearDownHarness() {
plugin_globals_.reset();
}
-void PluginProxyTestHarness::CreatePluginGlobals() {
+void PluginProxyTestHarness::CreatePluginGlobals(
+ const scoped_refptr<base::TaskRunner>& ipc_task_runner) {
if (globals_config_ == PER_THREAD_GLOBALS) {
- plugin_globals_.reset(new PluginGlobals(PpapiGlobals::PerThreadForTest()));
+ plugin_globals_.reset(new PluginGlobals(PpapiGlobals::PerThreadForTest(),
+ ipc_task_runner));
PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals());
} else {
- plugin_globals_.reset(new PluginGlobals());
+ plugin_globals_.reset(new PluginGlobals(ipc_task_runner));
}
}
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/resource_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698