From 56991d86432919e2ed542010ea9953b209fada15 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Tue, 7 Apr 2015 16:53:41 -0400 Subject: [PATCH] Bug 1151890 - Explicitly set a null MessageLoop for the APZ controller thread on OS X. r=mstange --- widget/cocoa/nsChildView.h | 1 + widget/cocoa/nsChildView.mm | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index 995fd0ba03b..93ef1ce98e2 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -560,6 +560,7 @@ protected: } void ConfigureAPZCTreeManager() override; + void ConfigureAPZControllerThread() override; void DoRemoteComposition(const nsIntRect& aRenderRect); diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index e9a5947893d..cdba8da06f3 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -60,6 +60,7 @@ #include "ScopedGLHelpers.h" #include "HeapCopyOfStackArray.h" #include "mozilla/layers/APZCTreeManager.h" +#include "mozilla/layers/APZThreadUtils.h" #include "mozilla/layers/GLManager.h" #include "mozilla/layers/CompositorOGL.h" #include "mozilla/layers/CompositorParent.h" @@ -1890,6 +1891,14 @@ nsChildView::ConfigureAPZCTreeManager() gNumberOfWidgetsNeedingEventThread++; } +void +nsChildView::ConfigureAPZControllerThread() +{ + // On OS X the EventThreadRunner is the controller thread, but it doesn't + // have a MessageLoop. + APZThreadUtils::SetControllerThread(nullptr); +} + nsIntRect nsChildView::RectContainingTitlebarControls() {