diff options
Diffstat (limited to 'chromium/ppapi/proxy/ppapi_proxy_test.cc')
-rw-r--r-- | chromium/ppapi/proxy/ppapi_proxy_test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/ppapi/proxy/ppapi_proxy_test.cc b/chromium/ppapi/proxy/ppapi_proxy_test.cc index 5e4b67bc4f3..87aa22b2860 100644 --- a/chromium/ppapi/proxy/ppapi_proxy_test.cc +++ b/chromium/ppapi/proxy/ppapi_proxy_test.cc @@ -227,8 +227,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(); } } @@ -471,7 +475,10 @@ void HostProxyTestHarness::CreateHostGlobals() { if (globals_config_ == PER_THREAD_GLOBALS) { host_globals_.reset(new TestGlobals(PpapiGlobals::PerThreadForTest())); PpapiGlobals::SetPpapiGlobalsOnThreadForTest(GetGlobals()); + // The host side of the proxy does not lock. + ProxyLock::DisableLockingOnThreadForTest(); } else { + ProxyLock::DisableLockingOnThreadForTest(); host_globals_.reset(new TestGlobals()); } } |