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

Unified Diff: ppapi/proxy/ppapi_proxy_test.cc

Issue 19492014: PPAPI: Purposely leak ProxyLock, fix shutdown race (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove static initializer Created 7 years, 3 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_globals.cc ('k') | ppapi/proxy/raw_var_data_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 5e4b67bc4f3150ade7607547c6ba03294760b4fa..87aa22b2860a7f9e330a8ee4602cc43a15ebdf60 100644
--- a/ppapi/proxy/ppapi_proxy_test.cc
+++ b/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());
}
}
« no previous file with comments | « ppapi/proxy/plugin_globals.cc ('k') | ppapi/proxy/raw_var_data_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698