bug 1105074 - make more stuff final r=froydnj
authorTrevor Saunders <trev.saunders@gmail.com>
Tue, 25 Nov 2014 13:56:07 -0500
changeset 217809 0829bf4379484e05ca1958e864b4411f83885470
parent 217808 d51509bc5cfdb5b33529680d4bce0263214209ad
child 217810 0cea8df6968107dc42d6dc2c0b7edc1b7a3d5f13
push id27890
push usercbook@mozilla.com
push dateThu, 27 Nov 2014 11:55:59 +0000
treeherdermozilla-central@8d185a31024e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1105074
milestone36.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 1105074 - make more stuff final r=froydnj
docshell/base/nsDSURIContentListener.h
dom/base/EventSource.h
dom/base/nsDOMMutationObserver.h
dom/events/MessageEvent.h
dom/gamepad/Gamepad.h
dom/html/HTMLFormControlsCollection.h
dom/html/HTMLPropertiesCollection.h
dom/html/UndoManager.h
dom/media/MediaRecorder.h
dom/media/fmp4/MP4Reader.h
dom/media/mediasource/SourceBufferDecoder.h
dom/media/webaudio/AudioDestinationNode.h
dom/offline/nsDOMOfflineResourceList.h
dom/plugins/base/nsPluginTags.h
dom/xul/nsXULContentSink.h
dom/xul/nsXULPrototypeDocument.h
editor/txtsvc/nsTextServicesDocument.h
embedding/components/find/nsFind.cpp
extensions/spellcheck/hunspell/src/mozHunspell.h
extensions/spellcheck/src/mozPersonalDictionary.h
ipc/glue/SharedMemoryBasic_chromium.h
js/src/jit/MIR.h
js/xpconnect/src/xpcprivate.h
layout/inspector/inDeepTreeWalker.h
media/mtransport/transportflow.h
media/mtransport/transportlayerdtls.h
modules/libjar/nsJARProtocolHandler.h
netwerk/base/src/nsSocketTransport2.h
netwerk/cache/nsCacheEntryDescriptor.h
netwerk/cache/nsCacheService.h
netwerk/cache/nsDiskCacheDevice.h
netwerk/cookie/nsCookieService.h
netwerk/protocol/ftp/FTPChannelParent.h
netwerk/protocol/ftp/nsFtpConnectionThread.h
netwerk/protocol/ftp/nsFtpProtocolHandler.h
netwerk/protocol/res/nsResProtocolHandler.h
toolkit/components/downloads/nsDownloadManager.h
toolkit/components/places/History.h
toolkit/components/places/nsNavHistoryResult.h
tools/profiler/LulDwarfExt.h
xpcom/base/nsSystemInfo.h
xpfe/components/windowds/nsWindowDataSource.h
--- a/docshell/base/nsDSURIContentListener.h
+++ b/docshell/base/nsDSURIContentListener.h
@@ -11,17 +11,17 @@
 #include "nsIURIContentListener.h"
 #include "nsWeakReference.h"
 
 class nsDocShell;
 class nsIWebNavigationInfo;
 class nsIHttpChannel;
 class nsAString;
 
-class nsDSURIContentListener :
+class nsDSURIContentListener MOZ_FINAL :
     public nsIURIContentListener,
     public nsSupportsWeakReference
 
 {
 friend class nsDocShell;
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIURICONTENTLISTENER
--- a/dom/base/EventSource.h
+++ b/dom/base/EventSource.h
@@ -31,22 +31,22 @@ namespace mozilla {
 
 class ErrorResult;
 
 namespace dom {
 
 class AsyncVerifyRedirectCallbackFwr;
 struct EventSourceInit;
 
-class EventSource : public DOMEventTargetHelper
-                  , public nsIObserver
-                  , public nsIStreamListener
-                  , public nsIChannelEventSink
-                  , public nsIInterfaceRequestor
-                  , public nsSupportsWeakReference
+class EventSource MOZ_FINAL : public DOMEventTargetHelper
+                            , public nsIObserver
+                            , public nsIStreamListener
+                            , public nsIChannelEventSink
+                            , public nsIInterfaceRequestor
+                            , public nsSupportsWeakReference
 {
 friend class AsyncVerifyRedirectCallbackFwr;
 
 public:
   explicit EventSource(nsPIDOMWindow* aOwnerWindow);
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
     EventSource, DOMEventTargetHelper)
--- a/dom/base/nsDOMMutationObserver.h
+++ b/dom/base/nsDOMMutationObserver.h
@@ -23,18 +23,18 @@
 #include "nsIDOMMutationEvent.h"
 #include "nsWrapperCache.h"
 #include "mozilla/dom/MutationObserverBinding.h"
 #include "nsIDocument.h"
 
 class nsDOMMutationObserver;
 using mozilla::dom::MutationObservingInfo;
 
-class nsDOMMutationRecord : public nsISupports,
-                            public nsWrapperCache
+class nsDOMMutationRecord MOZ_FINAL : public nsISupports,
+                                      public nsWrapperCache
 {
   virtual ~nsDOMMutationRecord() {}
 
 public:
   nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner)
   : mType(aType), mAttrNamespace(NullString()), mPrevValue(NullString()), mOwner(aOwner)
   {
   }
@@ -332,18 +332,18 @@ public:
                         nsIDOMMutationEvent::MODIFICATION);
   }
 };
 
 #define NS_DOM_MUTATION_OBSERVER_IID \
 { 0x0c3b91f8, 0xcc3b, 0x4b08, \
   { 0x9e, 0xab, 0x07, 0x47, 0xa9, 0xe4, 0x65, 0xb4 } }
 
