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
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288949
Review URL: https://codereview.chromium.org/454433003
Cr-Commit-Position: refs/heads/master@{#289600}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289600 0039d316-1c4b-4281-b951-d872f2087c98
CrOS-Libchrome-Original-Commit: 9a4129222945e697c34bd4a3254b338049870a70
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 69a02a3..ae165ea 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -90,6 +90,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;
@@ -496,8 +498,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();
}