Bug 1575498 - Null-check state->mParent in GetStateForRoot(). r=hsivonen
authorBotond Ballo <botond@mozilla.com>
Thu, 22 Aug 2019 07:15:52 +0000
changeset 553194 ae871e76cfae261ee2a43f039dabb7f1a4d8c4a8
parent 553193 bf99d92d78057971af4c3db8b24c482ccb0654d5
child 553195 63633f034e0f2a8dc8e1f481ed00c84769d19096
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs1575498
milestone70.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 1575498 - Null-check state->mParent in GetStateForRoot(). r=hsivonen Differential Revision: https://phabricator.services.mozilla.com/D42909
gfx/layers/ipc/CompositorBridgeParent.cpp
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -2254,17 +2254,17 @@ static CompositorBridgeParent::LayerTree
   }
 
   // |state| is the state for the content process, but we want the APZCTMParent
   // for the parent process owning that content process. So we have to jump to
   // the LayerTreeState for the root layer tree id for that layer tree, and use
   // the mApzcTreeManagerParent from that. This should also work with nested
   // content processes, because RootLayerTreeId() will bypass any intermediate
   // processes' ids and go straight to the root.
-  if (state) {
+  if (state && state->mParent) {
     LayersId rootLayersId = state->mParent->RootLayerTreeId();
     itr = sIndirectLayerTrees.find(rootLayersId);
     state = (sIndirectLayerTrees.end() != itr) ? &itr->second : nullptr;
   }
 
   return state;
 }