From 62cc037b2e26efd6dfa29818f160a27576ef1410 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Mon, 19 Dec 2011 10:43:08 -0800 Subject: [PATCH] Back out bcf9ce858829 and a3bade82ac92 (bug 711799) for build failures --- netwerk/base/src/nsDirectoryIndexStream.h | 4 +- netwerk/base/src/nsIncrementalDownload.cpp | 15 +++---- tools/trace-malloc/lib/nsTraceMalloc.c | 2 +- tools/trace-malloc/lib/nsTypeInfo.cpp | 2 +- tools/trace-malloc/lib/nsTypeInfo.h | 52 ---------------------- tools/trace-malloc/spacetrace.c | 2 +- xpcom/base/nsConsoleService.h | 4 +- xpcom/base/nsExceptionService.cpp | 2 +- xpcom/base/nsExceptionService.h | 4 +- xpcom/base/nsUUIDGenerator.h | 4 +- xpcom/base/nsVersionComparatorImpl.h | 2 +- xpcom/components/ModuleUtils.h | 3 +- xpcom/ds/nsByteBuffer.h | 4 +- xpcom/ds/nsSupportsPrimitives.h | 38 ++++++++-------- xpcom/glue/nsCategoryCache.h | 4 +- 15 files changed, 37 insertions(+), 105 deletions(-) delete mode 100644 tools/trace-malloc/lib/nsTypeInfo.h diff --git a/netwerk/base/src/nsDirectoryIndexStream.h b/netwerk/base/src/nsDirectoryIndexStream.h index dbeb0d4ba14..0fe473e528f 100644 --- a/netwerk/base/src/nsDirectoryIndexStream.h +++ b/netwerk/base/src/nsDirectoryIndexStream.h @@ -38,8 +38,6 @@ #ifndef nsDirectoryIndexStream_h__ #define nsDirectoryIndexStream_h__ -#include "mozilla/Attributes.h" - #include "nsIFile.h" #include "nsString.h" #include "nsIInputStream.h" @@ -47,7 +45,7 @@ #include "nsCOMArray.h" #include "nsITextToSubURI.h" -class nsDirectoryIndexStream MOZ_FINAL : public nsIInputStream +class nsDirectoryIndexStream : public nsIInputStream { private: nsCString mBuf; diff --git a/netwerk/base/src/nsIncrementalDownload.cpp b/netwerk/base/src/nsIncrementalDownload.cpp index 2d37f6a4761..e264f54f954 100644 --- a/netwerk/base/src/nsIncrementalDownload.cpp +++ b/netwerk/base/src/nsIncrementalDownload.cpp @@ -120,14 +120,13 @@ MakeRangeSpec(const PRInt64 &size, const PRInt64 &maxSize, PRInt32 chunkSize, //----------------------------------------------------------------------------- -class nsIncrementalDownload MOZ_FINAL - : public nsIIncrementalDownload - , public nsIStreamListener - , public nsIObserver - , public nsIInterfaceRequestor - , public nsIChannelEventSink - , public nsSupportsWeakReference - , public nsIAsyncVerifyRedirectCallback +class nsIncrementalDownload : public nsIIncrementalDownload + , public nsIStreamListener + , public nsIObserver + , public nsIInterfaceRequestor + , public nsIChannelEventSink + , public nsSupportsWeakReference + , public nsIAsyncVerifyRedirectCallback { public: NS_DECL_ISUPPORTS diff --git a/tools/trace-malloc/lib/nsTraceMalloc.c b/tools/trace-malloc/lib/nsTraceMalloc.c index 389d29f2512..72098ace3d3 100644 --- a/tools/trace-malloc/lib/nsTraceMalloc.c +++ b/tools/trace-malloc/lib/nsTraceMalloc.c @@ -68,7 +68,6 @@ #include "plstr.h" #include "nsStackWalk.h" #include "nsTraceMallocCallbacks.h" -#include "nsTypeInfo.h" #if defined(XP_MACOSX) @@ -1751,6 +1750,7 @@ allocation_enumerator(PLHashEntry *he, PRIntn i, void *arg) FILE *ofp = (FILE*) arg; callsite *site = (callsite*) he->value; + extern const char* nsGetTypeName(const void* ptr); unsigned long *p, *end; fprintf(ofp, "%p <%s> (%lu)\n", diff --git a/tools/trace-malloc/lib/nsTypeInfo.cpp b/tools/trace-malloc/lib/nsTypeInfo.cpp index a6ec505ee4d..db3d4c1c352 100644 --- a/tools/trace-malloc/lib/nsTypeInfo.cpp +++ b/tools/trace-malloc/lib/nsTypeInfo.cpp @@ -52,7 +52,7 @@ #include #include -#include "nsTypeInfo.h" +extern "C" const char* nsGetTypeName(void* ptr); extern "C" void NS_TraceMallocShutdown(); diff --git a/tools/trace-malloc/lib/nsTypeInfo.h b/tools/trace-malloc/lib/nsTypeInfo.h deleted file mode 100644 index 04daa78914c..00000000000 --- a/tools/trace-malloc/lib/nsTypeInfo.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * - * ***** BEGIN LICENSE BLOCK ***** - * Version: MPL 1.1/GPL 2.0/LGPL 2.1 - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * The Original Code is mozilla.org code. - * - * The Initial Developer of the Original Code is - * the Mozilla Foundation. - * Portions created by the Initial Developer are Copyright (C) 2011 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), - * in which case the provisions of the GPL or the LGPL are applicable instead - * of those above. If you wish to allow use of your version of this file only - * under the terms of either the GPL or the LGPL, and not to allow others to - * use your version of this file under the terms of the MPL, indicate your - * decision by deleting the provisions above and replace them with the notice - * and other provisions required by the GPL or the LGPL. If you do not delete - * the provisions above, a recipient may use your version of this file under - * the terms of any one of the MPL, the GPL or the LGPL. - * - * ***** END LICENSE BLOCK ***** */ - -#ifndef trace_malloc_nsTypeInfo_h_ -#define trace_malloc_nsTypeInfo_h_ - -#include "prtypes.h" - -PR_BEGIN_EXTERN_C - -extern const char* nsGetTypeName(void* ptr); - -extern void RegisterTraceMallocShutdown(); - -PR_END_EXTERN_C - -#endif /* trace_malloc_nsTypeInfo_h_ */ diff --git a/tools/trace-malloc/spacetrace.c b/tools/trace-malloc/spacetrace.c index 68e3cd09ec0..82ad7af4da5 100644 --- a/tools/trace-malloc/spacetrace.c +++ b/tools/trace-malloc/spacetrace.c @@ -1920,7 +1920,7 @@ static const char spinner_chars[] = { '/', '-', '\\', '|' }; void tmEventHandler(tmreader * aReader, tmevent * aEvent) { - static int event_count = 0; /* for spinner */ + static event_count = 0; /* for spinner */ if ((event_count++ % SPINNER_UPDATE_FREQUENCY) == 0) printf("\rReading... %c", SPINNER_CHAR(event_count)); diff --git a/xpcom/base/nsConsoleService.h b/xpcom/base/nsConsoleService.h index c36ef50f544..e6123b7421a 100644 --- a/xpcom/base/nsConsoleService.h +++ b/xpcom/base/nsConsoleService.h @@ -42,15 +42,13 @@ #ifndef __nsconsoleservice_h__ #define __nsconsoleservice_h__ -#include "mozilla/Attributes.h" #include "mozilla/Mutex.h" - #include "nsCOMPtr.h" #include "nsHashtable.h" #include "nsIConsoleService.h" -class nsConsoleService MOZ_FINAL : public nsIConsoleService +class nsConsoleService : public nsIConsoleService { public: nsConsoleService(); diff --git a/xpcom/base/nsExceptionService.cpp b/xpcom/base/nsExceptionService.cpp index 12af3022840..e9ab616613d 100644 --- a/xpcom/base/nsExceptionService.cpp +++ b/xpcom/base/nsExceptionService.cpp @@ -69,7 +69,7 @@ public: }; /** Exception Manager definition **/ -class nsExceptionManager MOZ_FINAL : public nsIExceptionManager +class nsExceptionManager : public nsIExceptionManager { public: NS_DECL_ISUPPORTS diff --git a/xpcom/base/nsExceptionService.h b/xpcom/base/nsExceptionService.h index 9a295626207..db3b9c3b961 100644 --- a/xpcom/base/nsExceptionService.h +++ b/xpcom/base/nsExceptionService.h @@ -39,9 +39,7 @@ #ifndef nsExceptionService_h__ #define nsExceptionService_h__ -#include "mozilla/Attributes.h" #include "mozilla/Mutex.h" - #include "nsIException.h" #include "nsIExceptionService.h" #include "nsIObserverService.h" @@ -51,7 +49,7 @@ class nsExceptionManager; /** Exception Service definition **/ -class nsExceptionService MOZ_FINAL : public nsIExceptionService, public nsIObserver +class nsExceptionService : public nsIExceptionService, public nsIObserver { public: NS_DECL_ISUPPORTS diff --git a/xpcom/base/nsUUIDGenerator.h b/xpcom/base/nsUUIDGenerator.h index e601b31b917..2c4d5177379 100644 --- a/xpcom/base/nsUUIDGenerator.h +++ b/xpcom/base/nsUUIDGenerator.h @@ -39,12 +39,10 @@ #ifndef _NSUUIDGENERATOR_H_ #define _NSUUIDGENERATOR_H_ -#include "mozilla/Attributes.h" #include "mozilla/Mutex.h" - #include "nsIUUIDGenerator.h" -class nsUUIDGenerator MOZ_FINAL : public nsIUUIDGenerator { +class nsUUIDGenerator : public nsIUUIDGenerator { public: nsUUIDGenerator(); diff --git a/xpcom/base/nsVersionComparatorImpl.h b/xpcom/base/nsVersionComparatorImpl.h index 10c3fe02306..ae63c738565 100644 --- a/xpcom/base/nsVersionComparatorImpl.h +++ b/xpcom/base/nsVersionComparatorImpl.h @@ -37,7 +37,7 @@ #include "nsIVersionComparator.h" -class nsVersionComparatorImpl MOZ_FINAL : public nsIVersionComparator +class nsVersionComparatorImpl : public nsIVersionComparator { public: NS_DECL_ISUPPORTS diff --git a/xpcom/components/ModuleUtils.h b/xpcom/components/ModuleUtils.h index a018fb22fc1..bf5fa214307 100644 --- a/xpcom/components/ModuleUtils.h +++ b/xpcom/components/ModuleUtils.h @@ -39,7 +39,6 @@ #ifndef mozilla_GenericModule_h #define mozilla_GenericModule_h -#include "mozilla/Attributes.h" #include "mozilla/Module.h" #define NS_GENERIC_FACTORY_CONSTRUCTOR(_InstanceClass) \ @@ -135,7 +134,7 @@ _InstanceClass##Constructor(nsISupports *aOuter, REFNSIID aIID, \ namespace mozilla { -class GenericModule MOZ_FINAL : public nsIModule +class GenericModule : public nsIModule { public: GenericModule(const mozilla::Module* aData) diff --git a/xpcom/ds/nsByteBuffer.h b/xpcom/ds/nsByteBuffer.h index b9a0feb0197..bfb128e5241 100644 --- a/xpcom/ds/nsByteBuffer.h +++ b/xpcom/ds/nsByteBuffer.h @@ -38,11 +38,9 @@ #ifndef nsByteBuffer_h__ #define nsByteBuffer_h__ -#include "mozilla/Attributes.h" - #include "nsIByteBuffer.h" -class ByteBufferImpl MOZ_FINAL : public nsIByteBuffer { +class ByteBufferImpl : public nsIByteBuffer { public: ByteBufferImpl(void); diff --git a/xpcom/ds/nsSupportsPrimitives.h b/xpcom/ds/nsSupportsPrimitives.h index cb4825e32bf..6715853fc0e 100644 --- a/xpcom/ds/nsSupportsPrimitives.h +++ b/xpcom/ds/nsSupportsPrimitives.h @@ -39,14 +39,12 @@ #ifndef nsSupportsPrimitives_h__ #define nsSupportsPrimitives_h__ -#include "mozilla/Attributes.h" - #include "nsISupportsPrimitives.h" #include "nsCOMPtr.h" #include "nsString.h" #include "nsDependentString.h" -class nsSupportsIDImpl MOZ_FINAL : public nsISupportsID +class nsSupportsIDImpl : public nsISupportsID { public: NS_DECL_ISUPPORTS @@ -63,7 +61,7 @@ private: /***************************************************************************/ -class nsSupportsCStringImpl MOZ_FINAL : public nsISupportsCString +class nsSupportsCStringImpl : public nsISupportsCString { public: NS_DECL_ISUPPORTS @@ -80,7 +78,7 @@ private: /***************************************************************************/ -class nsSupportsStringImpl MOZ_FINAL : public nsISupportsString +class nsSupportsStringImpl : public nsISupportsString { public: NS_DECL_ISUPPORTS @@ -97,7 +95,7 @@ private: /***************************************************************************/ -class nsSupportsPRBoolImpl MOZ_FINAL : public nsISupportsPRBool +class nsSupportsPRBoolImpl : public nsISupportsPRBool { public: NS_DECL_ISUPPORTS @@ -114,7 +112,7 @@ private: /***************************************************************************/ -class nsSupportsPRUint8Impl MOZ_FINAL : public nsISupportsPRUint8 +class nsSupportsPRUint8Impl : public nsISupportsPRUint8 { public: NS_DECL_ISUPPORTS @@ -131,7 +129,7 @@ private: /***************************************************************************/ -class nsSupportsPRUint16Impl MOZ_FINAL : public nsISupportsPRUint16 +class nsSupportsPRUint16Impl : public nsISupportsPRUint16 { public: NS_DECL_ISUPPORTS @@ -148,7 +146,7 @@ private: /***************************************************************************/ -class nsSupportsPRUint32Impl MOZ_FINAL : public nsISupportsPRUint32 +class nsSupportsPRUint32Impl : public nsISupportsPRUint32 { public: NS_DECL_ISUPPORTS @@ -165,7 +163,7 @@ private: /***************************************************************************/ -class nsSupportsPRUint64Impl MOZ_FINAL : public nsISupportsPRUint64 +class nsSupportsPRUint64Impl : public nsISupportsPRUint64 { public: NS_DECL_ISUPPORTS @@ -182,7 +180,7 @@ private: /***************************************************************************/ -class nsSupportsPRTimeImpl MOZ_FINAL : public nsISupportsPRTime +class nsSupportsPRTimeImpl : public nsISupportsPRTime { public: NS_DECL_ISUPPORTS @@ -199,7 +197,7 @@ private: /***************************************************************************/ -class nsSupportsCharImpl MOZ_FINAL : public nsISupportsChar +class nsSupportsCharImpl : public nsISupportsChar { public: NS_DECL_ISUPPORTS @@ -216,7 +214,7 @@ private: /***************************************************************************/ -class nsSupportsPRInt16Impl MOZ_FINAL : public nsISupportsPRInt16 +class nsSupportsPRInt16Impl : public nsISupportsPRInt16 { public: NS_DECL_ISUPPORTS @@ -233,7 +231,7 @@ private: /***************************************************************************/ -class nsSupportsPRInt32Impl MOZ_FINAL : public nsISupportsPRInt32 +class nsSupportsPRInt32Impl : public nsISupportsPRInt32 { public: NS_DECL_ISUPPORTS @@ -250,7 +248,7 @@ private: /***************************************************************************/ -class nsSupportsPRInt64Impl MOZ_FINAL : public nsISupportsPRInt64 +class nsSupportsPRInt64Impl : public nsISupportsPRInt64 { public: NS_DECL_ISUPPORTS @@ -267,7 +265,7 @@ private: /***************************************************************************/ -class nsSupportsFloatImpl MOZ_FINAL : public nsISupportsFloat +class nsSupportsFloatImpl : public nsISupportsFloat { public: NS_DECL_ISUPPORTS @@ -284,7 +282,7 @@ private: /***************************************************************************/ -class nsSupportsDoubleImpl MOZ_FINAL : public nsISupportsDouble +class nsSupportsDoubleImpl : public nsISupportsDouble { public: NS_DECL_ISUPPORTS @@ -301,7 +299,7 @@ private: /***************************************************************************/ -class nsSupportsVoidImpl MOZ_FINAL : public nsISupportsVoid +class nsSupportsVoidImpl : public nsISupportsVoid { public: NS_DECL_ISUPPORTS @@ -318,7 +316,7 @@ private: /***************************************************************************/ -class nsSupportsInterfacePointerImpl MOZ_FINAL : public nsISupportsInterfacePointer +class nsSupportsInterfacePointerImpl : public nsISupportsInterfacePointer { public: NS_DECL_ISUPPORTS @@ -342,7 +340,7 @@ private: * Only use this class with static buffers, or arena-allocated buffers of * permanent lifetime! */ -class nsSupportsDependentCString MOZ_FINAL : public nsISupportsCString +class nsSupportsDependentCString : public nsISupportsCString { public: NS_DECL_ISUPPORTS diff --git a/xpcom/glue/nsCategoryCache.h b/xpcom/glue/nsCategoryCache.h index f08f4c7152d..77b0c9a7c4f 100644 --- a/xpcom/glue/nsCategoryCache.h +++ b/xpcom/glue/nsCategoryCache.h @@ -37,8 +37,6 @@ #ifndef nsCategoryCache_h_ #define nsCategoryCache_h_ -#include "mozilla/Attributes.h" - #include "nsICategoryManager.h" #include "nsIObserver.h" #include "nsISimpleEnumerator.h" @@ -64,7 +62,7 @@ class NS_NO_VTABLE nsCategoryListener { virtual void CategoryCleared() = 0; }; -class NS_COM_GLUE nsCategoryObserver MOZ_FINAL : public nsIObserver { +class NS_COM_GLUE nsCategoryObserver : public nsIObserver { public: nsCategoryObserver(const char* aCategory, nsCategoryListener* aCategoryListener);