From ae645471f62870fbe4d09eaa82e9043ffe7284b8 Mon Sep 17 00:00:00 2001 From: "cpu@google.com" Date: Fri, 1 Aug 2008 03:06:25 +0000 Subject: 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 --- chrome/installer/util/run_all_unittests.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome/installer/util') diff --git a/chrome/installer/util/run_all_unittests.cc b/chrome/installer/util/run_all_unittests.cc index 69b2d3f..f38f05b 100644 --- a/chrome/installer/util/run_all_unittests.cc +++ b/chrome/installer/util/run_all_unittests.cc @@ -27,8 +27,14 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "base/at_exit.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; + return TestSuite(argc, argv).Run(); } -- cgit v1.1