mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 09:18:42 +09:00
Bug 1336011 - Fix Crash in InvalidArrayIndex_CRASH in mozilla::EditorBase::DeleteSelectionImpl
* EditorBase shouldn't refer mActionListeners directly in loops because it might be removed during a loop * Create an alias of the type of mEditorObservers * Create an alias of the type of mDocStateListeners Tag #1375
This commit is contained in:
parent
5b8f93694a
commit
31048968fd
2 changed files with 124 additions and 71 deletions
|
|
@ -987,11 +987,17 @@ protected:
|
|||
RefPtr<TextComposition> mComposition;
|
||||
|
||||
// Listens to all low level actions on the doc.
|
||||
nsTArray<OwningNonNull<nsIEditActionListener>> mActionListeners;
|
||||
typedef AutoTArray<OwningNonNull<nsIEditActionListener>, 5>
|
||||
AutoActionListenerArray;
|
||||
AutoActionListenerArray mActionListeners;
|
||||
// Just notify once per high level change.
|
||||
nsTArray<OwningNonNull<nsIEditorObserver>> mEditorObservers;
|
||||
typedef AutoTArray<OwningNonNull<nsIEditorObserver>, 3>
|
||||
AutoEditorObserverArray;
|
||||
AutoEditorObserverArray mEditorObservers;
|
||||
// Listen to overall doc state (dirty or not, just created, etc.).
|
||||
nsTArray<OwningNonNull<nsIDocumentStateListener>> mDocStateListeners;
|
||||
typedef AutoTArray<OwningNonNull<nsIDocumentStateListener>, 1>
|
||||
AutoDocumentStateListenerArray;
|
||||
AutoDocumentStateListenerArray mDocStateListeners;
|
||||
|
||||
// Cached selection for AutoSelectionRestorer.
|
||||
SelectionState mSavedSel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue