mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 1698582 - Simplify the CoalescedMouseMoveFlusher::GetRefreshDriver method.r=sefeng
This patch simplifies the null-checks in CoalescedMouseMoveFlusher::GetRefreshDriver Differential Revision: https://phabricator.services.mozilla.com/D108492
This commit is contained in:
parent
59df028a0f
commit
e5bc013bd0
@ -106,10 +106,8 @@ CoalescedMouseMoveFlusher::CoalescedMouseMoveFlusher(
|
||||
CoalescedMouseMoveFlusher::~CoalescedMouseMoveFlusher() { RemoveObserver(); }
|
||||
|
||||
nsRefreshDriver* CoalescedMouseMoveFlusher::GetRefreshDriver() {
|
||||
PresShell* presShell = mBrowserChild->GetTopLevelPresShell();
|
||||
if (!presShell || !presShell->GetPresContext() ||
|
||||
!presShell->GetPresContext()->RefreshDriver()) {
|
||||
return nullptr;
|
||||
if (PresShell* presShell = mBrowserChild->GetTopLevelPresShell()) {
|
||||
return presShell->GetRefreshDriver();
|
||||
}
|
||||
return presShell->GetPresContext()->RefreshDriver();
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user