Bug 1337388 - Remove unnecessary AsyncPanZoomEnabled check, and add a null guard. r=tnikkel
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 07 Feb 2017 10:43:17 -0500
changeset 341157 bebe84133caea1d025c3600dc3bcbaed119bbb50
parent 341156 41a83fd7b7b81ff985fd989df767487a08b1d0ee
child 341158 38740bd3a50e9d9ecec61bedc69092c1f49def88
push id37051
push userkgupta@mozilla.com
push dateTue, 07 Feb 2017 19:50:36 +0000
treeherderautoland@bebe84133cae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel
bugs1337388
milestone54.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 1337388 - Remove unnecessary AsyncPanZoomEnabled check, and add a null guard. r=tnikkel 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;