diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-09 00:14:09 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-09 00:14:09 +0000 |
commit | 124a2bdf7a8eacef6588f092f94e5fa07306b113 (patch) | |
tree | 63489ad914c1570e37b3493a7e46c1a514306aaa /base/message_loop.cc | |
parent | e3b0f5a7d2bc8c9795cd0213a8656189e32b82ad (diff) | |
download | chromium_src-124a2bdf7a8eacef6588f092f94e5fa07306b113.zip chromium_src-124a2bdf7a8eacef6588f092f94e5fa07306b113.tar.gz chromium_src-124a2bdf7a8eacef6588f092f94e5fa07306b113.tar.bz2 |
Fix bug 1317458: Busy wait in IPC::SyncChannel::Send in some cases
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r-- | base/message_loop.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc index 14fa5d9..5331bc6 100644 --- a/base/message_loop.cc +++ b/base/message_loop.cc @@ -429,18 +429,19 @@ void MessageLoop::DidProcessMessage(const MSG& msg) { } void MessageLoop::SetNestableTasksAllowed(bool allowed) { - nestable_tasks_allowed_ = allowed; - if (!nestable_tasks_allowed_) - return; - // Start the native pump if we are not already pumping. - EnsurePumpATaskWasPosted(); + if (nestable_tasks_allowed_ != allowed) { + nestable_tasks_allowed_ = allowed; + if (!nestable_tasks_allowed_) + return; + // Start the native pump if we are not already pumping. + EnsurePumpATaskWasPosted(); + } } bool MessageLoop::NestableTasksAllowed() const { return nestable_tasks_allowed_; } - bool MessageLoop::ProcessNextWindowsMessage() { MSG msg; if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { |