Bug 1357872, nsPresContext is refcounted, so use it so, r=kats

This commit is contained in:
Olli Pettay 2017-04-25 00:38:33 +03:00
parent 07f5d65c45
commit 933a8daf58

View File

@ -223,8 +223,8 @@ TouchEvent::PrefEnabled(nsIDocShell* aDocShell)
if (enabled && aDocShell) {
// APZ might be disabled on this particular widget, in which case
// TouchEvent support will also be disabled. Try to detect that.
nsPresContext* pc = nullptr;
aDocShell->GetPresContext(&pc);
RefPtr<nsPresContext> pc;
aDocShell->GetPresContext(getter_AddRefs(pc));
if (pc && pc->GetRootWidget()) {
enabled &= pc->GetRootWidget()->AsyncPanZoomEnabled();
}