Index: ppapi/proxy/ppapi_proxy_test.cc |
diff --git a/ppapi/proxy/ppapi_proxy_test.cc b/ppapi/proxy/ppapi_proxy_test.cc |
index 8827610885e3a9f70c235aa58ab1ce26133aa945..acd533f1a82e0935916dcd3f4ce16dd11cb71d67 100644 |
--- a/ppapi/proxy/ppapi_proxy_test.cc |
+++ b/ppapi/proxy/ppapi_proxy_test.cc |
@@ -229,8 +229,12 @@ |
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::TearDownHarness() { |
HostDispatcher::RemoveForInstance(pp_instance()); |
host_dispatcher_.reset(); |
- // Set the proxy lock back to the default, which is locking. |
- ProxyLock::EnableLockingOnThreadForTest(); |
host_globals_.reset(); |
} |