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

Unified Diff: base/message_pump_win.cc

Issue 14069: Revert to repair UI test bustage (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years 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_pump_win.cc
===================================================================
--- base/message_pump_win.cc (revision 6915)
+++ base/message_pump_win.cc (working copy)
@@ -380,19 +380,13 @@
msg.hwnd != message_hwnd_);
// Since we discarded a kMsgHaveWork message, we must update the flag.
- int old_have_work = InterlockedExchange(&have_work_, 0);
- DCHECK(old_have_work);
+ InterlockedExchange(&have_work_, 0);
- // We don't need a special time slice if we didn't have_message to process.
- if (!have_message)
- return false;
+ // TODO(darin,jar): There is risk of being lost in a sub-pump within the call
+ // to ProcessMessageHelper, which could result in no longer getting a
+ // kMsgHaveWork message until the next out-of-band call to ScheduleWork.
- // Guarantee we'll get another time slice in the case where we go into native
- // windows code. This ScheduleWork() may hurt performance a tiny bit when
- // tasks appear very infrequently, but when the event queue is busy, the
- // kMsgHaveWork events get (percentage wise) rarer and rarer.
- ScheduleWork();
- return ProcessMessageHelper(msg);
+ return have_message && ProcessMessageHelper(msg);
}
//-----------------------------------------------------------------------------
« 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