diff options
author | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 19:58:48 +0000 |
---|---|---|
committer | jar@google.com <jar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-12 19:58:48 +0000 |
commit | 5235c0db9e3e00229e9267a41669d7a415d8fefc (patch) | |
tree | ea0c893e93718ab3e236c8bb4105077a56e8a88b /base | |
parent | 900342a3e34354312a2ce854196e95fa8a0c07c4 (diff) | |
download | chromium_src-5235c0db9e3e00229e9267a41669d7a415d8fefc.zip chromium_src-5235c0db9e3e00229e9267a41669d7a415d8fefc.tar.gz chromium_src-5235c0db9e3e00229e9267a41669d7a415d8fefc.tar.bz2 |
Revert to repair UI test bustage
tbr=darin
Review URL: http://codereview.chromium.org/14069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/message_pump_win.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/base/message_pump_win.cc b/base/message_pump_win.cc index ca5baa8..7ada5eb7 100644 --- a/base/message_pump_win.cc +++ b/base/message_pump_win.cc @@ -380,19 +380,13 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() { 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); } //----------------------------------------------------------------------------- |