diff options
Diffstat (limited to 'base/message_loop.h')
-rw-r--r-- | base/message_loop.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/message_loop.h b/base/message_loop.h index 519e4a3..2264c6e 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -516,7 +516,12 @@ class BASE_API MessageLoopForUI : public MessageLoop { // Returns the MessageLoopForUI of the current thread. static MessageLoopForUI* current() { MessageLoop* loop = MessageLoop::current(); +#ifdef ANDROID + DCHECK_EQ(static_cast<int>(MessageLoop::TYPE_UI), + static_cast<int>(loop->type())); +#else DCHECK_EQ(MessageLoop::TYPE_UI, loop->type()); +#endif return static_cast<MessageLoopForUI*>(loop); } @@ -590,7 +595,12 @@ class BASE_API MessageLoopForIO : public MessageLoop { // Returns the MessageLoopForIO of the current thread. static MessageLoopForIO* current() { MessageLoop* loop = MessageLoop::current(); +#ifdef ANDROID + DCHECK_EQ(static_cast<int>(MessageLoop::TYPE_IO), + static_cast<int>(loop->type())); +#else DCHECK_EQ(MessageLoop::TYPE_IO, loop->type()); +#endif return static_cast<MessageLoopForIO*>(loop); } |