| Index: content/renderer/render_thread_impl.cc
|
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
| index 99cb1a1c1a2d79079fe38ccedce61dd2064c0fed..671e14c612a762ffc3aa64f889530e1f03495064 100644
|
| --- a/content/renderer/render_thread_impl.cc
|
| +++ b/content/renderer/render_thread_impl.cc
|
| @@ -669,7 +669,18 @@ void RenderThreadImpl::EnsureWebKitInitialized() {
|
| #endif
|
| if (!compositor_message_loop_proxy_.get()) {
|
| compositor_thread_.reset(new base::Thread("Compositor"));
|
| +#if defined(OS_POSIX)
|
| + // Workaround for crbug.com/293736
|
| + // On Posix, MessagePumpDefault uses system time, so delayed tasks (for
|
| + // compositor scheduling) work incorrectly across system time changes
|
| + // (e.g. tlsdate). So instead, use an IO loop, which uses libevent, that
|
| + // uses monotonic time (immune to these problems).
|
| + base::Thread::Options options;
|
| + options.message_loop_type = base::MessageLoop::TYPE_IO;
|
| + compositor_thread_->StartWithOptions(options);
|
| +#else
|
| compositor_thread_->Start();
|
| +#endif
|
| #if defined(OS_ANDROID)
|
| compositor_thread_->SetPriority(base::kThreadPriority_Display);
|
| #endif
|
| @@ -1294,7 +1305,18 @@ RenderThreadImpl::GetMediaThreadMessageLoopProxy() {
|
| DCHECK(message_loop() == base::MessageLoop::current());
|
| if (!media_thread_) {
|
| media_thread_.reset(new base::Thread("Media"));
|
| +#if defined(OS_POSIX)
|
| + // Workaround for crbug.com/293736
|
| + // On Posix, MessagePumpDefault uses system time, so delayed tasks (for
|
| + // compositor scheduling) work incorrectly across system time changes
|
| + // (e.g. tlsdate). So instead, use an IO loop, which uses libevent, that
|
| + // uses monotonic time (immune to these problems).
|
| + base::Thread::Options options;
|
| + options.message_loop_type = base::MessageLoop::TYPE_IO;
|
| + media_thread_->StartWithOptions(options);
|
| +#else
|
| media_thread_->Start();
|
| +#endif
|
| }
|
| return media_thread_->message_loop_proxy();
|
| }
|
|
|