From 431e1a12b33451ad174e3baaecf12798ede131fb Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Tue, 7 Feb 2017 22:52:23 +0900 Subject: [PATCH] Bug 1336011 part.3 Create an alias of the type of mDocStateListeners r=smaug MozReview-Commit-ID: L0TczDcH4t8 --HG-- extra : rebase_source : 0a250056797c6fb760e7aa674565d3e71df6f568 --- editor/libeditor/EditorBase.cpp | 3 +-- editor/libeditor/EditorBase.h | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index d7f1ad1fbd9c..ba323d6a14b0 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -2622,8 +2622,7 @@ EditorBase::NotifyDocumentListeners( return NS_OK; } - nsTArray> - listeners(mDocStateListeners); + AutoDocumentStateListenerArray listeners(mDocStateListeners); nsresult rv = NS_OK; switch (aNotificationType) { diff --git a/editor/libeditor/EditorBase.h b/editor/libeditor/EditorBase.h index 587c77064d7e..568855a67ad2 100644 --- a/editor/libeditor/EditorBase.h +++ b/editor/libeditor/EditorBase.h @@ -1011,7 +1011,9 @@ protected: AutoEditorObserverArray; AutoEditorObserverArray mEditorObservers; // Listen to overall doc state (dirty or not, just created, etc.). - nsTArray> mDocStateListeners; + typedef AutoTArray, 1> + AutoDocumentStateListenerArray; + AutoDocumentStateListenerArray mDocStateListeners; // Cached selection for AutoSelectionRestorer. SelectionState mSavedSel;