From 0c2e1ab7dd0581cc3faa5379bc83467031269753 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 00838ac1e9ce..397513cd526c 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 e9a5947893df..cdba8da06f30 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() {