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

Unified Diff: base/run_loop.cc

Issue 2564943002: Reland "Add thread checking to RunLoop, deprecate MessageLoopRunner. (patchset #4 id:20002 of https… (Closed)
Patch Set: 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
« no previous file with comments | « base/run_loop.h ('k') | chrome/browser/chromeos/file_manager/zip_file_creator_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/run_loop.cc
diff --git a/base/run_loop.cc b/base/run_loop.cc
index a2322f849582c3b22cc78b9c9980b3fd8a1a92b8..6faaeee2ba323d505e1d2ad09490455953e5b3c4 100644
--- a/base/run_loop.cc
+++ b/base/run_loop.cc
@@ -25,6 +25,7 @@ RunLoop::~RunLoop() {
}
void RunLoop::Run() {
+ DCHECK(thread_checker_.CalledOnValidThread());
if (!BeforeRun())
return;
@@ -44,6 +45,7 @@ void RunLoop::RunUntilIdle() {
}
void RunLoop::Quit() {
+ DCHECK(thread_checker_.CalledOnValidThread());
quit_called_ = true;
if (running_ && loop_->run_loop_ == this) {
// This is the inner-most RunLoop, so quit now.
@@ -52,6 +54,7 @@ void RunLoop::Quit() {
}
void RunLoop::QuitWhenIdle() {
+ DCHECK(thread_checker_.CalledOnValidThread());
quit_when_idle_received_ = true;
}
« no previous file with comments | « base/run_loop.h ('k') | chrome/browser/chromeos/file_manager/zip_file_creator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698