Commit 13b16e22 authored by jeremy@chromium.org's avatar jeremy@chromium.org

Revert of [Mac] Use a native MessagePump instead of a MessagePumpDefault...

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
parent 731a900f
...@@ -229,14 +229,6 @@ scoped_ptr<MessagePump> MessageLoop::CreateMessagePumpForType(Type type) { ...@@ -229,14 +229,6 @@ scoped_ptr<MessagePump> MessageLoop::CreateMessagePumpForType(Type type) {
#define MESSAGE_PUMP_UI scoped_ptr<MessagePump>(new MessagePumpForUI()) #define MESSAGE_PUMP_UI scoped_ptr<MessagePump>(new MessagePumpForUI())
#endif #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 (type == MessageLoop::TYPE_UI) {
if (message_pump_for_ui_factory_) if (message_pump_for_ui_factory_)
return message_pump_for_ui_factory_(); return message_pump_for_ui_factory_();
...@@ -251,7 +243,7 @@ scoped_ptr<MessagePump> MessageLoop::CreateMessagePumpForType(Type type) { ...@@ -251,7 +243,7 @@ scoped_ptr<MessagePump> MessageLoop::CreateMessagePumpForType(Type type) {
#endif #endif
DCHECK_EQ(MessageLoop::TYPE_DEFAULT, type); DCHECK_EQ(MessageLoop::TYPE_DEFAULT, type);
return MESSAGE_PUMP_DEFAULT; return scoped_ptr<MessagePump>(new MessagePumpDefault());
} }
void MessageLoop::AddDestructionObserver( void MessageLoop::AddDestructionObserver(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment