Bug 1260651 part.52 Rename nsAutoLockListener to mozilla::AutoLockListener r=mccr8
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 24 Jun 2016 21:22:26 +0900
changeset 346485 3863562790ed6df00144c0beb6ddaad4a63fed6f
parent 346484 617181bb9d3b7b3e8929cfc36ab00cb0c9a55e53
child 346486 9219a57782a244a4a2eb42a9ee3e257fd7c6fce0
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1260651
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1260651 part.52 Rename nsAutoLockListener to mozilla::AutoLockListener r=mccr8 MozReview-Commit-ID: 728oPlrpb3Q
editor/libeditor/HTMLEditRules.cpp
editor/libeditor/TextEditRules.h
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -1320,17 +1320,17 @@ HTMLEditRules::WillInsertText(EditAction
     NS_ENSURE_STATE(mHTMLEditor);
     res = mHTMLEditor->IsPreformatted(GetAsDOMNode(selNode), &isPRE);
     NS_ENSURE_SUCCESS(res, res);
 
     // turn off the edit listener: we know how to
     // build the "doc changed range" ourselves, and it's
     // must faster to do it once here than to track all
     // the changes one at a time.
-    nsAutoLockListener lockit(&mListenerEnabled);
+    AutoLockListener lockit(&mListenerEnabled);
 
     // don't spaz my selection in subtransactions
     NS_ENSURE_STATE(mHTMLEditor);
     AutoTransactionsConserveSelection dontSpazMySelection(mHTMLEditor);
     nsAutoString tString(*inString);
     const char16_t *unicodeBuf = tString.get();
     int32_t pos = 0;
     NS_NAMED_LITERAL_STRING(newlineStr, LFSTR);
--- a/editor/libeditor/TextEditRules.h
+++ b/editor/libeditor/TextEditRules.h
@@ -319,39 +319,39 @@ public:
       mRules->mLockRulesSniffing = false;
     }
   }
 
 protected:
   TextEditRules* mRules;
 };
 
-} // namespace mozilla
-
-/***************************************************************************
- * stack based helper class for turning on/off the edit listener.
+/**
+ * Stack based helper class for turning on/off the edit listener.
  */
-class nsAutoLockListener
+class MOZ_STACK_CLASS AutoLockListener final
 {
 public:
-
-  explicit nsAutoLockListener(bool *enabled)
-    : mEnabled(enabled), mOldState(false)
+  explicit AutoLockListener(bool* aEnabled)
+    : mEnabled(aEnabled)
+    , mOldState(false)
   {
     if (mEnabled) {
       mOldState = *mEnabled;
       *mEnabled = false;
     }
   }
 
-  ~nsAutoLockListener()
+  ~AutoLockListener()
   {
     if (mEnabled) {
       *mEnabled = mOldState;
     }
   }
 
 protected:
-  bool *mEnabled;
+  bool* mEnabled;
   bool mOldState;
 };
 
+} // namespace mozilla
+
 #endif // #ifndef mozilla_TextEditRules_h