diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-12 23:22:44 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-12 23:22:44 +0000 |
commit | 13b16e22a87c01e05456613499bd0a82b27e35b8 (patch) | |
tree | 5c9e47be1dde096c5753be986a08d6cba22dadb9 /base/message_loop | |
parent | 731a900fef3c70df8006e6bd94aae4e63ecc0a84 (diff) | |
download | chromium_src-13b16e22a87c01e05456613499bd0a82b27e35b8.zip chromium_src-13b16e22a87c01e05456613499bd0a82b27e35b8.tar.gz chromium_src-13b16e22a87c01e05456613499bd0a82b27e35b8.tar.bz2 |
Revert of [Mac] Use a native MessagePump instead of a MessagePumpDefault (https://codereview.chromium.org/331513002/)
Reason for revert:
Broke Jingle unit tests on the bots.
Original issue's description:
> [Mac] Use a native MessagePump instead of a MessagePumpDefault
>
> Many message loops in Chrome are backed by MessagePumpDefault which uses a WaitableEvent object to sleep, this is ultimately implemented as a pthread condition variable on POSIX.
>
> In order to support timer coalescing in MessageLoops we need to sleep using a primitive which supports timer coalescing at the OS level (support for timer coalescing goes down into the kernel on Android/Linux/OSX/Win). The current change achieves this and should provide a way to gauge the effect of timer coalescing.
>
> An alternate approach to this patch would be to implement MessagePumpDefault using a primitive which supports timer coalescing.
>
> Local performance tests didn't uncover any regressions from this change.
>
> BUG=356804
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276808
TBR=darin@chromium.org,mark@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=356804
Review URL: https://codereview.chromium.org/336603005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop')
-rw-r--r-- | base/message_loop/message_loop.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc index ccece4d..dd1a393 100644 --- a/base/message_loop/message_loop.cc +++ b/base/message_loop/message_loop.cc @@ -229,14 +229,6 @@ scoped_ptr<MessagePump> MessageLoop::CreateMessagePumpForType(Type type) { #define MESSAGE_PUMP_UI scoped_ptr<MessagePump>(new MessagePumpForUI()) #endif -#if defined(OS_MACOSX) - // Use an OS native runloop on Mac to support timer coalescing. - #define MESSAGE_PUMP_DEFAULT \ - scoped_ptr<MessagePump>(new MessagePumpCFRunLoop()) -#else - #define MESSAGE_PUMP_DEFAULT scoped_ptr<MessagePump>(new MessagePumpDefault()) -#endif - if (type == MessageLoop::TYPE_UI) { if (message_pump_for_ui_factory_) return message_pump_for_ui_factory_(); @@ -251,7 +243,7 @@ scoped_ptr<MessagePump> MessageLoop::CreateMessagePumpForType(Type type) { #endif DCHECK_EQ(MessageLoop::TYPE_DEFAULT, type); - return MESSAGE_PUMP_DEFAULT; + return scoped_ptr<MessagePump>(new MessagePumpDefault()); } void MessageLoop::AddDestructionObserver( |