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

Unified Diff: base/message_loop/incoming_task_queue.cc

Issue 897173004: Increase warning threshold for "super long" delayed tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix 'unused variable' compile error on release builds. Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 07de4a155df1726d47b1041ca7dd621d86190297..c1ce939b0c4708ac431d80b54a35ee8ef73b314c 100644
--- a/base/message_loop/incoming_task_queue.cc
+++ b/base/message_loop/incoming_task_queue.cc
@@ -17,11 +17,12 @@ namespace internal {
namespace {
-// Delays larger than this many microseconds are often bogus, and a warning
-// should be emitted in debug builds to warn developers.
-// http://crbug.com/450045
-const int kTaskDelayWarningThresholdInMicroseconds =
- std::numeric_limits<int>::max() / 2; // A little less than 18 minutes.
+#ifndef NDEBUG
+// Delays larger than this are often bogus, and a warning should be emitted in
+// debug builds to warn developers. http://crbug.com/450045
+const int kTaskDelayWarningThresholdInSeconds =
+ 14 * 24 * 60 * 60; // 14 days.
+#endif
// Returns true if MessagePump::ScheduleWork() must be called one
// time for every task that is added to the MessageLoop incoming queue.
@@ -52,9 +53,9 @@ bool IncomingTaskQueue::AddToIncomingQueue(
TimeDelta delay,
bool nestable) {
DLOG_IF(WARNING,
- delay.InMicroseconds() > kTaskDelayWarningThresholdInMicroseconds)
- << "Requesting super-long task delay period of " << delay.InMicroseconds()
- << " usec from here: " << from_here.ToString();
+ delay.InSeconds() > kTaskDelayWarningThresholdInSeconds)
+ << "Requesting super-long task delay period of " << delay.InSeconds()
+ << " seconds from here: " << from_here.ToString();
AutoLock locked(incoming_queue_lock_);
PendingTask pending_task(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698