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

Unified Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 12378050: PPAPI: Remove threading options; it's always on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix PDFResource unit test Created 7 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/plugin_var_tracker.cc ('k') | ppapi/proxy/ppb_var_unittest.cc » ('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 00947e39a1bade62618c1405ca2d2c7594447d6e..9034d8fa75cd636069be3703b91e86858af72425 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/ppapi/proxy/ppapi_proxy_test.cc
@@ -171,6 +171,8 @@ Dispatcher* PluginProxyTestHarness::GetDispatcher() {
void PluginProxyTestHarness::SetUpHarness() {
// These must be first since the dispatcher set-up uses them.
CreatePluginGlobals();
+ // Some of the methods called during set-up check that the lock is held.
+ ProxyAutoLock lock;
resource_tracker().DidCreateInstance(pp_instance());
@@ -196,6 +198,8 @@ void PluginProxyTestHarness::SetUpHarnessWithChannel(
bool is_client) {
// These must be first since the dispatcher set-up uses them.
CreatePluginGlobals();
+ // Some of the methods called during set-up check that the lock is held.
+ ProxyAutoLock lock;
resource_tracker().DidCreateInstance(pp_instance());
plugin_delegate_mock_.Init(ipc_message_loop, shutdown_event);
@@ -214,10 +218,15 @@ void PluginProxyTestHarness::SetUpHarnessWithChannel(
}
void PluginProxyTestHarness::TearDownHarness() {
- plugin_dispatcher_->DidDestroyInstance(pp_instance());
- plugin_dispatcher_.reset();
+ {
+ // Some of the methods called during tear-down check that the lock is held.
+ ProxyAutoLock lock;
+
+ plugin_dispatcher_->DidDestroyInstance(pp_instance());
+ plugin_dispatcher_.reset();
- resource_tracker().DidDeleteInstance(pp_instance());
+ resource_tracker().DidDeleteInstance(pp_instance());
+ }
plugin_globals_.reset();
}
« no previous file with comments | « ppapi/proxy/plugin_var_tracker.cc ('k') | ppapi/proxy/ppb_var_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698