Bug 1286709 - Assert the non-nullness of an GetApzc() call's return value. r=kats.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 15 Jul 2016 09:19:57 +1000
changeset 388809 994235fda74bd1d05003546f98d23e46f6ceecef
parent 388808 3e207bf6785484173d3131504417cb78c706f738
child 388810 5102f1b9bccae81f88e8431c817d6ecce5c45529
push id23237
push userbmo:gasolin@mozilla.com
push dateMon, 18 Jul 2016 01:24:34 +0000
reviewerskats
bugs1286709
milestone50.0a1
Bug 1286709 - Assert the non-nullness of an GetApzc() call's return value. r=kats.
gfx/layers/composite/AsyncCompositionManager.cpp
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -1101,16 +1101,17 @@ ApplyAsyncTransformToScrollbarForContent
   // layer has been built for a scroll frame, as this would result in a
   // disparity between scrollbars and visible content.
   if (aContent.IsScrollInfoLayer()) {
     return;
   }
 
   const FrameMetrics& metrics = aContent.Metrics();
   AsyncPanZoomController* apzc = aContent.GetApzc();
+  MOZ_RELEASE_ASSERT(apzc);
 
   AsyncTransformComponentMatrix asyncTransform =
     apzc->GetCurrentAsyncTransform(AsyncPanZoomController::RESPECT_FORCE_DISABLE);
 
   // |asyncTransform| represents the amount by which we have scrolled and
   // zoomed since the last paint. Because the scrollbar was sized and positioned based
   // on the painted content, we need to adjust it based on asyncTransform so that
   // it reflects what the user is actually seeing now.