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

Unified Diff: chrome/browser/metrics/leak_detector/leak_detector_controller_unittest.cc

Issue 2549623006: Fix TestBrowserThread destruction order in CrOS tests. (Closed)
Patch Set: +comment on Leaky Created 4 years 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/browser/metrics/leak_detector/leak_detector_controller_unittest.cc
diff --git a/chrome/browser/metrics/leak_detector/leak_detector_controller_unittest.cc b/chrome/browser/metrics/leak_detector/leak_detector_controller_unittest.cc
index a77369a9881c1155687b160e46136fb4817d5a6f..36768d15e65f3392f8e4c0588915e981ae9648f0 100644
--- a/chrome/browser/metrics/leak_detector/leak_detector_controller_unittest.cc
+++ b/chrome/browser/metrics/leak_detector/leak_detector_controller_unittest.cc
@@ -56,10 +56,11 @@ class LeakDetectorControllerTest : public ::testing::Test {
// initializes class LeakDetector, which can only be initialized once, enforced
// by an internal CHECK. Multiple initializations of LeakDetectorController in
// the same process will result in multiple initializations of class
-// LeakDetector.
+// LeakDetector. It has to be Leaky as running its destructor will otherwise
+// DCHECK when called outside the scope of a TestBrowserThreadBundle.
//
// See src/components/metrics/leak_detector/leak_detector.h for more info.
-base::LazyInstance<TestLeakDetectorController> g_instance =
+base::LazyInstance<TestLeakDetectorController>::Leaky g_instance =
LAZY_INSTANCE_INITIALIZER;
TEST_F(LeakDetectorControllerTest, SingleReport) {

Powered by Google App Engine
This is Rietveld 408576698