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

Unified Diff: base/message_loop/incoming_task_queue.cc

Issue 1194673004: Don't peek messages in the MessagePumpForUI class when we receive our kMsgHaveWork message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the crash reported in bug 501602. The patch description has been updated with comments about th… Created 5 years, 6 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
Index: base/message_loop/incoming_task_queue.cc
diff --git a/base/message_loop/incoming_task_queue.cc b/base/message_loop/incoming_task_queue.cc
index 5e9a4613da1cad2a28369aa78b69e87001ad9e9f..642222efc8f0e541a8876bb45c037a67c466941d 100644
--- a/base/message_loop/incoming_task_queue.cc
+++ b/base/message_loop/incoming_task_queue.cc
@@ -119,6 +119,11 @@ void IncomingTaskQueue::StartScheduling() {
ScheduleWork();
}
+TimeTicks IncomingTaskQueue::GetNewlyAddedTaskDelay() {
+ return !incoming_queue_.empty() ? incoming_queue_.front().delayed_run_time :
+ TimeTicks();
+}
+
IncomingTaskQueue::~IncomingTaskQueue() {
// Verify that WillDestroyCurrentMessageLoop() has been called.
DCHECK(!message_loop_);

Powered by Google App Engine
This is Rietveld 408576698