зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1879862 - Make `PresShell::HandleEvent` check whether the frame is alive after flushing synthesized mouse move r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D201673
This commit is contained in:
Родитель
4f2316de76
Коммит
d38ecaa856
|
@ -6982,12 +6982,20 @@ nsresult PresShell::HandleEvent(nsIFrame* aFrameForPresShell,
|
|||
RefPtr<PresShell> rootPresShell =
|
||||
mPresContext->IsRoot() ? this : GetRootPresShell();
|
||||
if (rootPresShell && rootPresShell->mSynthMouseMoveEvent.IsPending()) {
|
||||
AutoWeakFrame frameForPresShellWeak(aFrameForPresShell);
|
||||
RefPtr<nsSynthMouseMoveEvent> synthMouseMoveEvent =
|
||||
rootPresShell->mSynthMouseMoveEvent.get();
|
||||
synthMouseMoveEvent->Run();
|
||||
}
|
||||
if (IsDestroying()) {
|
||||
return NS_OK;
|
||||
if (IsDestroying()) {
|
||||
return NS_OK;
|
||||
}
|
||||
// XXX If the frame or "this" is reframed, it might be better to
|
||||
// recompute the frame. However, it could treat the user input on
|
||||
// unexpected element. Therefore, we should not do that until we'd
|
||||
// get a bug report caused by that.
|
||||
if (MOZ_UNLIKELY(!frameForPresShellWeak.IsAlive())) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче