Bug 856108 - Port static analyses to clang, part 2h: use MOZ_STACK_CLASS everywhere else. r=bsmedberg
authorJoshua Cranmer <Pidgeot18@gmail.com>
Thu, 11 Apr 2013 22:22:09 -0500
changeset 128546 ece8b0253775ad24c18c2effa278e360e22bf699
parent 128545 2a343ec4a75cafd3e7eb7c8e56f39ba2998daf22
child 128547 13c33b6d787db2947208df0b2263f16fdceacfd1
push id24529
push userryanvm@gmail.com
push dateFri, 12 Apr 2013 11:51:36 +0000
treeherdermozilla-central@5bc732a49eae [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs856108
milestone23.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 856108 - Port static analyses to clang, part 2h: use MOZ_STACK_CLASS everywhere else. r=bsmedberg
docshell/base/nsDocShell.cpp
embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
embedding/components/windowwatcher/src/nsWindowWatcher.cpp
extensions/spellcheck/src/mozInlineSpellWordUtil.cpp
ipc/glue/RPCChannel.h
ipc/glue/SyncChannel.h
parser/html/nsHtml5DependentUTF16Buffer.h
parser/html/nsHtml5TreeOperation.cpp
storage/public/mozStorageHelper.h
storage/src/SQLiteMutex.h
tools/profiler/GeckoProfilerImpl.h
view/public/nsViewManager.h
widget/windows/nsTextStore.h
xpfe/appshell/src/nsContentTreeOwner.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -10901,17 +10901,17 @@ nsDocShell::WalkHistoryEntries(nsISHEntr
         nsresult rv = aCallback(childEntry, childShell, i, aData);
         NS_ENSURE_SUCCESS(rv, rv);
     }
 
     return NS_OK;
 }
 
 // callback data for WalkHistoryEntries
-struct NS_STACK_CLASS CloneAndReplaceData
+struct MOZ_STACK_CLASS CloneAndReplaceData
 {
     CloneAndReplaceData(uint32_t aCloneID, nsISHEntry *aReplaceEntry,
                         bool aCloneChildren, nsISHEntry *aDestTreeParent)
         : cloneID(aCloneID),
           cloneChildren(aCloneChildren),
           replaceEntry(aReplaceEntry),
           destTreeParent(aDestTreeParent) { }
 
--- a/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
+++ b/embedding/components/webbrowserpersist/src/nsWebBrowserPersist.cpp
@@ -2361,17 +2361,17 @@ public:
     nsresult GetISupports(nsISupports **ret)
     {
         *ret = mKey;
         NS_IF_ADDREF(mKey);
         return NS_OK;
     }
 };
 
-struct NS_STACK_CLASS FixRedirectData
+struct MOZ_STACK_CLASS FixRedirectData
 {
     nsCOMPtr<nsIChannel> mNewChannel;
     nsCOMPtr<nsIURI> mOriginalURI;
     nsISupportsKey *mMatchingKey;
 };
 
 nsresult
 nsWebBrowserPersist::FixRedirectedChannelEntry(nsIChannel *aNewChannel)
--- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -235,17 +235,17 @@ void nsWatcherWindowEnumerator::WindowRe
     mCurrentPosition = mCurrentPosition != inInfo->mYounger ?
                        inInfo->mYounger : 0;
 }
 
 /****************************************************************
  ********************** JSContextAutoPopper *********************
  ****************************************************************/
 
