Bug 1337388 - Remove unnecessary AsyncPanZoomEnabled check, and add a null guard. r=tnikkel, a=jcristau
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 07 Feb 2017 10:43:17 -0500
changeset 354207 11cbfffd2ea895aa26c0ebb7f83291b5c3ad98b4
parent 354206 878de02bf5c6399f6cd5b86315238de518d2c71b
child 354208 6f05f53c02cdac3254d2cbb8e93735d4be244969
push id6892
push userryanvm@gmail.com
push dateTue, 14 Feb 2017 16:13:02 +0000
treeherdermozilla-esr52@35e191e72900 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel, jcristau
bugs1337388
milestone52.0
Bug 1337388 - Remove unnecessary AsyncPanZoomEnabled check, and add a null guard. r=tnikkel, a=jcristau MozReview-Commit-ID: 87zwTEwPyLt
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3365,20 +3365,22 @@ nsLayoutUtils::ExpireDisplayPortOnAsyncS
       break;
     }
     nsIScrollableFrame* scrollAncestor = GetAsyncScrollableAncestorFrame(frame);
     if (!scrollAncestor) {
       break;
     }
     frame = do_QueryFrame(scrollAncestor);
     MOZ_ASSERT(frame);
+    if (!frame) {
+      break;
+    }
     MOZ_ASSERT(scrollAncestor->WantAsyncScroll() ||
       frame->PresContext()->PresShell()->GetRootScrollFrame() == frame);
-    if (nsLayoutUtils::AsyncPanZoomEnabled(frame) &&
-        nsLayoutUtils::HasDisplayPort(frame->GetContent())) {
+    if (nsLayoutUtils::HasDisplayPort(frame->GetContent())) {
       scrollAncestor->TriggerDisplayPortExpiration();
       // Stop after the first trigger. If it failed, there's no point in
       // continuing because all the rest of the frames we encounter are going
       // to be ancestors of |scrollAncestor| which will keep its displayport.
       // If the trigger succeeded, we stop because when the trigger executes
       // it will call this function again to trigger the next ancestor up the
       // chain.
       break;