Bug 1255068 - Add a check for null scrollid. r=kats
authorMarkus Stange <mstange@themasta.com>
Thu, 24 Mar 2016 16:19:14 -0400
changeset 290765 a5d8c5b653338303e9335f6358dbbe8c9a9dde7b
parent 290764 0e1791fce8633506e53b34c18205d6b63ae07ba7
child 290766 dc4afd0b762634e6b1edb806e0749e69cbecc968
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1255068
milestone48.0a1
Bug 1255068 - Add a check for null scrollid. r=kats MozReview-Commit-ID: 15lbTMb76np
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -5471,16 +5471,19 @@ nsIFrame::InvalidateFrameWithRect(const 
 
 /*static*/ uint8_t nsIFrame::sLayerIsPrerenderedDataKey;
 
 static bool
 DoesLayerHaveOutOfDateFrameMetrics(Layer* aLayer)
 {
   for (uint32_t i = 0; i < aLayer->GetFrameMetricsCount(); i++) {
     const FrameMetrics& metrics = aLayer->GetFrameMetrics(i);
+    if (!metrics.IsScrollable()) {
+      continue;
+    }
     nsIScrollableFrame* scrollableFrame =
       nsLayoutUtils::FindScrollableFrameFor(metrics.GetScrollId());
     if (!scrollableFrame) {
       // This shouldn't happen, so let's do the safe thing and trigger a full
       // paint if it does.
       return true;
     }
     nsPoint scrollPosition = scrollableFrame->GetScrollPosition();