Bug 1331509 - Always return the correct APZ state, since we should have it. r=dvander
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 17 Jan 2017 15:52:46 -0500
changeset 377149 8d8e6116ed6ddbd99a528fcd8911e559336b938f
parent 377148 edcd2bd8340d4fceac08c0b904096275a4e29703
child 377150 1b00058c2288f0c41fde073ef20cf5dc2be26011
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1331509
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1331509 - Always return the correct APZ state, since we should have it. r=dvander MozReview-Commit-ID: CrLri2Qucj0
dom/ipc/TabChild.cpp
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -422,20 +422,20 @@ TabChild::TabChild(nsIContentChild* aMan
   for (uint32_t idx = 0; idx < NUMBER_OF_AUDIO_CHANNELS; idx++) {
     mAudioChannelsActive.AppendElement(false);
   }
 }
 
 bool
 TabChild::AsyncPanZoomEnabled() const
 {
-  // If we have received the CompositorOptions we can answer definitively. If
-  // not, return a best guess based on gfxPlaform values.
-  return mCompositorOptions ? mCompositorOptions->UseAPZ()
-                            : gfxPlatform::AsyncPanZoomEnabled();
+  // By the time anybody calls this, we must have had InitRenderingState called
+  // already, and so mCompositorOptions should be populated.
+  MOZ_RELEASE_ASSERT(mCompositorOptions);
+  return mCompositorOptions->UseAPZ();
 }
 
 NS_IMETHODIMP
 TabChild::Observe(nsISupports *aSubject,
                   const char *aTopic,
                   const char16_t *aData)
 {
   if (!strcmp(aTopic, BEFORE_FIRST_PAINT)) {