diff options
-rw-r--r-- | base/message_pump_win.cc | 11 | ||||
-rw-r--r-- | net/base/run_all_unittests.cc | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/base/message_pump_win.cc b/base/message_pump_win.cc index c982173c..289e089 100644 --- a/base/message_pump_win.cc +++ b/base/message_pump_win.cc @@ -203,17 +203,18 @@ void MessagePumpWin::InitMessageWnd() { } void MessagePumpWin::HandleWorkMessage() { + // Let whatever would have run had we not been putting messages in the queue + // run now. This is an attempt to make our dummy message not starve other + // messages that may be in the Windows message queue. We also need to call + // this in order to ensure that have_work_ gets reset to 0. + ProcessPumpReplacementMessage(); + // If we are being called outside of the context of Run, then don't do // anything. This could correspond to a MessageBox call or something of // that sort. if (!state_) return; - // Let whatever would have run had we not been putting messages in the queue - // run now. This is an attempt to make our dummy message not starve other - // messages that may be in the Windows message queue. - ProcessPumpReplacementMessage(); - // Now give the delegate a chance to do some work. He'll let us know if he // needs to do more work. if (state_->delegate->DoWork()) diff --git a/net/base/run_all_unittests.cc b/net/base/run_all_unittests.cc index 7acfa54..f5c1419b 100644 --- a/net/base/run_all_unittests.cc +++ b/net/base/run_all_unittests.cc @@ -29,7 +29,6 @@ #include "base/message_loop.h" #include "base/test_suite.h" -#include "base/timer.h" class NetTestSuite : public TestSuite { public: @@ -40,13 +39,6 @@ class NetTestSuite : public TestSuite { TestSuite::Initialize(); message_loop_.reset(new MessageLoopForIO()); - - // TODO(darin): Remove this god awful, son of a wart toad hack. This timer - // keeps the MessageLoop pumping, which avoids a hang on Vista. The real - // fix lies elsewhere, but this is a stop-gap to keep the tests running on - // Vista in the meantime. - keep_looping_.Start( - TimeDelta::FromMilliseconds(100), this, &NetTestSuite::DoNothing); } virtual void Shutdown() { @@ -58,10 +50,7 @@ class NetTestSuite : public TestSuite { } private: - void DoNothing() {} - scoped_ptr<MessageLoop> message_loop_; - base::RepeatingTimer<NetTestSuite> keep_looping_; }; int main(int argc, char** argv) { |