-class NS_STACK_CLASS JSContextAutoPopper {
+class MOZ_STACK_CLASS JSContextAutoPopper {
 public:
   JSContextAutoPopper();
   ~JSContextAutoPopper();
 
   nsresult   Push(JSContext *cx = nullptr);
   JSContext *get() { return mContext; }
 
 protected:
--- a/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp
@@ -758,17 +758,17 @@ mozInlineSpellWordUtil::FindRealWordCont
 
 // classifies a given character in the DOM word
 enum CharClass {
   CHAR_CLASS_WORD,
   CHAR_CLASS_SEPARATOR,
   CHAR_CLASS_END_OF_INPUT };
 
 // Encapsulates DOM-word to real-word splitting
-struct NS_STACK_CLASS WordSplitState
+struct MOZ_STACK_CLASS WordSplitState
 {
   mozInlineSpellWordUtil*    mWordUtil;
   const nsDependentSubstring mDOMWordText;
   int32_t                    mDOMWordOffset;
   CharClass                  mCurCharClass;
 
   WordSplitState(mozInlineSpellWordUtil* aWordUtil,
                  const nsString& aString, int32_t aStart, int32_t aLen)
--- a/ipc/glue/RPCChannel.h
+++ b/ipc/glue/RPCChannel.h
@@ -233,17 +233,17 @@ private:
             *sems = mMsg->is_rpc() ? "rpc" : mMsg->is_sync() ? "sync" : "async";
             *name = mMsg->name();
         }
 
         Direction mDirection;
         const Message* mMsg;
     };
 
-    class NS_STACK_CLASS CxxStackFrame
+    class MOZ_STACK_CLASS CxxStackFrame
     {
     public:
 
         CxxStackFrame(RPCChannel& that, Direction direction,
                       const Message* msg) : mThat(that) {
             mThat.AssertWorkerThread();
 
             if (mThat.mCxxStackFrames.empty())
--- a/ipc/glue/SyncChannel.h
+++ b/ipc/glue/SyncChannel.h
@@ -62,17 +62,17 @@ public:
         return sIsPumpingMessages;
     }
     static void SetIsPumpingMessages(bool aIsPumping) {
         sIsPumpingMessages = aIsPumping;
     }
 
 #ifdef OS_WIN
 public:
-    struct NS_STACK_CLASS SyncStackFrame
+    struct MOZ_STACK_CLASS SyncStackFrame
     {
         SyncStackFrame(SyncChannel* channel, bool rpc);
         ~SyncStackFrame();
 
         bool mRPC;
         bool mSpinNestedEvents;
         bool mListenerNotified;
         SyncChannel* mChannel;
--- a/parser/html/nsHtml5DependentUTF16Buffer.h
+++ b/parser/html/nsHtml5DependentUTF16Buffer.h
@@ -3,17 +3,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsHtml5DependentUTF16Buffer_h_
 #define nsHtml5DependentUTF16Buffer_h_
 
 #include "nscore.h"
 #include "nsHtml5OwningUTF16Buffer.h"
 
-class NS_STACK_CLASS nsHtml5DependentUTF16Buffer : public nsHtml5UTF16Buffer
+class MOZ_STACK_CLASS nsHtml5DependentUTF16Buffer : public nsHtml5UTF16Buffer
 {
   public:
     /**
      * Wraps a string without taking ownership of the buffer. aToWrap MUST NOT
      * go away or be shortened while nsHtml5DependentUTF16Buffer is in use.
      */
     nsHtml5DependentUTF16Buffer(const nsAString& aToWrap);
 
--- a/parser/html/nsHtml5TreeOperation.cpp
+++ b/parser/html/nsHtml5TreeOperation.cpp
@@ -44,17 +44,17 @@
 namespace dom = mozilla::dom;
 
 static NS_DEFINE_CID(kFormProcessorCID, NS_FORMPROCESSOR_CID);
 
 /**
  * Helper class that opens a notification batch if the current doc
  * is different from the executor doc.
  */
-class NS_STACK_CLASS nsHtml5OtherDocUpdate {
+class MOZ_STACK_CLASS nsHtml5OtherDocUpdate {
   public:
     nsHtml5OtherDocUpdate(nsIDocument* aCurrentDoc, nsIDocument* aExecutorDoc)
     {
       NS_PRECONDITION(aCurrentDoc, "Node has no doc?");
       NS_PRECONDITION(aExecutorDoc, "Executor has no doc?");
       if (MOZ_LIKELY(aCurrentDoc == aExecutorDoc)) {
         mDocument = nullptr;
       } else {
--- a/storage/public/mozStorageHelper.h
+++ b/storage/public/mozStorageHelper.h
@@ -128,17 +128,17 @@ protected:
 
 /**
  * This class wraps a statement so that it is guaraneed to be reset when
  * this object goes out of scope.
  *
  * Note that this always just resets the statement. If the statement doesn't
  * need resetting, the reset operation is inexpensive.
  */
-class NS_STACK_CLASS mozStorageStatementScoper
+class MOZ_STACK_CLASS mozStorageStatementScoper
 {
 public:
   mozStorageStatementScoper(mozIStorageStatement* aStatement)
       : mStatement(aStatement)
   {
   }
   ~mozStorageStatementScoper()
   {
--- a/storage/src/SQLiteMutex.h
+++ b/storage/src/SQLiteMutex.h
@@ -123,17 +123,17 @@ public:
 private:
   sqlite3_mutex *mMutex;
 };
 
 /**
  * Automatically acquires the mutex when it enters scope, and releases it when
  * it leaves scope.
  */
-class NS_STACK_CLASS SQLiteMutexAutoLock
+class MOZ_STACK_CLASS SQLiteMutexAutoLock
 {
 public:
   SQLiteMutexAutoLock(SQLiteMutex &aMutex)
   : mMutex(aMutex)
   {
     mMutex.lock();
   }
 
@@ -145,17 +145,17 @@ public:
 private:
   SQLiteMutex &mMutex;
 };
 
 /**
  * Automatically releases the mutex when it enters scope, and acquires it when
  * it leaves scope.
  */
-class NS_STACK_CLASS SQLiteMutexAutoUnlock
+class MOZ_STACK_CLASS SQLiteMutexAutoUnlock
 {
 public:
   SQLiteMutexAutoUnlock(SQLiteMutex &aMutex)
   : mMutex(aMutex)
   {
     mMutex.unlock();
   }
 
--- a/tools/profiler/GeckoProfilerImpl.h
+++ b/tools/profiler/GeckoProfilerImpl.h
@@ -188,31 +188,31 @@ void profiler_unlock()
 #else
 #define PROFILE_DEFAULT_INTERVAL 1
 #endif
 #define PROFILE_DEFAULT_FEATURES NULL
 #define PROFILE_DEFAULT_FEATURE_COUNT 0
 
 namespace mozilla {
 
-class NS_STACK_CLASS SamplerStackFrameRAII {
+class MOZ_STACK_CLASS SamplerStackFrameRAII {
 public:
   // we only copy the strings at save time, so to take multiple parameters we'd need to copy them then.
   SamplerStackFrameRAII(const char *aInfo, uint32_t line) {
     mHandle = mozilla_sampler_call_enter(aInfo, this, false, line);
   }
   ~SamplerStackFrameRAII() {
     mozilla_sampler_call_exit(mHandle);
   }
 private:
   void* mHandle;
 };
 
 static const int SAMPLER_MAX_STRING = 128;
-class NS_STACK_CLASS SamplerStackFramePrintfRAII {
+class MOZ_STACK_CLASS SamplerStackFramePrintfRAII {
 public:
   // we only copy the strings at save time, so to take multiple parameters we'd need to copy them then.
   SamplerStackFramePrintfRAII(const char *aDefault, uint32_t line, const char *aFormat, ...) {
     if (profiler_is_active()) {
       va_list args;
       va_start(args, aFormat);
       char buff[SAMPLER_MAX_STRING];
 
--- a/view/public/nsViewManager.h
+++ b/view/public/nsViewManager.h
@@ -243,17 +243,17 @@ public:
    * While refresh is disabled, widget geometry changes are deferred and will
    * be handled later, either from the refresh driver or from an NS_WILL_PAINT
    * event.
    * We don't want to defer widget geometry changes all the time. Resizing a
    * popup from script doesn't need to be deferred, for example, especially
    * since popup widget geometry is observable from script and expected to
    * update synchronously.
    */
-  class NS_STACK_CLASS AutoDisableRefresh {
+  class MOZ_STACK_CLASS AutoDisableRefresh {
   public:
     AutoDisableRefresh(nsViewManager* aVM) {
       if (aVM) {
         mRootVM = aVM->IncrementDisableRefreshCount();
       }
     }
     ~AutoDisableRefresh() {
       if (mRootVM) {
--- a/widget/windows/nsTextStore.h
+++ b/widget/windows/nsTextStore.h
@@ -487,17 +487,17 @@ protected:
     // most cases.
     newAction->mRanges.SetCapacity(4);
     return newAction;
   }
 
   // When On*Composition() is called without document lock, we need to flush
   // the recorded actions at quitting the method.
   // AutoPendingActionAndContentFlusher class is usedful for it.  
-  class NS_STACK_CLASS AutoPendingActionAndContentFlusher MOZ_FINAL
+  class MOZ_STACK_CLASS AutoPendingActionAndContentFlusher MOZ_FINAL
   {
   public:
     AutoPendingActionAndContentFlusher(nsTextStore* aTextStore)
       : mTextStore(aTextStore)
     {
       MOZ_ASSERT(!mTextStore->mIsRecordingActionsWithoutLock);
       if (!mTextStore->IsReadWriteLocked()) {
         mTextStore->mIsRecordingActionsWithoutLock = true;
--- a/xpfe/appshell/src/nsContentTreeOwner.cpp
+++ b/xpfe/appshell/src/nsContentTreeOwner.cpp
@@ -782,17 +782,17 @@ NS_IMETHODIMP nsContentTreeOwner::SetTit
     if (document) {
       return document->SetTitle(title);
     }
   }
 
   return mXULWindow->SetTitle(title.get());
 }
 
-NS_STACK_CLASS class NullJSContextPusher {
+class MOZ_STACK_CLASS NullJSContextPusher {
 public:
   NullJSContextPusher() {
     mService = do_GetService(sJSStackContractID);
     if (mService) {
 #ifdef DEBUG
       nsresult rv =
 #endif
         mService->Push(nullptr);