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

Unified Diff: chrome/test/out_of_proc_test_runner.cc

Issue 6713107: Make the windows_version.h functions threadsafe by using a singleton. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
Index: chrome/test/out_of_proc_test_runner.cc
===================================================================
--- chrome/test/out_of_proc_test_runner.cc (revision 80667)
+++ chrome/test/out_of_proc_test_runner.cc (working copy)
@@ -579,6 +579,14 @@
return ChromeTestSuite(argc, argv).Run();
}
+ // The exit manager is in charge of calling the dtors of singleton objects.
+ // We need one here because the global variable inside the AtExitManager is a
+ // different memory location in this .exe versus in chrome.dll, so
+ // initializing one in ChromeMain() below won't help when it calls back out to
+ // Singleton-using functions in this .exe. We can't declare this at the top
+ // of main() because ChromeTestSuite, declared above, also instantiates one.
+ base::AtExitManager exit_manager;
cpu_(ooo_6.6-7.5) 2011/04/06 21:11:42 seem correct to me. Different modules need differe
Peter Kasting 2011/04/07 00:29:19 This comment led me to clarify the comment block h
+
#if defined(OS_WIN)
if (command_line->HasSwitch(switches::kProcessType)) {
// This is a child process, call ChromeMain.

Powered by Google App Engine
This is Rietveld 408576698