summaryrefslogtreecommitdiffstats
path: root/base/run_all_perftests.cc
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-01 03:06:25 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-01 03:06:25 +0000
commitae645471f62870fbe4d09eaa82e9043ffe7284b8 (patch)
tree7fa75ac4be77464cce7077b145a553d721824119 /base/run_all_perftests.cc
parentf0118db83aa396c97628c33a030627f72bdf0444 (diff)
downloadchromium_src-ae645471f62870fbe4d09eaa82e9043ffe7284b8.zip
chromium_src-ae645471f62870fbe4d09eaa82e9043ffe7284b8.tar.gz
chromium_src-ae645471f62870fbe4d09eaa82e9043ffe7284b8.tar.bz2
Adds new class AtExitManager which manages the dtors of all singletons.
- Previously this job was done by the CRT's atexit() which runs later than we want and under the loader lock. - Had to modify most main() functions for the testing executables so we don't trigger leak detectors. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/run_all_perftests.cc')
-rw-r--r--base/run_all_perftests.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/base/run_all_perftests.cc b/base/run_all_perftests.cc
index 4ef7494..78eeb37 100644
--- a/base/run_all_perftests.cc
+++ b/base/run_all_perftests.cc
@@ -29,12 +29,17 @@
#include <windows.h>
+#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/perftimer.h"
#include "base/string_util.h"
#include "base/test_suite.h"
int main(int argc, char** argv) {
+ // Some tests may use base::Singleton<>, thus we need to instanciate
+ // the AtExitManager or else we will leak objects.
+ base::AtExitManager at_exit_manager;
+
// Initialize the perf timer log
std::string log_file =
WideToUTF8(CommandLine().GetSwitchValue(L"log-file"));