mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Make sure we remove our RefreshDriver observers in CompleteAsyncScroll.
Follow-up to fdbac095968bc952fec6a03765a7156940ae4733
This commit is contained in:
parent
930cc1db3b
commit
bf30898e2c
2 changed files with 12 additions and 2 deletions
|
|
@ -2152,8 +2152,7 @@ void
|
|||
ScrollFrameHelper::CompleteAsyncScroll(const nsRect &aRange, nsIAtom* aOrigin)
|
||||
{
|
||||
// Apply desired destination range since this is the last step of scrolling.
|
||||
mAsyncSmoothMSDScroll = nullptr;
|
||||
mAsyncScroll = nullptr;
|
||||
RemoveObservers();
|
||||
nsWeakFrame weakFrame(mOuter);
|
||||
ScrollToImpl(mDestination, aRange, aOrigin);
|
||||
if (!weakFrame.IsAlive()) {
|
||||
|
|
@ -4588,11 +4587,19 @@ ScrollFrameHelper::Destroy()
|
|||
mScrollActivityTimer->Cancel();
|
||||
mScrollActivityTimer = nullptr;
|
||||
}
|
||||
RemoveObservers();
|
||||
}
|
||||
|
||||
void
|
||||
ScrollFrameHelper::RemoveObservers()
|
||||
{
|
||||
if (mAsyncScroll) {
|
||||
mAsyncScroll->RemoveObserver();
|
||||
mAsyncScroll = nullptr;
|
||||
}
|
||||
if (mAsyncSmoothMSDScroll) {
|
||||
mAsyncSmoothMSDScroll->RemoveObserver();
|
||||
mAsyncSmoothMSDScroll = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue