Bug 1507068 - Ensure mParent is not null in mozilla::layers::CompositorBridgeParent::GetAndroidDynamicToolbarAnimator r=snorp,kats
authorRandall Barker <rbarker@mozilla.com>
Fri, 16 Nov 2018 14:41:08 +0000
changeset 503224 599db31d59659e1e1bbf37eea6d12194811aa384
parent 503223 68841d4d23dafb234273bbe4e6dbf06056c4ffe9
child 503225 e7720f22eab1ee92b069bcee8b504e9e1e67c8cd
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp, kats
bugs1507068
milestone65.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 1507068 - Ensure mParent is not null in mozilla::layers::CompositorBridgeParent::GetAndroidDynamicToolbarAnimator r=snorp,kats Speculative fix for Bug 1507068. Checks if mParent is not null before trying to get a pointer to the toolbar animator Differential Revision: https://phabricator.services.mozilla.com/D11957
gfx/layers/ipc/UiCompositorControllerParent.cpp
--- a/gfx/layers/ipc/UiCompositorControllerParent.cpp
+++ b/gfx/layers/ipc/UiCompositorControllerParent.cpp
@@ -295,16 +295,19 @@ UiCompositorControllerParent::Initialize
 void
 UiCompositorControllerParent::Initialize()
 {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
   AddRef();
   LayerTreeState* state = CompositorBridgeParent::GetIndirectShadowTree(mRootLayerTreeId);
   MOZ_ASSERT(state);
   MOZ_ASSERT(state->mParent);
+  if (!state->mParent) {
+    return;
+  }
   state->mUiControllerParent = this;
 #if defined(MOZ_WIDGET_ANDROID)
   AndroidDynamicToolbarAnimator* animator = state->mParent->GetAndroidDynamicToolbarAnimator();
   // It is possible the compositor has already started shutting down and
   // the AndroidDynamicToolbarAnimator could be a nullptr. Or this could be
   // non-Fennec in which case the animator is null anyway.
   if (animator) {
     animator->Initialize(mRootLayerTreeId);