Bug 1337388 - Remove unnecessary AsyncPanZoomEnabled check, and add a null guard. r=tnikkel a=gchang
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 07 Feb 2017 10:43:17 -0500
changeset 376084 e9b44b27a129b0ef2cce1ba197534e1d12c26785
parent 376083 f02cc905662a4008a569381202a9494daf0d1bec
child 376085 6e2ea518c2b25ae4190d6304c20e423e39d93e46
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel, gchang
bugs1337388
milestone53.0a2
Bug 1337388 - Remove unnecessary AsyncPanZoomEnabled check, and add a null guard. r=tnikkel a=gchang MozReview-Commit-ID: 87zwTEwPyLt
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3389,20 +3389,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;