mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 03:49:42 +00:00
Bug 1709976 - Remove selection listeners from shutting down PresShell. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D115839
This commit is contained in:
parent
2548bdf8e1
commit
ebd42829f3
@ -101,6 +101,24 @@ void SelectionManager::RemoveDocSelectionListener(PresShell* aPresShell) {
|
||||
// selection.
|
||||
Selection* spellSel = frameSel->GetSelection(SelectionType::eSpellCheck);
|
||||
spellSel->RemoveSelectionListener(this);
|
||||
|
||||
if (mCurrCtrlNormalSel) {
|
||||
if (mCurrCtrlNormalSel->GetPresShell() == aPresShell) {
|
||||
// Remove 'this' registered as selection listener for the normal selection
|
||||
// if we are removing listeners for its PresShell.
|
||||
mCurrCtrlNormalSel->RemoveSelectionListener(this);
|
||||
mCurrCtrlNormalSel = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (mCurrCtrlSpellSel) {
|
||||
if (mCurrCtrlSpellSel->GetPresShell() == aPresShell) {
|
||||
// Remove 'this' registered as selection listener for the spellcheck
|
||||
// selection if we are removing listeners for its PresShell.
|
||||
mCurrCtrlSpellSel->RemoveSelectionListener(this);
|
||||
mCurrCtrlSpellSel = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SelectionManager::ProcessTextSelChangeEvent(AccEvent* aEvent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user