diff options
Diffstat (limited to 'ppapi/proxy/ppapi_proxy_test.cc')
-rw-r--r-- | ppapi/proxy/ppapi_proxy_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc index 8827610..acd533f 100644 --- a/ppapi/proxy/ppapi_proxy_test.cc +++ b/ppapi/proxy/ppapi_proxy_test.cc @@ -229,8 +229,12 @@ void PluginProxyTestHarness::CreatePluginGlobals() { if (globals_config_ == PER_THREAD_GLOBALS) { plugin_globals_.reset(new PluginGlobals(PpapiGlobals::PerThreadForTest())); PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals()); + // Enable locking in case some other unit test ran before us and disabled + // locking. + ProxyLock::EnableLockingOnThreadForTest(); } else { plugin_globals_.reset(new PluginGlobals()); + ProxyLock::EnableLockingOnThreadForTest(); } } @@ -456,8 +460,6 @@ void HostProxyTestHarness::SetUpHarnessWithChannel( void HostProxyTestHarness::TearDownHarness() { HostDispatcher::RemoveForInstance(pp_instance()); host_dispatcher_.reset(); - // Set the proxy lock back to the default, which is locking. - ProxyLock::EnableLockingOnThreadForTest(); host_globals_.reset(); } |