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

Unified Diff: base/test/parallel_test_launcher.h

Issue 24398002: GTTF: instantiate ThreadChecker early in the test launcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | base/test/test_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/parallel_test_launcher.h
diff --git a/base/test/parallel_test_launcher.h b/base/test/parallel_test_launcher.h
index ed22180d2ce2958d5bdbcca298568d6e93ada120..6d9d228bcfae2ab1ab5288c76c5e750270423cb3 100644
--- a/base/test/parallel_test_launcher.h
+++ b/base/test/parallel_test_launcher.h
@@ -80,6 +80,13 @@ class ParallelTestLauncher {
// Called by the delay timer when no output was made for a while.
void OnOutputTimeout();
+ // Make sure we don't accidentally call the wrong methods e.g. on the worker
+ // pool thread. With lots of callbacks used this is non-trivial.
+ // Should be the first member so that it's destroyed last: when destroying
+ // other members, especially the worker pool, we may check the code is running
+ // on the correct thread.
+ ThreadChecker thread_checker_;
+
// Watchdog timer to make sure we do not go without output for too long.
DelayTimer<ParallelTestLauncher> timer_;
@@ -94,10 +101,6 @@ class ParallelTestLauncher {
// Worker pool used to launch processes in parallel.
scoped_ptr<SequencedWorkerPoolOwner> worker_pool_owner_;
- // Make sure we don't accidentally call the wrong methods e.g. on the worker
- // pool thread. With lots of callbacks used this is non-trivial.
- ThreadChecker thread_checker_;
-
DISALLOW_COPY_AND_ASSIGN(ParallelTestLauncher);
};
« no previous file with comments | « no previous file | base/test/test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698