Adds some CHECKs to MessagePumpMojo
The thread watcher appears to be kicking on when we're trying to
remove a handle. Not sure why. This converts some DCHECKs to CHECKs
and fixes handling of the deadline. I suspect none of this will help,
but it's worth a shot.
BUG=399769
TEST=none
R=darin@chromium.org
Review URL: https://codereview.chromium.org/454433003
Cr-Commit-Position: refs/heads/master@{#288949}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288949 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 95d70989f5653bf15314bca409e5cc33363558bf
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index c0d9b0e..c19978b 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -92,6 +92,8 @@
// time for every task that is added to the MessageLoop incoming queue.
bool AlwaysNotifyPump(MessageLoop::Type type) {
#if defined(OS_ANDROID)
+ // The Android UI message loop needs to get notified each time a task is added
+ // to the incoming queue.
return type == MessageLoop::TYPE_UI || type == MessageLoop::TYPE_JAVA;
#else
return false;
@@ -528,8 +530,6 @@
}
void MessageLoop::ScheduleWork(bool was_empty) {
- // The Android UI message loop needs to get notified each time
- // a task is added to the incoming queue.
if (was_empty || AlwaysNotifyPump(type_))
pump_->ScheduleWork();
}