-class nsDOMMutationObserver : public nsISupports,
-                              public nsWrapperCache
+class nsDOMMutationObserver MOZ_FINAL : public nsISupports,
+                                        public nsWrapperCache
 {
 public:
   nsDOMMutationObserver(already_AddRefed<nsPIDOMWindow>&& aOwner,
                         mozilla::dom::MutationCallback& aCb)
   : mOwner(aOwner), mLastPendingMutation(nullptr), mPendingMutationCount(0),
     mCallback(&aCb), mWaitingForRun(false), mId(++sCount)
   {
   }
--- a/dom/events/MessageEvent.h
+++ b/dom/events/MessageEvent.h
@@ -22,18 +22,18 @@ class OwningWindowProxyOrMessagePort;
 
 /**
  * Implements the MessageEvent event, used for cross-document messaging and
  * server-sent events.
  *
  * See http://www.whatwg.org/specs/web-apps/current-work/#messageevent for
  * further details.
  */
-class MessageEvent : public Event,
-                     public nsIDOMMessageEvent
+class MessageEvent MOZ_FINAL : public Event,
+                               public nsIDOMMessageEvent
 {
 public:
   MessageEvent(EventTarget* aOwner,
                nsPresContext* aPresContext,
                WidgetEvent* aEvent);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MessageEvent, Event)
--- a/dom/gamepad/Gamepad.h
+++ b/dom/gamepad/Gamepad.h
@@ -25,18 +25,18 @@ const int kStandardGamepadAxes = 4;
 const int kButtonLeftTrigger = 6;
 const int kButtonRightTrigger = 7;
 
 const int kLeftStickXAxis = 0;
 const int kLeftStickYAxis = 1;
 const int kRightStickXAxis = 2;
 const int kRightStickYAxis = 3;
 
-class Gamepad : public nsISupports,
-                public nsWrapperCache
+class Gamepad MOZ_FINAL : public nsISupports,
+                          public nsWrapperCache
 {
 public:
   Gamepad(nsISupports* aParent,
           const nsAString& aID, uint32_t aIndex,
           GamepadMappingType aMapping,
           uint32_t aNumButtons, uint32_t aNumAxes);
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Gamepad)
--- a/dom/html/HTMLFormControlsCollection.h
+++ b/dom/html/HTMLFormControlsCollection.h
@@ -18,18 +18,18 @@ class nsIFormControl;
 
 namespace mozilla {
 namespace dom {
 class HTMLFormElement;
 class HTMLImageElement;
 class OwningRadioNodeListOrElement;
 template<typename> struct Nullable;
 
-class HTMLFormControlsCollection : public nsIHTMLCollection
-                                 , public nsWrapperCache
+class HTMLFormControlsCollection MOZ_FINAL : public nsIHTMLCollection
+                                           , public nsWrapperCache
 {
 public:
   explicit HTMLFormControlsCollection(HTMLFormElement* aForm);
 
   void DropFormReference();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
--- a/dom/html/HTMLPropertiesCollection.h
+++ b/dom/html/HTMLPropertiesCollection.h
@@ -143,18 +143,18 @@ protected:
 
   // The document mRoot is in, if any
   nsCOMPtr<nsIDocument> mDoc;
 
   // True if there have been DOM modifications since the last EnsureFresh call.
   bool mIsDirty;
 };
 
-class PropertyNodeList : public nsINodeList,
-                         public nsStubMutationObserver
+class PropertyNodeList MOZ_FINAL : public nsINodeList,
+                                   public nsStubMutationObserver
 {
 public:
   PropertyNodeList(HTMLPropertiesCollection* aCollection,
                    nsIContent* aRoot, const nsAString& aName);
 
   virtual JSObject* WrapObject(JSContext *cx) MOZ_OVERRIDE;
 
   void SetDocument(nsIDocument* aDocument);
--- a/dom/html/UndoManager.h
+++ b/dom/html/UndoManager.h
@@ -20,18 +20,18 @@ class nsIMutationObserver;
 
 namespace mozilla {
 class ErrorResult;
 namespace dom {
 
 class DOMTransaction;
 class DOMTransactionCallback;
 
-class UndoManager : public nsISupports,
-                    public nsWrapperCache
+class UndoManager MOZ_FINAL : public nsISupports,
+                              public nsWrapperCache
 {
   friend class TxnScopeGuard;
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(UndoManager)
 
   explicit UndoManager(nsIContent* aNode);
 
--- a/dom/media/MediaRecorder.h
+++ b/dom/media/MediaRecorder.h
@@ -33,18 +33,18 @@ class AudioNode;
  * a MediaEncoder will be created and accept the mediaStream as input source.
  * Encoder will get the raw data by track data changes, encode it by selected MIME Type, then store the encoded in EncodedBufferCache object.
  * The encoded data will be extracted on every timeslice passed from Start function call or by RequestData function.
  * Thread model:
  * When the recorder starts, it creates a "Media Encoder" thread to read data from MediaEncoder object and store buffer in EncodedBufferCache object.
  * Also extract the encoded data and create blobs on every timeslice passed from start function or RequestData function called by UA.
  */
 
-class MediaRecorder : public DOMEventTargetHelper,
-                      public nsIDocumentActivity
+class MediaRecorder MOZ_FINAL : public DOMEventTargetHelper,
+                                public nsIDocumentActivity
 {
   class Session;
 
 public:
   MediaRecorder(DOMMediaStream& aSourceMediaStream, nsPIDOMWindow* aOwnerWindow);
   MediaRecorder(AudioNode& aSrcAudioNode, uint32_t aSrcOutput, nsPIDOMWindow* aOwnerWindow);
 
   // nsWrapperCache
--- a/dom/media/fmp4/MP4Reader.h
+++ b/dom/media/fmp4/MP4Reader.h
@@ -21,17 +21,17 @@ namespace mozilla {
 namespace dom {
 class TimeRanges;
 }
 
 typedef std::deque<mp4_demuxer::MP4Sample*> MP4SampleQueue;
 
 class MP4Stream;
 
-class MP4Reader : public MediaDecoderReader
+class MP4Reader MOZ_FINAL : public MediaDecoderReader
 {
   typedef mp4_demuxer::TrackType TrackType;
 
 public:
   explicit MP4Reader(AbstractMediaDecoder* aDecoder);
 
   virtual ~MP4Reader();
 
--- a/dom/media/mediasource/SourceBufferDecoder.h
+++ b/dom/media/mediasource/SourceBufferDecoder.h
@@ -22,17 +22,17 @@ class MediaResource;
 class MediaDecoderReader;
 
 namespace dom {
 
 class TimeRanges;
 
 } // namespace dom
 
-class SourceBufferDecoder : public AbstractMediaDecoder
+class SourceBufferDecoder MOZ_FINAL : public AbstractMediaDecoder
 {
 public:
   // This class holds a weak pointer to MediaResource.  It's the responsibility
   // of the caller to manage the memory of the MediaResource object.
   SourceBufferDecoder(MediaResource* aResource, AbstractMediaDecoder* aParentDecoder);
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
--- a/dom/media/webaudio/AudioDestinationNode.h
+++ b/dom/media/webaudio/AudioDestinationNode.h
@@ -14,20 +14,20 @@
 #include "AudioChannelCommon.h"
 
 namespace mozilla {
 namespace dom {
 
 class AudioContext;
 class EventProxyHandler;
 
-class AudioDestinationNode : public AudioNode
-                           , public nsIDOMEventListener
-                           , public nsIAudioChannelAgentCallback
-                           , public MainThreadMediaStreamListener
+class AudioDestinationNode MOZ_FINAL : public AudioNode
+                                     , public nsIDOMEventListener
+                                     , public nsIAudioChannelAgentCallback
+                                     , public MainThreadMediaStreamListener
 {
 public:
   // This node type knows what MediaStreamGraph to use based on
   // whether it's in offline mode.
   AudioDestinationNode(AudioContext* aContext,
                        bool aIsOffline,
                        AudioChannel aChannel = AudioChannel::Normal,
                        uint32_t aNumberOfChannels = 0,
--- a/dom/offline/nsDOMOfflineResourceList.h
+++ b/dom/offline/nsDOMOfflineResourceList.h
@@ -29,21 +29,21 @@
 class nsIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 class DOMStringList;
 } // namespace dom
 } // namespace mozilla
 
-class nsDOMOfflineResourceList : public mozilla::DOMEventTargetHelper,
-                                 public nsIDOMOfflineResourceList,
-                                 public nsIObserver,
-                                 public nsIOfflineCacheUpdateObserver,
-                                 public nsSupportsWeakReference
+class nsDOMOfflineResourceList MOZ_FINAL : public mozilla::DOMEventTargetHelper,
+                                           public nsIDOMOfflineResourceList,
+                                           public nsIObserver,
+                                           public nsIOfflineCacheUpdateObserver,
+                                           public nsSupportsWeakReference
 {
   typedef mozilla::ErrorResult ErrorResult;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMOFFLINERESOURCELIST
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
--- a/dom/plugins/base/nsPluginTags.h
+++ b/dom/plugins/base/nsPluginTags.h
@@ -17,17 +17,17 @@
 
 class nsPluginHost;
 struct PRLibrary;
 struct nsPluginInfo;
 class nsNPAPIPlugin;
 
 // A linked-list of plugin information that is used for instantiating plugins
 // and reflecting plugin information into JavaScript.
-class nsPluginTag : public nsIPluginTag
+class nsPluginTag MOZ_FINAL : public nsIPluginTag
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPLUGINTAG
 
   // These must match the STATE_* values in nsIPluginTag.idl
   enum PluginState {
     ePluginState_Disabled = 0,
--- a/dom/xul/nsXULContentSink.h
+++ b/dom/xul/nsXULContentSink.h
@@ -17,18 +17,18 @@
 
 class nsIDocument;
 class nsIScriptSecurityManager;
 class nsAttrName;
 class nsXULPrototypeDocument;
 class nsXULPrototypeElement;
 class nsXULPrototypeNode;
 
-class XULContentSinkImpl : public nsIXMLContentSink,
-                           public nsIExpatSink
+class XULContentSinkImpl MOZ_FINAL : public nsIXMLContentSink,
+                                     public nsIExpatSink
 {
 public:
     XULContentSinkImpl();
 
     // nsISupports
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_NSIEXPATSINK
 
--- a/dom/xul/nsXULPrototypeDocument.h
+++ b/dom/xul/nsXULPrototypeDocument.h
@@ -30,17 +30,17 @@ class XULDocument;
 
 /**
  * A "prototype" document that stores shared document information
  * for the XUL cache.
  * Among other things, stores the tree of nsXULPrototype*
  * objects, from which the real DOM tree is built later in
  * XULDocument::ResumeWalk.
  */
-class nsXULPrototypeDocument : public nsISerializable
+class nsXULPrototypeDocument MOZ_FINAL : public nsISerializable
 {
 public:
     static nsresult
     Create(nsIURI* aURI, nsXULPrototypeDocument** aResult);
 
     // nsISupports interface
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
--- a/editor/txtsvc/nsTextServicesDocument.h
+++ b/editor/txtsvc/nsTextServicesDocument.h
@@ -27,18 +27,18 @@ class nsIEditor;
 class nsISelection;
 class nsISelectionController;
 class nsITextServicesFilter;
 class nsString;
 
 /** implementation of a text services object.
  *
  */
-class nsTextServicesDocument : public nsITextServicesDocument,
-                               public nsIEditActionListener
+class nsTextServicesDocument MOZ_FINAL : public nsITextServicesDocument,
+                                         public nsIEditActionListener
 {
 private:
   static nsIAtom *sAAtom;
   static nsIAtom *sAddressAtom;
   static nsIAtom *sBigAtom;
   static nsIAtom *sBAtom;
   static nsIAtom *sCiteAtom;
   static nsIAtom *sCodeAtom;
--- a/embedding/components/find/nsFind.cpp
+++ b/embedding/components/find/nsFind.cpp
@@ -74,17 +74,17 @@ PR_STATIC_ASSERT(CH_SHY <= 255);
 // or a text <input>. This means that we can be given an initial search
 // range that stretches across the anonymous DOM and the normal DOM. To
 // cater for this situation, we split the anonymous part into the
 // inner-iterator and then reposition the outer-iterator outside.
 //
 // 5) The implementation assumes that First() and Next() are only called
 // in find-forward mode, while Last() and Prev() are used in find-backward.
 
-class nsFindContentIterator : public nsIContentIterator
+class nsFindContentIterator MOZ_FINAL : public nsIContentIterator
 {
 public:
   explicit nsFindContentIterator(bool aFindBackward)
     : mStartOffset(0),
       mEndOffset(0),
       mFindBackward(aFindBackward)
   {
   }
--- a/extensions/spellcheck/hunspell/src/mozHunspell.h
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.h
@@ -76,20 +76,20 @@
 #include "mozHunspellAllocator.h"
 
 #define MOZ_HUNSPELL_CONTRACTID "@mozilla.org/spellchecker/engine;1"
 #define MOZ_HUNSPELL_CID         \
 /* 56c778e4-1bee-45f3-a689-886692a97fe7 */   \
 { 0x56c778e4, 0x1bee, 0x45f3, \
   { 0xa6, 0x89, 0x88, 0x66, 0x92, 0xa9, 0x7f, 0xe7 } }
 
-class mozHunspell : public mozISpellCheckingEngine,
-                    public nsIObserver,
-                    public nsSupportsWeakReference,
-                    public nsIMemoryReporter
+class mozHunspell MOZ_FINAL : public mozISpellCheckingEngine,
+                              public nsIObserver,
+                              public nsSupportsWeakReference,
+                              public nsIMemoryReporter
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_MOZISPELLCHECKINGENGINE
   NS_DECL_NSIOBSERVER
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(mozHunspell, mozISpellCheckingEngine)
 
   mozHunspell();
--- a/extensions/spellcheck/src/mozPersonalDictionary.h
+++ b/extensions/spellcheck/src/mozPersonalDictionary.h
@@ -21,19 +21,19 @@
 #define MOZ_PERSONALDICTIONARY_CONTRACTID "@mozilla.org/spellchecker/personaldictionary;1"
 #define MOZ_PERSONALDICTIONARY_CID         \
 { /* 7EF52EAF-B7E1-462B-87E2-5D1DBACA9048 */  \
 0X7EF52EAF, 0XB7E1, 0X462B, \
   { 0X87, 0XE2, 0X5D, 0X1D, 0XBA, 0XCA, 0X90, 0X48 } }
 
 class mozPersonalDictionaryLoader;
 
-class mozPersonalDictionary : public mozIPersonalDictionary,
-                              public nsIObserver,
-                              public nsSupportsWeakReference
+class mozPersonalDictionary MOZ_FINAL : public mozIPersonalDictionary,
+                                        public nsIObserver,
+                                        public nsSupportsWeakReference
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_MOZIPERSONALDICTIONARY
   NS_DECL_NSIOBSERVER
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(mozPersonalDictionary, mozIPersonalDictionary)
 
   mozPersonalDictionary();
--- a/ipc/glue/SharedMemoryBasic_chromium.h
+++ b/ipc/glue/SharedMemoryBasic_chromium.h
@@ -16,17 +16,17 @@
 //
 // This is a low-level wrapper around platform shared memory.  Don't
 // use it directly; use Shmem allocated through IPDL interfaces.
 //
 
 namespace mozilla {
 namespace ipc {
 
-class SharedMemoryBasic : public SharedMemory
+class SharedMemoryBasic MOZ_FINAL : public SharedMemory
 {
 public:
   typedef base::SharedMemoryHandle Handle;
 
   SharedMemoryBasic()
   {
   }
 
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -3865,17 +3865,17 @@ JSOpToCondition(MCompare::CompareType co
 {
     bool isSigned = (compareType != MCompare::Compare_UInt32);
     return JSOpToCondition(op, isSigned);
 }
 
 // Takes a typed value and checks if it is a certain type. If so, the payload
 // is unpacked and returned as that type. Otherwise, it is considered a
 // deoptimization.
-class MUnbox : public MUnaryInstruction, public BoxInputsPolicy::Data
+class MUnbox MOZ_FINAL : public MUnaryInstruction, public BoxInputsPolicy::Data
 {
   public:
     enum Mode {
         Fallible,       // Check the type, and deoptimize if unexpected.
         Infallible,     // Type guard is not necessary.
         TypeBarrier     // Guard on the type, and act like a TypeBarrier on failure.
     };
 
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2388,21 +2388,21 @@ private:
     uint32_t* mDescriptors;
 };
 
 /*************************/
 // nsXPCWrappedJS is a wrapper for a single JSObject for use from native code.
 // nsXPCWrappedJS objects are chained together to represent the various
 // interface on the single underlying (possibly aggregate) JSObject.
 
-class nsXPCWrappedJS : protected nsAutoXPTCStub,
-                       public nsIXPConnectWrappedJS,
-                       public nsSupportsWeakReference,
-                       public nsIPropertyBag,
-                       public XPCRootSetElem
+class nsXPCWrappedJS MOZ_FINAL : protected nsAutoXPTCStub,
+                                 public nsIXPConnectWrappedJS,
+                                 public nsSupportsWeakReference,
+                                 public nsIPropertyBag,
+                                 public XPCRootSetElem
 {
 public:
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_NSIXPCONNECTJSOBJECTHOLDER
     NS_DECL_NSIXPCONNECTWRAPPEDJS
     NS_DECL_NSISUPPORTSWEAKREFERENCE
     NS_DECL_NSIPROPERTYBAG
 
@@ -2715,17 +2715,17 @@ public:
 * nsJSID implements nsIJSID. It is also used by nsJSIID and nsJSCID as a
 * member (as a hidden implementaion detail) to which they delegate many calls.
 */
 
 // Initialization is done on demand, and calling the destructor below is always
 // safe.
 extern void xpc_DestroyJSxIDClassObjects();
 
-class nsJSID : public nsIJSID
+class nsJSID MOZ_FINAL : public nsIJSID
 {
 public:
     NS_DEFINE_STATIC_CID_ACCESSOR(NS_JS_ID_CID)
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIJSID
 
     bool InitWithName(const nsID& id, const char *nameString);
@@ -2962,17 +2962,17 @@ xpc_DumpJSStack(bool showArgs, bool show
 extern char*
 xpc_PrintJSStack(JSContext* cx, bool showArgs, bool showLocals,
                  bool showThisProps);
 
 /***************************************************************************/
 
 // Definition of nsScriptError, defined here because we lack a place to put
 // XPCOM objects associated with the JavaScript engine.
-class nsScriptError : public nsIScriptError {
+class nsScriptError MOZ_FINAL : public nsIScriptError {
 public:
     nsScriptError();
 
   // TODO - do something reasonable on getting null from these babies.
 
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSICONSOLEMESSAGE
     NS_DECL_NSISCRIPTERROR
--- a/layout/inspector/inDeepTreeWalker.h
+++ b/layout/inspector/inDeepTreeWalker.h
@@ -9,17 +9,17 @@
 
 #include "nsCOMPtr.h"
 #include "nsIDOMNode.h"
 #include "nsTArray.h"
 
 class nsINodeList;
 class inIDOMUtils;
 
-class inDeepTreeWalker : public inIDeepTreeWalker
+class inDeepTreeWalker MOZ_FINAL : public inIDeepTreeWalker
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_INIDEEPTREEWALKER
 
   inDeepTreeWalker();
 
   nsresult SetCurrentNode(nsIDOMNode* aCurrentNode,
--- a/media/mtransport/transportflow.h
+++ b/media/mtransport/transportflow.h
@@ -44,18 +44,18 @@
 // restriction by thread-locking the signals, but previous
 // attempts have caused deadlocks.
 //
 // Most of these invariants are enforced by hard asserts
 // (i.e., those which fire even in production builds).
 
 namespace mozilla {
 
-class TransportFlow : public nsISupports,
-                      public sigslot::has_slots<> {
+class TransportFlow MOZ_FINAL : public nsISupports,
+                                public sigslot::has_slots<> {
  public:
   TransportFlow()
     : id_("(anonymous)"),
       state_(TransportLayer::TS_NONE),
       layers_(new std::deque<TransportLayer *>) {}
   explicit TransportFlow(const std::string id)
     : id_(id),
       state_(TransportLayer::TS_NONE),
--- a/media/mtransport/transportlayerdtls.h
+++ b/media/mtransport/transportlayerdtls.h
@@ -40,17 +40,17 @@ class TransportLayerNSPRAdapter {
 
  private:
   DISALLOW_COPY_ASSIGN(TransportLayerNSPRAdapter);
 
   TransportLayer *output_;
   std::queue<Packet *> input_;
 };
 
-class TransportLayerDtls : public TransportLayer {
+class TransportLayerDtls MOZ_FINAL : public TransportLayer {
  public:
   TransportLayerDtls() :
       role_(CLIENT),
       verification_mode_(VERIFY_UNSET),
       ssl_fd_(nullptr),
       auth_hook_called_(false),
       cert_ok_(false) {}
 
--- a/modules/libjar/nsJARProtocolHandler.h
+++ b/modules/libjar/nsJARProtocolHandler.h
@@ -15,18 +15,18 @@
 #include "nsCOMPtr.h"
 #include "nsClassHashtable.h"
 #include "nsHashKeys.h"
 #include "nsTArrayForwardDeclare.h"
 
 class nsIHashable;
 class nsIRemoteOpenFileListener;
 
-class nsJARProtocolHandler : public nsIJARProtocolHandler
-                           , public nsSupportsWeakReference
+class nsJARProtocolHandler MOZ_FINAL : public nsIJARProtocolHandler
+                                     , public nsSupportsWeakReference
 {
     typedef nsAutoTArray<nsCOMPtr<nsIRemoteOpenFileListener>, 5>
             RemoteFileListenerArray;
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIPROTOCOLHANDLER
     NS_DECL_NSIJARPROTOCOLHANDLER
--- a/netwerk/base/src/nsSocketTransport2.h
+++ b/netwerk/base/src/nsSocketTransport2.h
@@ -99,20 +99,20 @@ private:
     nsresult                          mCondition;
     nsCOMPtr<nsIOutputStreamCallback> mCallback;
     uint32_t                          mCallbackFlags;
     uint64_t                          mByteCount;
 };
 
 //-----------------------------------------------------------------------------
 
-class nsSocketTransport : public nsASocketHandler
-                        , public nsISocketTransport
-                        , public nsIDNSListener
-                        , public nsIClassInfo
+class nsSocketTransport MOZ_FINAL : public nsASocketHandler
+                                  , public nsISocketTransport
+                                  , public nsIDNSListener
+                                  , public nsIClassInfo
 {
     typedef mozilla::Mutex Mutex;
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSITRANSPORT
     NS_DECL_NSISOCKETTRANSPORT
     NS_DECL_NSIDNSLISTENER
--- a/netwerk/cache/nsCacheEntryDescriptor.h
+++ b/netwerk/cache/nsCacheEntryDescriptor.h
@@ -15,17 +15,17 @@
 #include "nsCacheService.h"
 #include "zlib.h"
 #include "mozilla/Mutex.h"
 #include "nsVoidArray.h"
 
 /******************************************************************************
 * nsCacheEntryDescriptor
 *******************************************************************************/
-class nsCacheEntryDescriptor :
+class nsCacheEntryDescriptor MOZ_FINAL :
     public PRCList,
     public nsICacheEntryDescriptor
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSICACHEENTRYDESCRIPTOR
     NS_DECL_NSICACHEENTRYINFO
 
--- a/netwerk/cache/nsCacheService.h
+++ b/netwerk/cache/nsCacheService.h
@@ -57,18 +57,18 @@ private:
     nsICacheListener *mListener;
     nsresult          mStatus;
 };
 
 /******************************************************************************
  *  nsCacheService
  ******************************************************************************/
 
-class nsCacheService : public nsICacheServiceInternal,
-                       public nsIMemoryReporter
+class nsCacheService MOZ_FINAL : public nsICacheServiceInternal,
+                                 public nsIMemoryReporter
 {
     virtual ~nsCacheService();
 
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSICACHESERVICE
     NS_DECL_NSICACHESERVICEINTERNAL
     NS_DECL_NSIMEMORYREPORTER
--- a/netwerk/cache/nsDiskCacheDevice.h
+++ b/netwerk/cache/nsDiskCacheDevice.h
@@ -15,17 +15,17 @@
 
 #include "nsIFile.h"
 #include "nsIObserver.h"
 #include "nsCOMArray.h"
 
 class nsDiskCacheMap;
 
 
-class nsDiskCacheDevice : public nsCacheDevice {
+class nsDiskCacheDevice MOZ_FINAL : public nsCacheDevice {
 public:
     nsDiskCacheDevice();
     virtual ~nsDiskCacheDevice();
 
     virtual nsresult        Init();
     virtual nsresult        Shutdown();
 
     virtual const char *    GetDeviceID(void);
--- a/netwerk/cookie/nsCookieService.h
+++ b/netwerk/cookie/nsCookieService.h
@@ -233,21 +233,21 @@ enum OpenDBResult
   RESULT_FAILURE
 };
 
 /******************************************************************************
  * nsCookieService:
  * class declaration
  ******************************************************************************/
 
-class nsCookieService : public nsICookieService
-                      , public nsICookieManager2
-                      , public nsIObserver
-                      , public nsSupportsWeakReference
-                      , public nsIMemoryReporter
+class nsCookieService MOZ_FINAL : public nsICookieService
+                                , public nsICookieManager2
+                                , public nsIObserver
+                                , public nsSupportsWeakReference
+                                , public nsIMemoryReporter
 {
   private:
     size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIOBSERVER
     NS_DECL_NSICOOKIESERVICE
--- a/netwerk/protocol/ftp/FTPChannelParent.h
+++ b/netwerk/protocol/ftp/FTPChannelParent.h
@@ -16,22 +16,22 @@
 #include "OfflineObserver.h"
 
 class nsFtpChannel;
 class nsILoadContext;
 
 namespace mozilla {
 namespace net {
 
-class FTPChannelParent : public PFTPChannelParent
-                       , public nsIParentChannel
-                       , public nsIInterfaceRequestor
-                       , public ADivertableParentChannel
-                       , public nsIChannelEventSink
-                       , public DisconnectableParent
+class FTPChannelParent MOZ_FINAL : public PFTPChannelParent
+                                 , public nsIParentChannel
+                                 , public nsIInterfaceRequestor
+                                 , public ADivertableParentChannel
+                                 , public nsIChannelEventSink
+                                 , public DisconnectableParent
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIPARENTCHANNEL
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSICHANNELEVENTSINK
--- a/netwerk/protocol/ftp/nsFtpConnectionThread.h
+++ b/netwerk/protocol/ftp/nsFtpConnectionThread.h
@@ -71,23 +71,23 @@ class nsICacheEntryDescriptor;
 class nsIProxyInfo;
 class nsIStreamListener;
 
 // The nsFtpState object is the content stream for the channel.  It implements
 // nsIInputStreamCallback, so it can read data from the control connection.  It
 // implements nsITransportEventSink so it can mix status events from both the
 // control connection and the data connection.
 
-class nsFtpState : public nsBaseContentStream,
-                   public nsIInputStreamCallback,
-                   public nsITransportEventSink,
-                   public nsICacheListener,
-                   public nsIRequestObserver,
-                   public nsFtpControlConnectionListener,
-                   public nsIProtocolProxyCallback
+class nsFtpState MOZ_FINAL : public nsBaseContentStream,
+                             public nsIInputStreamCallback,
+                             public nsITransportEventSink,
+                             public nsICacheListener,
+                             public nsIRequestObserver,
+                             public nsFtpControlConnectionListener,
+                             public nsIProtocolProxyCallback
 {
 public:
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIINPUTSTREAMCALLBACK
     NS_DECL_NSITRANSPORTEVENTSINK
     NS_DECL_NSICACHELISTENER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSIPROTOCOLPROXYCALLBACK
--- a/netwerk/protocol/ftp/nsFtpProtocolHandler.h
+++ b/netwerk/protocol/ftp/nsFtpProtocolHandler.h
@@ -12,19 +12,19 @@
 #include "nsITimer.h"
 #include "nsIObserver.h"
 #include "nsWeakReference.h"
 
 class nsICacheSession;
 
 //-----------------------------------------------------------------------------
 
-class nsFtpProtocolHandler : public nsIProxiedProtocolHandler
-                           , public nsIObserver
-                           , public nsSupportsWeakReference
+class nsFtpProtocolHandler MOZ_FINAL : public nsIProxiedProtocolHandler
+                                     , public nsIObserver
+                                     , public nsSupportsWeakReference
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIPROTOCOLHANDLER
     NS_DECL_NSIPROXIEDPROTOCOLHANDLER
     NS_DECL_NSIOBSERVER
     
     nsFtpProtocolHandler();
--- a/netwerk/protocol/res/nsResProtocolHandler.h
+++ b/netwerk/protocol/res/nsResProtocolHandler.h
@@ -19,17 +19,17 @@ class nsResURL : public nsStandardURL
 {
 public:
     nsResURL() : nsStandardURL(true) {}
     virtual nsStandardURL* StartClone();
     virtual nsresult EnsureFile();
     NS_IMETHOD GetClassIDNoAlloc(nsCID *aCID);
 };
 
-class nsResProtocolHandler : public nsIResProtocolHandler, public nsSupportsWeakReference
+class nsResProtocolHandler MOZ_FINAL : public nsIResProtocolHandler, public nsSupportsWeakReference
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
     NS_DECL_NSIPROTOCOLHANDLER
     NS_DECL_NSIRESPROTOCOLHANDLER
 
     nsResProtocolHandler();
 
--- a/toolkit/components/downloads/nsDownloadManager.h
+++ b/toolkit/components/downloads/nsDownloadManager.h
@@ -33,20 +33,20 @@ typedef int16_t DownloadType;
 
 class nsIArray;
 class nsDownload;
 
 #ifdef DOWNLOAD_SCANNER
 #include "nsDownloadScanner.h"
 #endif
 
-class nsDownloadManager : public nsIDownloadManager,
-                          public nsINavHistoryObserver,
-                          public nsIObserver,
-                          public nsSupportsWeakReference
+class nsDownloadManager MOZ_FINAL : public nsIDownloadManager,
+                                    public nsINavHistoryObserver,
+                                    public nsIObserver,
+                                    public nsSupportsWeakReference
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOWNLOADMANAGER
   NS_DECL_NSINAVHISTORYOBSERVER
   NS_DECL_NSIOBSERVER
 
   nsresult Init();
--- a/toolkit/components/places/History.h
+++ b/toolkit/components/places/History.h
@@ -31,21 +31,21 @@ struct VisitData;
 class ConcurrentStatementsHolder;
 
 #define NS_HISTORYSERVICE_CID \
   {0x0937a705, 0x91a6, 0x417a, {0x82, 0x92, 0xb2, 0x2e, 0xb1, 0x0d, 0xa8, 0x6c}}
 
 // Max size of History::mRecentlyVisitedURIs
 #define RECENTLY_VISITED_URI_SIZE 8
 
-class History : public IHistory
-              , public nsIDownloadHistory
-              , public mozIAsyncHistory
-              , public nsIObserver
-              , public nsIMemoryReporter
+class History MOZ_FINAL : public IHistory
+                        , public nsIDownloadHistory
+                        , public mozIAsyncHistory
+                        , public nsIObserver
+                        , public nsIMemoryReporter
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_IHISTORY
   NS_DECL_NSIDOWNLOADHISTORY
   NS_DECL_MOZIASYNCHISTORY
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIMEMORYREPORTER
--- a/toolkit/components/places/nsNavHistoryResult.h
+++ b/toolkit/components/places/nsNavHistoryResult.h
@@ -100,20 +100,20 @@ private:
 //
 //    nsNavHistory creates this object and fills in mChildren (by getting
 //    it through GetTopLevel()). Then FilledAllResults() is called to finish
 //    object initialization.
 
 #define NS_NAVHISTORYRESULT_IID \
   { 0x455d1d40, 0x1b9b, 0x40e6, { 0xa6, 0x41, 0x8b, 0xb7, 0xe8, 0x82, 0x23, 0x87 } }
 
-class nsNavHistoryResult : public nsSupportsWeakReference,
-                           public nsINavHistoryResult,
-                           public nsINavBookmarkObserver,
-                           public nsINavHistoryObserver
+class nsNavHistoryResult MOZ_FINAL : public nsSupportsWeakReference,
+                                     public nsINavHistoryResult,
+                                     public nsINavBookmarkObserver,
+                                     public nsINavHistoryObserver
 {
 public:
   static nsresult NewHistoryResult(nsINavHistoryQuery** aQueries,
                                    uint32_t aQueryCount,
                                    nsNavHistoryQueryOptions* aOptions,
                                    nsNavHistoryContainerResultNode* aRoot,
                                    bool aBatchInProgress,
                                    nsNavHistoryResult** result);
@@ -614,19 +614,19 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHisto
                               NS_NAVHISTORYCONTAINERRESULTNODE_IID)
 
 // nsNavHistoryQueryResultNode
 //
 //    Overridden container type for complex queries over history and/or
 //    bookmarks. This keeps itself in sync by listening to history and
 //    bookmark notifications.
 
-class nsNavHistoryQueryResultNode : public nsNavHistoryContainerResultNode,
-                                    public nsINavHistoryQueryResultNode,
-                                    public nsINavBookmarkObserver
+class nsNavHistoryQueryResultNode MOZ_FINAL : public nsNavHistoryContainerResultNode,
+                                              public nsINavHistoryQueryResultNode,
+                                              public nsINavBookmarkObserver
 {
 public:
   nsNavHistoryQueryResultNode(const nsACString& aTitle,
                               const nsACString& aIconURI,
                               const nsACString& aQueryURI);
   nsNavHistoryQueryResultNode(const nsACString& aTitle,
                               const nsACString& aIconURI,
                               const nsCOMArray<nsNavHistoryQuery>& aQueries,
@@ -695,20 +695,20 @@ protected:
 };
 
 
 // nsNavHistoryFolderResultNode
 //
 //    Overridden container type for bookmark folders. It will keep the contents
 //    of the folder in sync with the bookmark service.
 
-class nsNavHistoryFolderResultNode : public nsNavHistoryContainerResultNode,
-                                     public nsINavHistoryQueryResultNode,
-                                     public nsINavBookmarkObserver,
-                                     public mozilla::places::AsyncStatementCallback
+class nsNavHistoryFolderResultNode MOZ_FINAL : public nsNavHistoryContainerResultNode,
+                                               public nsINavHistoryQueryResultNode,
+                                               public nsINavBookmarkObserver,
+                                               public mozilla::places::AsyncStatementCallback
 {
 public:
   nsNavHistoryFolderResultNode(const nsACString& aTitle,
                                nsNavHistoryQueryOptions* options,
                                int64_t aFolderId);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_FORWARD_COMMON_RESULTNODE_TO_BASE_NO_GETITEMMID
--- a/tools/profiler/LulDwarfExt.h
+++ b/tools/profiler/LulDwarfExt.h
@@ -1057,17 +1057,17 @@ class CallFrameInfo::Handler {
   virtual bool SignalHandler() { return true; }
 };
 
 
 // The CallFrameInfo class makes calls on an instance of this class to
 // report errors or warn about problems in the data it is parsing.
 // These messages are sent to the message sink |aLog| provided to the
 // constructor.
-class CallFrameInfo::Reporter {
+class CallFrameInfo::Reporter MOZ_FINAL {
  public:
   // Create an error reporter which attributes troubles to the section
   // named SECTION in FILENAME.
   //
   // Normally SECTION would be .debug_frame, but the Mac puts CFI data
   // in a Mach-O section named __debug_frame. If we support
   // Linux-style exception handling data, we could be reading an
   // .eh_frame section.
--- a/xpcom/base/nsSystemInfo.h
+++ b/xpcom/base/nsSystemInfo.h
@@ -7,17 +7,17 @@
 #ifndef _NSSYSTEMINFO_H_
 #define _NSSYSTEMINFO_H_
 
 #include "nsHashPropertyBag.h"
 #if defined(XP_WIN)
 #include "nsIObserver.h"
 #endif // defined(XP_WIN)
 
-class nsSystemInfo
+class nsSystemInfo MOZ_FINAL
   : public nsHashPropertyBag
 #if defined(XP_WIN)
   , public nsIObserver
 #endif // defined(XP_WIN)
 {
 public:
 #if defined(XP_WIN)
   NS_DECL_ISUPPORTS_INHERITED
--- a/xpfe/components/windowds/nsWindowDataSource.h
+++ b/xpfe/components/windowds/nsWindowDataSource.h
@@ -15,20 +15,20 @@
 #include "nsCycleCollectionParticipant.h"
 
 // {C744CA3D-840B-460a-8D70-7CE63C51C958}
 #define NS_WINDOWDATASOURCE_CID \
 { 0xc744ca3d, 0x840b, 0x460a, \
  { 0x8d, 0x70, 0x7c, 0xe6, 0x3c, 0x51, 0xc9, 0x58 } }
 
 
-class nsWindowDataSource : public nsIRDFDataSource,
-                           public nsIObserver,
-                           public nsIWindowMediatorListener,
-                           public nsIWindowDataSource
+class nsWindowDataSource MOZ_FINAL : public nsIRDFDataSource,
+                                     public nsIObserver,
+                                     public nsIWindowMediatorListener,
+                                     public nsIWindowDataSource
 {
  public:
     nsWindowDataSource() { }
 
     nsresult Init();
 
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsWindowDataSource,