Bug 1292441 - Part 1: Avoid crashes when 'reftest-opaque-layer' is specified against an element having an display item which is not assigned to a PaintedLayer. r=mstange
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Mon, 08 Aug 2016 09:41:50 +0900
changeset 308537 00ae10ae77aacad92ebf53678b2b1f4fb336503e
parent 308536 3e566caff5953436e90c320ca6737e897770472a
child 308538 8670b9482db9a567db2a1e6816b86d5f0abcca82
push id31137
push userhiikezoe@mozilla-japan.org
push dateMon, 08 Aug 2016 07:12:08 +0000
treeherderautoland@8670b9482db9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1292441
milestone51.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 1292441 - Part 1: Avoid crashes when 'reftest-opaque-layer' is specified against an element having an display item which is not assigned to a PaintedLayer. r=mstange MozReview-Commit-ID: HISvrzIwUZ2
layout/base/FrameLayerBuilder.cpp
--- a/layout/base/FrameLayerBuilder.cpp
+++ b/layout/base/FrameLayerBuilder.cpp
@@ -2042,16 +2042,21 @@ FrameLayerBuilder::GetDebugSingleOldPain
       continue;
     }
     if (layer && layer != data->mLayer) {
       // More than one layer assigned, bail.
       return nullptr;
     }
     layer = data->mLayer;
   }
+
+  if (!layer) {
+    return nullptr;
+  }
+
   return layer->AsPaintedLayer();
 }
 
 // Reset state that should not persist when a layer is recycled.
 static void
 ResetLayerStateForRecycling(Layer* aLayer) {
   // Currently, this clears the mask layer and ancestor mask layers.
   // Other cleanup may be added here.