Bug 1370089 - Assume APZ is enabled in TabChild if we are queried before we have the compositor options. r?dvander
MozReview-Commit-ID: KHvAvGCQQUr
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -427,20 +427,21 @@ TabChild::TabChild(nsIContentChild* aMan
MOZ_ASSERT(NestedTabChildMap().find(mUniqueId) == NestedTabChildMap().end());
NestedTabChildMap()[mUniqueId] = this;
}
}
bool
TabChild::AsyncPanZoomEnabled() const
{
- // 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();
+ // This might get called by the TouchEvent::PrefEnabled code before we have
+ // mCompositorOptions populated (bug 1370089). In that case we just assume
+ // APZ is enabled because we're in a content process (because TabChild) and
+ // APZ is probably going to be enabled here since e10s is enabled.
+ return mCompositorOptions ? mCompositorOptions->UseAPZ() : true;
}
NS_IMETHODIMP
TabChild::Observe(nsISupports *aSubject,
const char *aTopic,
const char16_t *aData)
{
if (!strcmp(aTopic, BEFORE_FIRST_PAINT)) {