diff --git a/accessible/base/NotificationController.h b/accessible/base/NotificationController.h index 24af2af261..d4f7c98208 100644 --- a/accessible/base/NotificationController.h +++ b/accessible/base/NotificationController.h @@ -86,7 +86,7 @@ private: * Used to process notifications from core for the document accessible. */ class NotificationController final : public EventQueue, - public nsARefreshObserver + public nsARefreshObserver { public: NotificationController(DocAccessible* aDocument, nsIPresShell* aPresShell); diff --git a/accessible/base/nsAccessibilityService.h b/accessible/base/nsAccessibilityService.h index 9865c81370..31954fd179 100644 --- a/accessible/base/nsAccessibilityService.h +++ b/accessible/base/nsAccessibilityService.h @@ -45,10 +45,10 @@ xpcAccessibleApplication* XPCApplicationAcc(); } // namespace mozilla class nsAccessibilityService final : public mozilla::a11y::DocManager, - public mozilla::a11y::FocusManager, - public mozilla::a11y::SelectionManager, - public nsIAccessibilityService, - public nsIObserver + public mozilla::a11y::FocusManager, + public mozilla::a11y::SelectionManager, + public nsIAccessibilityService, + public nsIObserver { public: typedef mozilla::a11y::Accessible Accessible; diff --git a/accessible/generic/HyperTextAccessible.h b/accessible/generic/HyperTextAccessible.h index e4dd2aaf9f..76807178fb 100644 --- a/accessible/generic/HyperTextAccessible.h +++ b/accessible/generic/HyperTextAccessible.h @@ -54,14 +54,14 @@ public: NS_DECL_ISUPPORTS_INHERITED // Accessible - virtual nsIAtom* LandmarkRole() const MOZ_OVERRIDE; - virtual int32_t GetLevelInternal() MOZ_OVERRIDE; - virtual already_AddRefed NativeAttributes() MOZ_OVERRIDE; - virtual mozilla::a11y::role NativeRole() MOZ_OVERRIDE; - virtual uint64_t NativeState() MOZ_OVERRIDE; + virtual nsIAtom* LandmarkRole() const override; + virtual int32_t GetLevelInternal() override; + virtual already_AddRefed NativeAttributes() override; + virtual mozilla::a11y::role NativeRole() override; + virtual uint64_t NativeState() override; - virtual void InvalidateChildren() MOZ_OVERRIDE; - virtual bool RemoveChild(Accessible* aAccessible) MOZ_OVERRIDE; + virtual void InvalidateChildren() override; + virtual bool RemoveChild(Accessible* aAccessible) override; // HyperTextAccessible (static helper method) @@ -429,8 +429,8 @@ protected: virtual ~HyperTextAccessible() { } // Accessible - virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE; - virtual void CacheChildren() MOZ_OVERRIDE; + virtual ENameValueFlag NativeName(nsString& aName) override; + virtual void CacheChildren() override; // HyperTextAccessible diff --git a/accessible/windows/msaa/IUnknownImpl.h b/accessible/windows/msaa/IUnknownImpl.h index cb2565776e..dbf6c1374f 100644 --- a/accessible/windows/msaa/IUnknownImpl.h +++ b/accessible/windows/msaa/IUnknownImpl.h @@ -51,13 +51,13 @@ private: #define DECL_IUNKNOWN \ public: \ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void**); \ - virtual ULONG STDMETHODCALLTYPE AddRef() final \ + virtual ULONG STDMETHODCALLTYPE AddRef() final \ { \ MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt"); \ ++mRefCnt; \ return mRefCnt; \ } \ - virtual ULONG STDMETHODCALLTYPE Release() final \ + virtual ULONG STDMETHODCALLTYPE Release() final \ { \ MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release"); \ --mRefCnt; \ diff --git a/accessible/windows/uia/uiaRawElmProvider.h b/accessible/windows/uia/uiaRawElmProvider.h index cb10779c13..ba0921530a 100644 --- a/accessible/windows/uia/uiaRawElmProvider.h +++ b/accessible/windows/uia/uiaRawElmProvider.h @@ -21,7 +21,7 @@ class AccessibleWrap; * IRawElementProviderSimple implementation (maintains IAccessibleEx approach). */ class uiaRawElmProvider final : public IAccessibleEx, - public IRawElementProviderSimple + public IRawElementProviderSimple { public: uiaRawElmProvider(AccessibleWrap* aAcc) : mAcc(aAcc) { } diff --git a/browser/components/feeds/nsFeedSniffer.h b/browser/components/feeds/nsFeedSniffer.h index 57e10d954d..fce66773bb 100644 --- a/browser/components/feeds/nsFeedSniffer.h +++ b/browser/components/feeds/nsFeedSniffer.h @@ -10,7 +10,7 @@ #include "mozilla/Attributes.h" class nsFeedSniffer final : public nsIContentSniffer, - nsIStreamListener + nsIStreamListener { public: NS_DECL_ISUPPORTS diff --git a/caps/moz.build b/caps/moz.build index abee4c002d..26fa9634a5 100644 --- a/caps/moz.build +++ b/caps/moz.build @@ -17,6 +17,7 @@ XPIDL_MODULE = 'caps' EXPORTS += [ 'nsJSPrincipals.h', 'nsNullPrincipal.h', + 'nsNullPrincipalURI.h', ] UNIFIED_SOURCES += [ @@ -36,6 +37,8 @@ LOCAL_INCLUDES += [ '/js/xpconnect/src', ] +include('/ipc/chromium/chromium-config.mozbuild') + FINAL_LIBRARY = 'xul' FAIL_ON_WARNINGS = True diff --git a/caps/nsNullPrincipal.cpp b/caps/nsNullPrincipal.cpp index ab1b58dae3..158b31fd33 100644 --- a/caps/nsNullPrincipal.cpp +++ b/caps/nsNullPrincipal.cpp @@ -1,4 +1,5 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set sw=2 sts=2 ts=2 et tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ @@ -86,6 +87,24 @@ nsNullPrincipal::Init(uint32_t aAppId, bool aInMozBrowser) mAppId = aAppId; mInMozBrowser = aInMozBrowser; + nsCString str; + nsresult rv = GenerateNullPrincipalURI(str); + NS_ENSURE_SUCCESS(rv, rv); + + mURI = new nsNullPrincipalURI(str); + + return NS_OK; +} + +void +nsNullPrincipal::GetScriptLocation(nsACString &aStr) +{ + mURI->GetSpec(aStr); +} + +nsresult +nsNullPrincipal::GenerateNullPrincipalURI(nsACString &aStr) +{ // FIXME: bug 327161 -- make sure the uuid generator is reseeding-resistant. nsresult rv; nsCOMPtr uuidgen = @@ -104,28 +123,19 @@ nsNullPrincipal::Init(uint32_t aAppId, bool aInMozBrowser) // Use an nsCString so we only do the allocation once here and then share // with nsJSPrincipals - nsCString str; - str.SetCapacity(prefixLen + suffixLen); + aStr.SetCapacity(prefixLen + suffixLen); - str.Append(NS_NULLPRINCIPAL_PREFIX); - str.Append(chars); + aStr.Append(NS_NULLPRINCIPAL_PREFIX); + aStr.Append(chars); - if (str.Length() != prefixLen + suffixLen) { + if (aStr.Length() != prefixLen + suffixLen) { NS_WARNING("Out of memory allocating null-principal URI"); return NS_ERROR_OUT_OF_MEMORY; } - mURI = new nsNullPrincipalURI(str); - return NS_OK; } -void -nsNullPrincipal::GetScriptLocation(nsACString &aStr) -{ - mURI->GetSpec(aStr); -} - #ifdef DEBUG void nsNullPrincipal::dumpImpl() { diff --git a/caps/nsNullPrincipal.h b/caps/nsNullPrincipal.h index ca935c7a93..c1156c23f3 100644 --- a/caps/nsNullPrincipal.h +++ b/caps/nsNullPrincipal.h @@ -31,7 +31,7 @@ class nsNullPrincipal final : public nsJSPrincipals { public: nsNullPrincipal(); - + // Our refcount is managed by nsJSPrincipals. Use this macro to avoid an // extra refcount member. @@ -49,6 +49,8 @@ public: virtual void GetScriptLocation(nsACString &aStr) override; + static nsresult GenerateNullPrincipalURI(nsACString &aStr); + #ifdef DEBUG virtual void dumpImpl() override; #endif diff --git a/caps/nsNullPrincipalURI.cpp b/caps/nsNullPrincipalURI.cpp index 629626de67..4d7a884cd0 100644 --- a/caps/nsNullPrincipalURI.cpp +++ b/caps/nsNullPrincipalURI.cpp @@ -9,6 +9,8 @@ #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" +#include "mozilla/ipc/URIParams.h" + #include "nsNetUtil.h" #include "nsEscape.h" #include "nsCRT.h" @@ -17,6 +19,12 @@ //// nsNullPrincipalURI nsNullPrincipalURI::nsNullPrincipalURI(const nsCString &aSpec) +{ + InitializeFromSpec(aSpec); +} + +void +nsNullPrincipalURI::InitializeFromSpec(const nsCString &aSpec) { int32_t dividerPosition = aSpec.FindChar(':'); NS_ASSERTION(dividerPosition != -1, "Malformed URI!"); @@ -44,6 +52,7 @@ NS_INTERFACE_MAP_BEGIN(nsNullPrincipalURI) else NS_INTERFACE_MAP_ENTRY(nsIURI) NS_INTERFACE_MAP_ENTRY(nsISizeOf) + NS_INTERFACE_MAP_ENTRY(nsIIPCSerializableURI) NS_INTERFACE_MAP_END //////////////////////////////////////////////////////////////////////////////// @@ -272,6 +281,31 @@ nsNullPrincipalURI::SchemeIs(const char *aScheme, bool *_schemeIs) return NS_OK; } +//////////////////////////////////////////////////////////////////////////////// +//// nsIIPCSerializableURI + +void +nsNullPrincipalURI::Serialize(mozilla::ipc::URIParams &aParams) +{ + aParams = mozilla::ipc::NullPrincipalURIParams(); +} + +bool +nsNullPrincipalURI::Deserialize(const mozilla::ipc::URIParams &aParams) +{ + if (aParams.type() != mozilla::ipc::URIParams::TNullPrincipalURIParams) { + MOZ_ASSERT_UNREACHABLE("unexpected URIParams type"); + return false; + } + + nsCString str; + nsresult rv = nsNullPrincipal::GenerateNullPrincipalURI(str); + NS_ENSURE_SUCCESS(rv, false); + + InitializeFromSpec(str); + return true; +} + //////////////////////////////////////////////////////////////////////////////// //// nsISizeOf diff --git a/caps/nsNullPrincipalURI.h b/caps/nsNullPrincipalURI.h index 9c5ec65b43..6fb0b02d64 100644 --- a/caps/nsNullPrincipalURI.h +++ b/caps/nsNullPrincipalURI.h @@ -16,6 +16,7 @@ #include "nsAutoPtr.h" #include "nsString.h" #include "mozilla/Attributes.h" +#include "nsIIPCSerializableURI.h" #include "mozilla/MemoryReporting.h" // {51fcd543-3b52-41f7-b91b-6b54102236e6} @@ -24,11 +25,13 @@ {0xb9, 0x1b, 0x6b, 0x54, 0x10, 0x22, 0x36, 0xe6} } class nsNullPrincipalURI final : public nsIURI - , public nsISizeOf + , public nsISizeOf + , public nsIIPCSerializableURI { public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIURI + NS_DECL_NSIIPCSERIALIZABLEURI // nsISizeOf virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override; @@ -36,9 +39,14 @@ public: explicit nsNullPrincipalURI(const nsCString &aSpec); + // NB: This constructor exists only for deserialization. + nsNullPrincipalURI() { } + private: ~nsNullPrincipalURI() {} + void InitializeFromSpec(const nsCString &aSpec); + nsCString mScheme; nsCString mPath; }; diff --git a/caps/nsScriptSecurityManager.h b/caps/nsScriptSecurityManager.h index 646114d211..da9b3a2990 100644 --- a/caps/nsScriptSecurityManager.h +++ b/caps/nsScriptSecurityManager.h @@ -33,8 +33,8 @@ class ClassInfoData; { 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }} class nsScriptSecurityManager final : public nsIScriptSecurityManager, - public nsIChannelEventSink, - public nsIObserver + public nsIChannelEventSink, + public nsIObserver { public: static void Shutdown(); diff --git a/chrome/nsChromeProtocolHandler.h b/chrome/nsChromeProtocolHandler.h index 0d86b009db..42c3f52be0 100644 --- a/chrome/nsChromeProtocolHandler.h +++ b/chrome/nsChromeProtocolHandler.h @@ -19,7 +19,7 @@ } class nsChromeProtocolHandler final : public nsIProtocolHandler, - public nsSupportsWeakReference + public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/docshell/shistory/src/nsSHEntryShared.h b/docshell/shistory/src/nsSHEntryShared.h index 1e7a2e6777..6559fa5163 100644 --- a/docshell/shistory/src/nsSHEntryShared.h +++ b/docshell/shistory/src/nsSHEntryShared.h @@ -31,7 +31,7 @@ class nsISupportsArray; // // nsSHEntryShared is the vehicle for this sharing. class nsSHEntryShared final : public nsIBFCacheEntry, - public nsIMutationObserver + public nsIMutationObserver { public: static void EnsureHistoryTracker(); diff --git a/docshell/shistory/src/nsSHistory.h b/docshell/shistory/src/nsSHistory.h index 71237cfd33..36af8855f6 100644 --- a/docshell/shistory/src/nsSHistory.h +++ b/docshell/shistory/src/nsSHistory.h @@ -28,9 +28,9 @@ class nsISHEntry; class nsISHTransaction; class nsSHistory final : public PRCList, - public nsISHistory, - public nsISHistoryInternal, - public nsIWebNavigation + public nsISHistory, + public nsISHistoryInternal, + public nsIWebNavigation { public: nsSHistory(); diff --git a/dom/archivereader/ArchiveReader.h b/dom/archivereader/ArchiveReader.h index b84cc3c03f..31a75b3dd9 100644 --- a/dom/archivereader/ArchiveReader.h +++ b/dom/archivereader/ArchiveReader.h @@ -33,7 +33,7 @@ class ArchiveRequest; * This is the ArchiveReader object */ class ArchiveReader final : public nsISupports, - public nsWrapperCache + public nsWrapperCache { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/dom/archivereader/ArchiveZipFile.cpp b/dom/archivereader/ArchiveZipFile.cpp index 85a539262d..d326a36511 100644 --- a/dom/archivereader/ArchiveZipFile.cpp +++ b/dom/archivereader/ArchiveZipFile.cpp @@ -21,7 +21,7 @@ USING_ARCHIVEREADER_NAMESPACE * Input stream object for zip files */ class ArchiveInputStream final : public nsIInputStream, - public nsISeekableStream + public nsISeekableStream { public: ArchiveInputStream(uint64_t aParentSize, diff --git a/dom/asmjscache/AsmJSCache.cpp b/dom/asmjscache/AsmJSCache.cpp index f394e7fc7c..123bd93689 100644 --- a/dom/asmjscache/AsmJSCache.cpp +++ b/dom/asmjscache/AsmJSCache.cpp @@ -1108,7 +1108,7 @@ FindHashMatch(const Metadata& aMetadata, const ReadParams& aReadParams, // A runnable that executes for a cache access originating in the main process. class SingleProcessRunnable final : public File, - private MainProcessRunnable + private MainProcessRunnable { public: // In the single-process case, the calling JS compilation thread holds the @@ -1186,7 +1186,7 @@ private: // in the content process. This runnable gets registered as an IPDL subprotocol // actor so that it can communicate with the corresponding ChildProcessRunnable. class ParentProcessRunnable final : public PAsmJSCacheEntryParent, - public MainProcessRunnable + public MainProcessRunnable { public: // The given principal comes from an IPC::Principal which will be dec-refed @@ -1357,7 +1357,7 @@ DeallocEntryParent(PAsmJSCacheEntryParent* aActor) namespace { class ChildProcessRunnable final : public File, - public PAsmJSCacheEntryChild + public PAsmJSCacheEntryChild { public: NS_DECL_NSIRUNNABLE diff --git a/dom/base/Attr.h b/dom/base/Attr.h index 3716c4ba66..6b36e51aca 100644 --- a/dom/base/Attr.h +++ b/dom/base/Attr.h @@ -29,7 +29,7 @@ namespace dom { // Attribute helper class used to wrap up an attribute with a dom // object that implements nsIDOMAttr and nsIDOMNode class Attr final : public nsIAttribute, - public nsIDOMAttr + public nsIDOMAttr { virtual ~Attr() {} diff --git a/dom/base/Comment.h b/dom/base/Comment.h index 572169704c..d13fc1d00b 100644 --- a/dom/base/Comment.h +++ b/dom/base/Comment.h @@ -14,7 +14,7 @@ namespace mozilla { namespace dom { class Comment final : public nsGenericDOMDataNode, - public nsIDOMComment + public nsIDOMComment { private: void Init() diff --git a/dom/base/Console.h b/dom/base/Console.h index 67ca8ff359..0c0a356382 100644 --- a/dom/base/Console.h +++ b/dom/base/Console.h @@ -26,7 +26,7 @@ class ConsoleCallData; struct ConsoleStackEntry; class Console final : public nsIObserver - , public nsWrapperCache + , public nsWrapperCache { ~Console(); diff --git a/dom/base/DOMImplementation.h b/dom/base/DOMImplementation.h index 4cbf44fa27..8b2a191439 100644 --- a/dom/base/DOMImplementation.h +++ b/dom/base/DOMImplementation.h @@ -25,7 +25,7 @@ namespace dom { class DocumentType; class DOMImplementation final : public nsIDOMDOMImplementation - , public nsWrapperCache + , public nsWrapperCache { ~DOMImplementation() { diff --git a/dom/base/DOMParser.h b/dom/base/DOMParser.h index 9ee16934c6..b4adeffefe 100644 --- a/dom/base/DOMParser.h +++ b/dom/base/DOMParser.h @@ -21,8 +21,8 @@ namespace mozilla { namespace dom { class DOMParser final : public nsIDOMParser, - public nsSupportsWeakReference, - public nsWrapperCache + public nsSupportsWeakReference, + public nsWrapperCache { typedef mozilla::dom::GlobalObject GlobalObject; diff --git a/dom/base/DOMRect.h b/dom/base/DOMRect.h index fb7dfaeff1..d0e94e54a1 100644 --- a/dom/base/DOMRect.h +++ b/dom/base/DOMRect.h @@ -76,7 +76,7 @@ protected: }; class DOMRect final : public DOMRectReadOnly - , public nsIDOMClientRect + , public nsIDOMClientRect { public: explicit DOMRect(nsISupports* aParent, double aX = 0, double aY = 0, @@ -147,7 +147,7 @@ private: }; class DOMRectList final : public nsIDOMClientRectList, - public nsWrapperCache + public nsWrapperCache { ~DOMRectList() {} diff --git a/dom/base/Element.h b/dom/base/Element.h index d920d59d76..743aae547a 100644 --- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -1509,45 +1509,44 @@ _elementName::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const #define NS_FORWARD_NSIDOMELEMENT_TO_GENERIC \ typedef mozilla::dom::Element Element; \ -NS_IMETHOD GetTagName(nsAString& aTagName) final override \ +NS_IMETHOD GetTagName(nsAString& aTagName) final override \ { \ Element::GetTagName(aTagName); \ return NS_OK; \ } \ -NS_IMETHOD GetId(nsAString& aId) final override \ +NS_IMETHOD GetId(nsAString& aId) final override \ { \ Element::GetId(aId); \ return NS_OK; \ } \ -NS_IMETHOD SetId(const nsAString& aId) final override \ +NS_IMETHOD SetId(const nsAString& aId) final override \ { \ Element::SetId(aId); \ return NS_OK; \ } \ -NS_IMETHOD GetClassName(nsAString& aClassName) final override \ +NS_IMETHOD GetClassName(nsAString& aClassName) final override \ { \ Element::GetClassName(aClassName); \ return NS_OK; \ } \ -NS_IMETHOD SetClassName(const nsAString& aClassName) final override \ +NS_IMETHOD SetClassName(const nsAString& aClassName) final override \ { \ Element::SetClassName(aClassName); \ return NS_OK; \ } \ -NS_IMETHOD GetClassList(nsISupports** aClassList) final override \ +NS_IMETHOD GetClassList(nsISupports** aClassList) final override \ { \ Element::GetClassList(aClassList); \ return NS_OK; \ } \ -NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) final \ - override \ +NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) final override \ { \ NS_ADDREF(*aAttributes = Attributes()); \ return NS_OK; \ } \ using Element::GetAttribute; \ -NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) final \ - override \ +NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) final \ + override \ { \ nsString attr; \ GetAttribute(name, attr); \ @@ -1556,13 +1555,13 @@ NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) final \ } \ NS_IMETHOD GetAttributeNS(const nsAString& namespaceURI, \ const nsAString& localName, \ - nsAString& _retval) final override \ + nsAString& _retval) final override \ { \ Element::GetAttributeNS(namespaceURI, localName, _retval); \ return NS_OK; \ } \ NS_IMETHOD SetAttribute(const nsAString& name, \ - const nsAString& value) override \ + const nsAString& value) override \ { \ mozilla::ErrorResult rv; \ Element::SetAttribute(name, value, rv); \ @@ -1570,22 +1569,21 @@ NS_IMETHOD SetAttribute(const nsAString& name, \ } \ NS_IMETHOD SetAttributeNS(const nsAString& namespaceURI, \ const nsAString& qualifiedName, \ - const nsAString& value) final override \ + const nsAString& value) final override \ { \ mozilla::ErrorResult rv; \ Element::SetAttributeNS(namespaceURI, qualifiedName, value, rv); \ return rv.ErrorCode(); \ } \ using Element::RemoveAttribute; \ -NS_IMETHOD RemoveAttribute(const nsAString& name) final override \ +NS_IMETHOD RemoveAttribute(const nsAString& name) final override \ { \ mozilla::ErrorResult rv; \ RemoveAttribute(name, rv); \ return rv.ErrorCode(); \ } \ NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI, \ - const nsAString& localName) final \ - override \ + const nsAString& localName) final override \ { \ mozilla::ErrorResult rv; \ Element::RemoveAttributeNS(namespaceURI, localName, rv); \ @@ -1593,31 +1591,31 @@ NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI, \ } \ using Element::HasAttribute; \ NS_IMETHOD HasAttribute(const nsAString& name, \ - bool* _retval) final override \ + bool* _retval) final override \ { \ *_retval = HasAttribute(name); \ return NS_OK; \ } \ NS_IMETHOD HasAttributeNS(const nsAString& namespaceURI, \ const nsAString& localName, \ - bool* _retval) final override \ + bool* _retval) final override \ { \ *_retval = Element::HasAttributeNS(namespaceURI, localName); \ return NS_OK; \ } \ -NS_IMETHOD HasAttributes(bool* _retval) final override \ +NS_IMETHOD HasAttributes(bool* _retval) final override \ { \ *_retval = Element::HasAttributes(); \ return NS_OK; \ } \ NS_IMETHOD GetAttributeNode(const nsAString& name, \ - nsIDOMAttr** _retval) final override \ + nsIDOMAttr** _retval) final override \ { \ NS_IF_ADDREF(*_retval = Element::GetAttributeNode(name)); \ return NS_OK; \ } \ NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr, \ - nsIDOMAttr** _retval) final override \ + nsIDOMAttr** _retval) final override \ { \ if (!newAttr) { \ return NS_ERROR_INVALID_POINTER; \ @@ -1628,7 +1626,7 @@ NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr, \ return rv.ErrorCode(); \ } \ NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr, \ - nsIDOMAttr** _retval) final override \ + nsIDOMAttr** _retval) final override \ { \ if (!oldAttr) { \ return NS_ERROR_INVALID_POINTER; \ @@ -1640,14 +1638,14 @@ NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr, \ } \ NS_IMETHOD GetAttributeNodeNS(const nsAString& namespaceURI, \ const nsAString& localName, \ - nsIDOMAttr** _retval) final override \ + nsIDOMAttr** _retval) final override \ { \ NS_IF_ADDREF(*_retval = Element::GetAttributeNodeNS(namespaceURI, \ localName)); \ return NS_OK; \ } \ NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr, \ - nsIDOMAttr** _retval) final override \ + nsIDOMAttr** _retval) final override \ { \ mozilla::ErrorResult rv; \ mozilla::dom::Attr* attr = static_cast(newAttr); \ @@ -1655,34 +1653,33 @@ NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr, \ return rv.ErrorCode(); \ } \ NS_IMETHOD GetElementsByTagName(const nsAString& name, \ - nsIDOMHTMLCollection** _retval) final \ - override \ + nsIDOMHTMLCollection** _retval) final \ + override \ { \ Element::GetElementsByTagName(name, _retval); \ return NS_OK; \ } \ NS_IMETHOD GetElementsByTagNameNS(const nsAString& namespaceURI, \ const nsAString& localName, \ - nsIDOMHTMLCollection** _retval) final \ - override\ + nsIDOMHTMLCollection** _retval) final \ + override \ { \ return Element::GetElementsByTagNameNS(namespaceURI, localName, \ _retval); \ } \ NS_IMETHOD GetElementsByClassName(const nsAString& classes, \ - nsIDOMHTMLCollection** _retval) final \ - override\ + nsIDOMHTMLCollection** _retval) final \ + override \ { \ return Element::GetElementsByClassName(classes, _retval); \ } \ -NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) final \ - override \ +NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) final override \ { \ nsIHTMLCollection* list = FragmentOrElement::Children(); \ return CallQueryInterface(list, aChildElements); \ } \ -NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) final \ - override \ +NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) final \ + override \ { \ Element* element = Element::GetFirstElementChild(); \ if (!element) { \ @@ -1691,8 +1688,8 @@ NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) final \ } \ return CallQueryInterface(element, aFirstElementChild); \ } \ -NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) final \ - override \ +NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) final \ + override \ { \ Element* element = Element::GetLastElementChild(); \ if (!element) { \ @@ -1702,7 +1699,7 @@ NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) final \ return CallQueryInterface(element, aLastElementChild); \ } \ NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \ - final override \ + final override \ { \ Element* element = Element::GetPreviousElementSibling(); \ if (!element) { \ @@ -1712,7 +1709,7 @@ NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \ return CallQueryInterface(element, aPreviousElementSibling); \ } \ NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling) \ - final override \ + final override \ { \ Element* element = Element::GetNextElementSibling(); \ if (!element) { \ @@ -1721,126 +1718,123 @@ NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling) \ } \ return CallQueryInterface(element, aNextElementSibling); \ } \ -NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) final \ - override \ +NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) final override \ { \ *aChildElementCount = Element::ChildElementCount(); \ return NS_OK; \ } \ -NS_IMETHOD MozRemove() final override \ +NS_IMETHOD MozRemove() final override \ { \ nsINode::Remove(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) final \ - override \ +NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) final override \ { \ *_retval = Element::GetClientRects().take(); \ return NS_OK; \ } \ -NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) final \ - override \ +NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) final override \ { \ *_retval = Element::GetBoundingClientRect().take(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollTop(int32_t* aScrollTop) final override \ +NS_IMETHOD GetScrollTop(int32_t* aScrollTop) final override \ { \ *aScrollTop = Element::ScrollTop(); \ return NS_OK; \ } \ -NS_IMETHOD SetScrollTop(int32_t aScrollTop) final override \ +NS_IMETHOD SetScrollTop(int32_t aScrollTop) final override \ { \ Element::SetScrollTop(aScrollTop); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) final override \ +NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) final override \ { \ *aScrollLeft = Element::ScrollLeft(); \ return NS_OK; \ } \ -NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) final override \ +NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) final override \ { \ Element::SetScrollLeft(aScrollLeft); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) final override \ +NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) final override \ { \ *aScrollWidth = Element::ScrollWidth(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) final override \ +NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) final override \ { \ *aScrollHeight = Element::ScrollHeight(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientTop(int32_t* aClientTop) final override \ +NS_IMETHOD GetClientTop(int32_t* aClientTop) final override \ { \ *aClientTop = Element::ClientTop(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientLeft(int32_t* aClientLeft) final override \ +NS_IMETHOD GetClientLeft(int32_t* aClientLeft) final override \ { \ *aClientLeft = Element::ClientLeft(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientWidth(int32_t* aClientWidth) final override \ +NS_IMETHOD GetClientWidth(int32_t* aClientWidth) final override \ { \ *aClientWidth = Element::ClientWidth(); \ return NS_OK; \ } \ -NS_IMETHOD GetClientHeight(int32_t* aClientHeight) final override \ +NS_IMETHOD GetClientHeight(int32_t* aClientHeight) final override \ { \ *aClientHeight = Element::ClientHeight(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) final override \ +NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) final override \ { \ *aScrollLeftMax = Element::ScrollLeftMax(); \ return NS_OK; \ } \ -NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) final override \ +NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) final override \ { \ *aScrollTopMax = Element::ScrollTopMax(); \ return NS_OK; \ } \ NS_IMETHOD MozMatchesSelector(const nsAString& selector, \ - bool* _retval) final override \ + bool* _retval) final override \ { \ mozilla::ErrorResult rv; \ *_retval = Element::MozMatchesSelector(selector, rv); \ return rv.ErrorCode(); \ } \ -NS_IMETHOD SetCapture(bool retargetToElement) final override \ +NS_IMETHOD SetCapture(bool retargetToElement) final override \ { \ Element::SetCapture(retargetToElement); \ return NS_OK; \ } \ -NS_IMETHOD ReleaseCapture(void) final override \ +NS_IMETHOD ReleaseCapture(void) final override \ { \ Element::ReleaseCapture(); \ return NS_OK; \ } \ -NS_IMETHOD MozRequestFullScreen(void) final override \ +NS_IMETHOD MozRequestFullScreen(void) final override \ { \ mozilla::ErrorResult rv; \ Element::MozRequestFullScreen(nullptr, JS::UndefinedHandleValue, rv); \ return rv.ErrorCode(); \ } \ -NS_IMETHOD MozRequestPointerLock(void) final override \ +NS_IMETHOD MozRequestPointerLock(void) final override \ { \ Element::MozRequestPointerLock(); \ return NS_OK; \ } \ using nsINode::QuerySelector; \ NS_IMETHOD QuerySelector(const nsAString& aSelector, \ - nsIDOMElement **aReturn) final override \ + nsIDOMElement **aReturn) final override \ { \ return nsINode::QuerySelector(aSelector, aReturn); \ } \ using nsINode::QuerySelectorAll; \ NS_IMETHOD QuerySelectorAll(const nsAString& aSelector, \ - nsIDOMNodeList **aReturn) final override \ + nsIDOMNodeList **aReturn) final override \ { \ return nsINode::QuerySelectorAll(aSelector, aReturn); \ } diff --git a/dom/base/EventSource.h b/dom/base/EventSource.h index 7086b9f3f2..6815b85f81 100644 --- a/dom/base/EventSource.h +++ b/dom/base/EventSource.h @@ -37,11 +37,11 @@ class AsyncVerifyRedirectCallbackFwr; struct EventSourceInit; class EventSource final : public DOMEventTargetHelper - , public nsIObserver - , public nsIStreamListener - , public nsIChannelEventSink - , public nsIInterfaceRequestor - , public nsSupportsWeakReference + , public nsIObserver + , public nsIStreamListener + , public nsIChannelEventSink + , public nsIInterfaceRequestor + , public nsSupportsWeakReference { friend class AsyncVerifyRedirectCallbackFwr; diff --git a/dom/base/File.cpp b/dom/base/File.cpp index 6dfaf680a8..dfd05f746c 100644 --- a/dom/base/File.cpp +++ b/dom/base/File.cpp @@ -52,8 +52,8 @@ namespace dom { // from NS_NewByteInputStream is held alive as long as the // stream is. We do that by passing back this class instead. class DataOwnerAdapter final : public nsIInputStream, - public nsISeekableStream, - public nsIIPCSerializableInputStream + public nsISeekableStream, + public nsIIPCSerializableInputStream { typedef FileImplMemory::DataOwner DataOwner; public: diff --git a/dom/base/File.h b/dom/base/File.h index c8d4ac7ae2..ad704a007c 100644 --- a/dom/base/File.h +++ b/dom/base/File.h @@ -52,10 +52,10 @@ class FileImpl; class OwningArrayBufferOrArrayBufferViewOrBlobOrString; class File final : public nsIDOMFile - , public nsIXHRSendable - , public nsIMutable - , public nsSupportsWeakReference - , public nsWrapperCache + , public nsIXHRSendable + , public nsIMutable + , public nsSupportsWeakReference + , public nsWrapperCache { public: NS_DECL_NSIDOMBLOB @@ -524,7 +524,8 @@ public: return true; } - class DataOwner final : public mozilla::LinkedListElement { + class DataOwner final : public mozilla::LinkedListElement + { public: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DataOwner) DataOwner(void* aMemoryBuffer, uint64_t aLength) @@ -814,7 +815,7 @@ private: }; class FileList final : public nsIDOMFileList, - public nsWrapperCache + public nsWrapperCache { ~FileList() {} diff --git a/dom/base/ImportManager.h b/dom/base/ImportManager.h index d63d7c8494..8d1aa77c34 100644 --- a/dom/base/ImportManager.h +++ b/dom/base/ImportManager.h @@ -62,7 +62,7 @@ class ImportManager; typedef nsTHashtable> NodeTable; class ImportLoader final : public nsIStreamListener - , public nsIDOMEventListener + , public nsIDOMEventListener { // A helper inner class to decouple the logic of updating the import graph diff --git a/dom/base/MessageChannel.h b/dom/base/MessageChannel.h index 87b28832a6..d9b1fb52f5 100644 --- a/dom/base/MessageChannel.h +++ b/dom/base/MessageChannel.h @@ -22,7 +22,7 @@ namespace dom { class MessagePort; class MessageChannel final : public nsISupports - , public nsWrapperCache + , public nsWrapperCache { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/dom/base/MessagePortList.h b/dom/base/MessagePortList.h index 5b62bf72fa..b6f09ced68 100644 --- a/dom/base/MessagePortList.h +++ b/dom/base/MessagePortList.h @@ -19,7 +19,7 @@ namespace mozilla { namespace dom { class MessagePortList final : public nsISupports - , public nsWrapperCache + , public nsWrapperCache { ~MessagePortList() {} diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h index a362935185..02821bd19b 100644 --- a/dom/base/Navigator.h +++ b/dom/base/Navigator.h @@ -106,8 +106,8 @@ class AudioChannelManager; } // namespace system class Navigator final : public nsIDOMNavigator - , public nsIMozNavigatorNetwork - , public nsWrapperCache + , public nsIMozNavigatorNetwork + , public nsWrapperCache { public: explicit Navigator(nsPIDOMWindow* aInnerWindow); diff --git a/dom/base/NodeIterator.h b/dom/base/NodeIterator.h index 54d89f2fc1..a3313df74e 100644 --- a/dom/base/NodeIterator.h +++ b/dom/base/NodeIterator.h @@ -23,8 +23,8 @@ namespace mozilla { namespace dom { class NodeIterator final : public nsIDOMNodeIterator, - public nsTraversal, - public nsStubMutationObserver + public nsTraversal, + public nsStubMutationObserver { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/dom/base/ShadowRoot.h b/dom/base/ShadowRoot.h index 37a93b5394..ae7104fe3e 100644 --- a/dom/base/ShadowRoot.h +++ b/dom/base/ShadowRoot.h @@ -134,7 +134,7 @@ public: mIsComposedDocParticipant = aIsComposedDocParticipant; } - virtual void DestroyContent() MOZ_OVERRIDE; + virtual void DestroyContent() override; protected: virtual ~ShadowRoot(); diff --git a/dom/base/SubtleCrypto.h b/dom/base/SubtleCrypto.h index 9712e740ae..eb530496aa 100644 --- a/dom/base/SubtleCrypto.h +++ b/dom/base/SubtleCrypto.h @@ -22,7 +22,7 @@ class Promise; typedef ArrayBufferViewOrArrayBuffer CryptoOperationData; class SubtleCrypto final : public nsISupports, - public nsWrapperCache + public nsWrapperCache { ~SubtleCrypto() {} diff --git a/dom/base/TextInputProcessor.h b/dom/base/TextInputProcessor.h index 4016053208..e8e7336b1c 100644 --- a/dom/base/TextInputProcessor.h +++ b/dom/base/TextInputProcessor.h @@ -21,7 +21,7 @@ class TextEventDispatcher; } // namespace widget class TextInputProcessor final : public nsITextInputProcessor - , public widget::TextEventDispatcherListener + , public widget::TextEventDispatcherListener { typedef mozilla::widget::IMENotification IMENotification; typedef mozilla::widget::TextEventDispatcher TextEventDispatcher; diff --git a/dom/base/URLSearchParams.h b/dom/base/URLSearchParams.h index 86ac459008..173628fb58 100644 --- a/dom/base/URLSearchParams.h +++ b/dom/base/URLSearchParams.h @@ -27,7 +27,7 @@ public: }; class URLSearchParams final : public nsISupports, - public nsWrapperCache + public nsWrapperCache { ~URLSearchParams(); diff --git a/dom/base/WebSocket.cpp b/dom/base/WebSocket.cpp index 36a0bd3944..68a326cca9 100644 --- a/dom/base/WebSocket.cpp +++ b/dom/base/WebSocket.cpp @@ -63,11 +63,11 @@ namespace mozilla { namespace dom { class WebSocketImpl final : public nsIInterfaceRequestor - , public nsIWebSocketListener - , public nsIObserver - , public nsSupportsWeakReference - , public nsIRequest - , public nsIEventTarget + , public nsIWebSocketListener + , public nsIObserver + , public nsSupportsWeakReference + , public nsIRequest + , public nsIEventTarget { public: NS_DECL_NSIINTERFACEREQUESTOR diff --git a/dom/base/WindowNamedPropertiesHandler.h b/dom/base/WindowNamedPropertiesHandler.h index da7e1c69be..67ae7e5854 100644 --- a/dom/base/WindowNamedPropertiesHandler.h +++ b/dom/base/WindowNamedPropertiesHandler.h @@ -24,33 +24,33 @@ public: JS::Handle aId, bool /* unused */, JS::MutableHandle aDesc) - const MOZ_OVERRIDE; + const override; virtual bool defineProperty(JSContext* aCx, JS::Handle aProxy, JS::Handle aId, JS::MutableHandle aDesc, - JS::ObjectOpResult &result) const MOZ_OVERRIDE; + JS::ObjectOpResult &result) const override; virtual bool ownPropNames(JSContext* aCx, JS::Handle aProxy, unsigned flags, - JS::AutoIdVector& aProps) const MOZ_OVERRIDE; + JS::AutoIdVector& aProps) const override; virtual bool delete_(JSContext* aCx, JS::Handle aProxy, JS::Handle aId, - JS::ObjectOpResult &aResult) const MOZ_OVERRIDE; + JS::ObjectOpResult &aResult) const override; virtual bool preventExtensions(JSContext* aCx, JS::Handle aProxy, - JS::ObjectOpResult& aResult) const MOZ_OVERRIDE + JS::ObjectOpResult& aResult) const override { return aResult.failCantPreventExtensions(); } virtual bool isExtensible(JSContext* aCx, JS::Handle aProxy, - bool* aIsExtensible) const MOZ_OVERRIDE + bool* aIsExtensible) const override { *aIsExtensible = true; return true; } virtual const char* - className(JSContext *aCx, JS::Handle aProxy) const MOZ_OVERRIDE + className(JSContext *aCx, JS::Handle aProxy) const override { return "WindowProperties"; } diff --git a/dom/base/nsContentPermissionHelper.h b/dom/base/nsContentPermissionHelper.h index f51d706c61..e3368e836d 100644 --- a/dom/base/nsContentPermissionHelper.h +++ b/dom/base/nsContentPermissionHelper.h @@ -107,7 +107,7 @@ class nsContentPermissionRequestProxy : public nsIContentPermissionRequest * RemotePermissionRequest will send a prompt ipdl request to b2g process. */ class RemotePermissionRequest final : public nsISupports - , public mozilla::dom::PContentPermissionRequestChild + , public mozilla::dom::PContentPermissionRequestChild { public: NS_DECL_ISUPPORTS diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 76a8e932e9..c4576f6f48 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -401,7 +401,7 @@ EventListenerManagerHashClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry) } class SameOriginCheckerImpl final : public nsIChannelEventSink, - public nsIInterfaceRequestor + public nsIInterfaceRequestor { ~SameOriginCheckerImpl() {} diff --git a/dom/base/nsDOMMutationObserver.h b/dom/base/nsDOMMutationObserver.h index 6b29798225..414b6e1f3a 100644 --- a/dom/base/nsDOMMutationObserver.h +++ b/dom/base/nsDOMMutationObserver.h @@ -29,7 +29,7 @@ class nsDOMMutationObserver; using mozilla::dom::MutationObservingInfo; class nsDOMMutationRecord final : public nsISupports, - public nsWrapperCache + public nsWrapperCache { virtual ~nsDOMMutationRecord() {} @@ -338,7 +338,7 @@ public: { 0x9e, 0xab, 0x07, 0x47, 0xa9, 0xe4, 0x65, 0xb4 } } class nsDOMMutationObserver final : public nsISupports, - public nsWrapperCache + public nsWrapperCache { public: nsDOMMutationObserver(already_AddRefed&& aOwner, diff --git a/dom/base/nsDOMScriptObjectFactory.h b/dom/base/nsDOMScriptObjectFactory.h index 0ef6ead0f9..03263da0a0 100644 --- a/dom/base/nsDOMScriptObjectFactory.h +++ b/dom/base/nsDOMScriptObjectFactory.h @@ -23,7 +23,7 @@ #include "mozilla/Attributes.h" class nsDOMScriptObjectFactory final : public nsIDOMScriptObjectFactory, - public nsIObserver + public nsIObserver { ~nsDOMScriptObjectFactory() {} diff --git a/dom/base/nsDOMSerializer.h b/dom/base/nsDOMSerializer.h index 1560998ed9..27accd6ecb 100644 --- a/dom/base/nsDOMSerializer.h +++ b/dom/base/nsDOMSerializer.h @@ -15,7 +15,7 @@ class nsINode; class nsDOMSerializer final : public nsIDOMSerializer, - public nsWrapperCache + public nsWrapperCache { public: nsDOMSerializer(); diff --git a/dom/base/nsDOMWindowUtils.h b/dom/base/nsDOMWindowUtils.h index e3b351e73d..aa13a3bd4c 100644 --- a/dom/base/nsDOMWindowUtils.h +++ b/dom/base/nsDOMWindowUtils.h @@ -55,7 +55,7 @@ private: }; class nsDOMWindowUtils final : public nsIDOMWindowUtils, - public nsSupportsWeakReference + public nsSupportsWeakReference { typedef mozilla::widget::TextEventDispatcher TextEventDispatcher; diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index edd076ea85..5969490e62 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -596,8 +596,8 @@ protected: // XXXbz I wish we could just derive the _allcaps thing from _i #define DECL_SHIM(_i, _allcaps) \ - class _i##Shim final : public nsIInterfaceRequestor, \ - public _i \ + class _i##Shim final : public nsIInterfaceRequestor, \ + public _i \ { \ ~_i##Shim() {} \ public: \ diff --git a/dom/base/nsFocusManager.h b/dom/base/nsFocusManager.h index 5c2b433643..b93571d520 100644 --- a/dom/base/nsFocusManager.h +++ b/dom/base/nsFocusManager.h @@ -32,8 +32,8 @@ struct nsDelayedBlurOrFocusEvent; */ class nsFocusManager final : public nsIFocusManager, - public nsIObserver, - public nsSupportsWeakReference + public nsIObserver, + public nsSupportsWeakReference { typedef mozilla::widget::InputContextAction InputContextAction; diff --git a/dom/base/nsFormData.h b/dom/base/nsFormData.h index 99e3c175d7..ec49585333 100644 --- a/dom/base/nsFormData.h +++ b/dom/base/nsFormData.h @@ -26,9 +26,9 @@ class GlobalObject; } // namespace mozilla class nsFormData final : public nsIDOMFormData, - public nsIXHRSendable, - public nsFormSubmission, - public nsWrapperCache + public nsIXHRSendable, + public nsFormSubmission, + public nsWrapperCache { private: ~nsFormData() {} diff --git a/dom/base/nsFrameLoader.h b/dom/base/nsFrameLoader.h index ddb54b6a1e..60e306e7f9 100644 --- a/dom/base/nsFrameLoader.h +++ b/dom/base/nsFrameLoader.h @@ -56,8 +56,8 @@ class QX11EmbedContainer; #endif class nsFrameLoader final : public nsIFrameLoader, - public nsStubMutationObserver, - public mozilla::dom::ipc::MessageManagerCallback + public nsStubMutationObserver, + public mozilla::dom::ipc::MessageManagerCallback { friend class AutoResetInShow; typedef mozilla::dom::PBrowserParent PBrowserParent; diff --git a/dom/base/nsFrameMessageManager.h b/dom/base/nsFrameMessageManager.h index 6069f96e24..73468cbc97 100644 --- a/dom/base/nsFrameMessageManager.h +++ b/dom/base/nsFrameMessageManager.h @@ -152,10 +152,10 @@ private: }; class nsFrameMessageManager final : public nsIContentFrameMessageManager, - public nsIMessageBroadcaster, - public nsIFrameScriptLoader, - public nsIProcessScriptLoader, - public nsIProcessChecker + public nsIMessageBroadcaster, + public nsIFrameScriptLoader, + public nsIProcessScriptLoader, + public nsIProcessChecker { friend class mozilla::dom::MessageManagerReporter; typedef mozilla::dom::StructuredCloneData StructuredCloneData; diff --git a/dom/base/nsGenConImageContent.cpp b/dom/base/nsGenConImageContent.cpp index 746e06d08f..7118cbf463 100644 --- a/dom/base/nsGenConImageContent.cpp +++ b/dom/base/nsGenConImageContent.cpp @@ -21,7 +21,7 @@ using namespace mozilla; class nsGenConImageContent final : public nsXMLElement, - public nsImageLoadingContent + public nsImageLoadingContent { public: explicit nsGenConImageContent(already_AddRefed& aNodeInfo) diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index b13a99b24a..278bdfddb1 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -479,7 +479,7 @@ static const char sPopStatePrefStr[] = "browser.history.allowPopState"; * on nsGlobalWindow, where any script could see it. */ class nsGlobalWindowObserver final : public nsIObserver, - public nsIInterfaceRequestor + public nsIInterfaceRequestor { public: explicit nsGlobalWindowObserver(nsGlobalWindow* aWindow) : mWindow(aWindow) {} @@ -609,7 +609,7 @@ class nsOuterWindowProxy : public js::Wrapper public: MOZ_CONSTEXPR nsOuterWindowProxy() : js::Wrapper(0) { } - virtual bool finalizeInBackground(JS::Value priv) const MOZ_OVERRIDE { + virtual bool finalizeInBackground(JS::Value priv) const override { return false; } @@ -618,63 +618,63 @@ public: JS::Handle proxy, JS::Handle id, JS::MutableHandle desc) - const MOZ_OVERRIDE; + const override; virtual bool defineProperty(JSContext* cx, JS::Handle proxy, JS::Handle id, JS::MutableHandle desc, - JS::ObjectOpResult &result) const MOZ_OVERRIDE; + JS::ObjectOpResult &result) const override; virtual bool ownPropertyKeys(JSContext *cx, JS::Handle proxy, - JS::AutoIdVector &props) const MOZ_OVERRIDE; + JS::AutoIdVector &props) const override; virtual bool delete_(JSContext *cx, JS::Handle proxy, JS::Handle id, - JS::ObjectOpResult &aResult) const MOZ_OVERRIDE; + JS::ObjectOpResult &aResult) const override; virtual bool enumerate(JSContext *cx, JS::Handle proxy, - JS::MutableHandle vp) const MOZ_OVERRIDE; + JS::MutableHandle vp) const override; virtual bool preventExtensions(JSContext* cx, JS::Handle proxy, - JS::ObjectOpResult& result) const MOZ_OVERRIDE; + JS::ObjectOpResult& result) const override; virtual bool isExtensible(JSContext *cx, JS::Handle proxy, bool *extensible) - const MOZ_OVERRIDE; + const override; virtual bool has(JSContext *cx, JS::Handle proxy, - JS::Handle id, bool *bp) const MOZ_OVERRIDE; + JS::Handle id, bool *bp) const override; virtual bool get(JSContext *cx, JS::Handle proxy, JS::Handle receiver, JS::Handle id, - JS::MutableHandle vp) const MOZ_OVERRIDE; + JS::MutableHandle vp) const override; virtual bool set(JSContext *cx, JS::Handle proxy, JS::Handle receiver, JS::Handle id, JS::MutableHandle vp, - JS::ObjectOpResult &result) const MOZ_OVERRIDE; + JS::ObjectOpResult &result) const override; // SpiderMonkey extensions virtual bool getPropertyDescriptor(JSContext* cx, JS::Handle proxy, JS::Handle id, JS::MutableHandle desc) - const MOZ_OVERRIDE; + const override; virtual bool hasOwn(JSContext *cx, JS::Handle proxy, - JS::Handle id, bool *bp) const MOZ_OVERRIDE; + JS::Handle id, bool *bp) const override; virtual bool getOwnEnumerablePropertyKeys(JSContext *cx, JS::Handle proxy, - JS::AutoIdVector &props) const MOZ_OVERRIDE; + JS::AutoIdVector &props) const override; virtual const char *className(JSContext *cx, - JS::Handle wrapper) const MOZ_OVERRIDE; + JS::Handle wrapper) const override; - virtual void finalize(JSFreeOp *fop, JSObject *proxy) const MOZ_OVERRIDE; + virtual void finalize(JSFreeOp *fop, JSObject *proxy) const override; - virtual bool isCallable(JSObject *obj) const MOZ_OVERRIDE { + virtual bool isCallable(JSObject *obj) const override { return false; } - virtual bool isConstructor(JSObject *obj) const MOZ_OVERRIDE { + virtual bool isConstructor(JSObject *obj) const override { return false; } virtual bool watch(JSContext *cx, JS::Handle proxy, - JS::Handle id, JS::Handle callable) const MOZ_OVERRIDE; + JS::Handle id, JS::Handle callable) const override; virtual bool unwatch(JSContext *cx, JS::Handle proxy, - JS::Handle id) const MOZ_OVERRIDE; + JS::Handle id) const override; static void ObjectMoved(JSObject *obj, const JSObject *old); @@ -1035,7 +1035,7 @@ class nsChromeOuterWindowProxy : public nsOuterWindowProxy public: MOZ_CONSTEXPR nsChromeOuterWindowProxy() : nsOuterWindowProxy() { } - virtual const char *className(JSContext *cx, JS::Handle wrapper) const MOZ_OVERRIDE; + virtual const char *className(JSContext *cx, JS::Handle wrapper) const override; static const nsChromeOuterWindowProxy singleton; }; @@ -8880,7 +8880,7 @@ nsGlobalWindow::NotifyDOMWindowDestroyed(nsGlobalWindow* aWindow) { // with principals that are either the system principal or an expanded principal. // This may not return true for all non-web-content compartments. struct BrowserCompartmentMatcher : public js::CompartmentFilter { - virtual bool match(JSCompartment* c) const MOZ_OVERRIDE + virtual bool match(JSCompartment* c) const override { nsCOMPtr pc = nsJSPrincipals::get(JS_GetCompartmentPrincipals(c)); return nsContentUtils::IsSystemOrExpandedPrincipal(pc); @@ -8898,7 +8898,7 @@ class MultiCompartmentMatcher : public js::CompartmentFilter { } public: - virtual bool match(JSCompartment* c) const MOZ_OVERRIDE + virtual bool match(JSCompartment* c) const override { return compartments.has(c); } diff --git a/dom/base/nsLocation.h b/dom/base/nsLocation.h index 2db8315e4e..ea420e356a 100644 --- a/dom/base/nsLocation.h +++ b/dom/base/nsLocation.h @@ -26,8 +26,8 @@ class nsIDocShellLoadInfo; //***************************************************************************** class nsLocation final : public nsIDOMLocation - , public nsWrapperCache - , public mozilla::dom::URLSearchParamsObserver + , public nsWrapperCache + , public mozilla::dom::URLSearchParamsObserver { typedef mozilla::ErrorResult ErrorResult; diff --git a/dom/base/nsMimeTypeArray.h b/dom/base/nsMimeTypeArray.h index ee6631a532..d4a8f5618b 100644 --- a/dom/base/nsMimeTypeArray.h +++ b/dom/base/nsMimeTypeArray.h @@ -17,7 +17,7 @@ class nsMimeType; class nsPluginElement; class nsMimeTypeArray final : public nsISupports, - public nsWrapperCache + public nsWrapperCache { public: explicit nsMimeTypeArray(nsPIDOMWindow* aWindow); diff --git a/dom/base/nsObjectLoadingContent.cpp b/dom/base/nsObjectLoadingContent.cpp index cde0c551bd..452e155c79 100644 --- a/dom/base/nsObjectLoadingContent.cpp +++ b/dom/base/nsObjectLoadingContent.cpp @@ -377,10 +377,10 @@ public: } // nsRunnable - NS_IMETHOD Run() MOZ_OVERRIDE; + NS_IMETHOD Run() override; // nsITimerCallback - NS_IMETHOD Notify(nsITimer* timer) MOZ_OVERRIDE; + NS_IMETHOD Notify(nsITimer* timer) override; protected: virtual ~nsStopPluginRunnable() {} @@ -1292,8 +1292,8 @@ nsObjectLoadingContent::GetBaseURI(nsIURI **aResult) // see an interface requestor even though WebIDL bindings don't expose // that stuff. class ObjectInterfaceRequestorShim final : public nsIInterfaceRequestor, - public nsIChannelEventSink, - public nsIStreamListener + public nsIChannelEventSink, + public nsIStreamListener { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/dom/base/nsPluginArray.h b/dom/base/nsPluginArray.h index e9b5eb8a77..dc82f4f951 100644 --- a/dom/base/nsPluginArray.h +++ b/dom/base/nsPluginArray.h @@ -18,8 +18,8 @@ class nsPluginElement; class nsMimeType; class nsPluginArray final : public nsIObserver, - public nsSupportsWeakReference, - public nsWrapperCache + public nsSupportsWeakReference, + public nsWrapperCache { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS @@ -76,7 +76,7 @@ private: }; class nsPluginElement final : public nsISupports, - public nsWrapperCache + public nsWrapperCache { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/dom/base/nsRange.h b/dom/base/nsRange.h index 94b8ba7796..25eec6471d 100644 --- a/dom/base/nsRange.h +++ b/dom/base/nsRange.h @@ -32,8 +32,8 @@ class Selection; } class nsRange final : public nsIDOMRange, - public nsStubMutationObserver, - public nsWrapperCache + public nsStubMutationObserver, + public nsWrapperCache { typedef mozilla::ErrorResult ErrorResult; typedef mozilla::dom::DOMRect DOMRect; diff --git a/dom/base/nsTextNode.cpp b/dom/base/nsTextNode.cpp index 7e5a7e96bf..75d32da204 100644 --- a/dom/base/nsTextNode.cpp +++ b/dom/base/nsTextNode.cpp @@ -28,7 +28,7 @@ using namespace mozilla::dom; * class used to implement attr() generated content */ class nsAttributeTextNode final : public nsTextNode, - public nsStubMutationObserver + public nsStubMutationObserver { public: NS_DECL_ISUPPORTS_INHERITED diff --git a/dom/base/nsWindowMemoryReporter.h b/dom/base/nsWindowMemoryReporter.h index 59e8e242b1..7d76ab927d 100644 --- a/dom/base/nsWindowMemoryReporter.h +++ b/dom/base/nsWindowMemoryReporter.h @@ -140,8 +140,8 @@ public: * */ class nsWindowMemoryReporter final : public nsIMemoryReporter, - public nsIObserver, - public nsSupportsWeakReference + public nsIObserver, + public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp index 2c0fb286df..6417f23294 100644 --- a/dom/base/nsXMLHttpRequest.cpp +++ b/dom/base/nsXMLHttpRequest.cpp @@ -2053,11 +2053,15 @@ nsXMLHttpRequest::OnStartRequest(nsIRequest *request, nsISupports *ctxt) } nsCOMPtr jarFile; jarChannel->GetJarFile(getter_AddRefs(jarFile)); - rv = mArrayBufferBuilder.mapToFileInPackage(file, jarFile); - if (NS_WARN_IF(NS_FAILED(rv))) { + if (!jarFile) { mIsMappedArrayBuffer = false; } else { - channel->SetContentType(NS_LITERAL_CSTRING("application/mem-mapped")); + rv = mArrayBufferBuilder.mapToFileInPackage(file, jarFile); + if (NS_WARN_IF(NS_FAILED(rv))) { + mIsMappedArrayBuffer = false; + } else { + channel->SetContentType(NS_LITERAL_CSTRING("application/mem-mapped")); + } } } } diff --git a/dom/base/nsXMLHttpRequest.h b/dom/base/nsXMLHttpRequest.h index fe558f3f1f..36c4807b49 100644 --- a/dom/base/nsXMLHttpRequest.h +++ b/dom/base/nsXMLHttpRequest.h @@ -147,7 +147,7 @@ public: }; class nsXMLHttpRequestUpload final : public nsXHREventTarget, - public nsIXMLHttpRequestUpload + public nsIXMLHttpRequestUpload { public: explicit nsXMLHttpRequestUpload(mozilla::DOMEventTargetHelper* aOwner) @@ -180,15 +180,15 @@ class nsXMLHttpRequestXPCOMifier; // Make sure that any non-DOM interfaces added here are also added to // nsXMLHttpRequestXPCOMifier. class nsXMLHttpRequest final : public nsXHREventTarget, - public nsIXMLHttpRequest, - public nsIJSXMLHttpRequest, - public nsIStreamListener, - public nsIChannelEventSink, - public nsIProgressEventSink, - public nsIInterfaceRequestor, - public nsSupportsWeakReference, - public nsITimerCallback, - public nsISizeOfEventTarget + public nsIXMLHttpRequest, + public nsIJSXMLHttpRequest, + public nsIStreamListener, + public nsIChannelEventSink, + public nsIProgressEventSink, + public nsIInterfaceRequestor, + public nsSupportsWeakReference, + public nsITimerCallback, + public nsISizeOfEventTarget { friend class nsXHRParseEndListener; friend class nsXMLHttpRequestXPCOMifier; @@ -635,7 +635,8 @@ protected: nsCOMPtr mXMLParserStreamListener; // used to implement getAllResponseHeaders() - class nsHeaderVisitor : public nsIHttpHeaderVisitor { + class nsHeaderVisitor : public nsIHttpHeaderVisitor + { public: NS_DECL_ISUPPORTS NS_DECL_NSIHTTPHEADERVISITOR @@ -824,10 +825,10 @@ private: // A shim class designed to expose the non-DOM interfaces of // XMLHttpRequest via XPCOM stuff. class nsXMLHttpRequestXPCOMifier final : public nsIStreamListener, - public nsIChannelEventSink, - public nsIProgressEventSink, - public nsIInterfaceRequestor, - public nsITimerCallback + public nsIChannelEventSink, + public nsIProgressEventSink, + public nsIInterfaceRequestor, + public nsITimerCallback { NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXMLHttpRequestXPCOMifier, diff --git a/dom/base/test/chrome.ini b/dom/base/test/chrome.ini index bfe51ca44b..7f6f729ca6 100644 --- a/dom/base/test/chrome.ini +++ b/dom/base/test/chrome.ini @@ -2,6 +2,9 @@ support-files = file_url.jsm file_empty.html + file_bug945152.jar + file_bug945152_worker.js + file_bug1008126_worker.js [test_anonymousContent_xul_window.xul] [test_bug715041.xul] @@ -18,3 +21,7 @@ support-files = [test_messagemanager_principal.html] [test_messagemanager_send_principal.html] skip-if = buildapp == 'mulet' +[test_bug945152.html] +run-if = os == 'linux' +[test_bug1008126.html] +run-if = os == 'linux' diff --git a/dom/base/test/file_bug1008126_worker.js b/dom/base/test/file_bug1008126_worker.js index d68bc67897..4c8b8e6dd4 100644 --- a/dom/base/test/file_bug1008126_worker.js +++ b/dom/base/test/file_bug1008126_worker.js @@ -3,9 +3,9 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ -var gJar1 = "jar:http://example.org/tests/dom/base/test/file_bug945152.jar!/data_1.txt"; -var gJar2 = "jar:http://example.org/tests/dom/base/test/file_bug945152.jar!/data_2.txt"; -var gJar3 = "jar:http://example.org/tests/dom/base/test/file_bug945152.jar!/data_big.txt"; +var gEntry1 = "data_1.txt"; +var gEntry2 = "data_2.txt"; +var gEntry3 = "data_big.txt"; var gPaddingChar = "."; var gPaddingSize = 10000; var gPadding = ""; @@ -37,6 +37,11 @@ function checkData(xhr, data, mapped, cb) { } self.onmessage = function onmessage(event) { + var jar = event.data; + + function makeJarURL(entry) { + return "jar:" + jar + "!/" + entry; + } var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true}); @@ -71,7 +76,7 @@ self.onmessage = function onmessage(event) { } }; xhr.onload = runTests; - xhr.open("GET", gJar3, true); + xhr.open("GET", makeJarURL(gEntry3), true); xhr.responseType = "moz-chunked-arraybuffer"; xhr.send(); } @@ -104,7 +109,7 @@ self.onmessage = function onmessage(event) { loadendCount++; checkData(xhr, gData2, false, function() {} ); }; - xhr.open("GET", gJar2, false); + xhr.open("GET", makeJarURL(gEntry2), false); xhr.responseType = "arraybuffer"; xhr.send(); checkEventCount(runTests); @@ -112,7 +117,7 @@ self.onmessage = function onmessage(event) { function test_sync_xhr_data1() { ok(true, "Test sync XHR with data1"); - xhr.open("GET", gJar1, false); + xhr.open("GET", makeJarURL(gEntry1), false); xhr.responseType = "arraybuffer"; xhr.send(); checkData(xhr, gData1, true, runTests); @@ -120,7 +125,7 @@ self.onmessage = function onmessage(event) { function test_sync_xhr_data2() { ok(true, "Test sync XHR with data2"); - xhr.open("GET", gJar2, false); + xhr.open("GET", makeJarURL(gEntry2), false); xhr.responseType = "arraybuffer"; xhr.send(); checkData(xhr, gData2, false, runTests); @@ -131,7 +136,7 @@ self.onmessage = function onmessage(event) { xhr.onload = function() { checkData(xhr, gData1, true, runTests); }; - xhr.open("GET", gJar1, true); + xhr.open("GET", makeJarURL(gEntry1), true); xhr.responseType = "arraybuffer"; xhr.send(); } @@ -141,7 +146,7 @@ self.onmessage = function onmessage(event) { xhr.onload = function() { checkData(xhr, gData2, false, runTests); }; - xhr.open("GET", gJar2, true); + xhr.open("GET", makeJarURL(gEntry2), true); xhr.responseType = "arraybuffer"; xhr.send(); } diff --git a/dom/base/test/file_bug945152_worker.js b/dom/base/test/file_bug945152_worker.js index 9cf7f3d4ee..bc0d79ba56 100644 --- a/dom/base/test/file_bug945152_worker.js +++ b/dom/base/test/file_bug945152_worker.js @@ -26,10 +26,15 @@ function checkData(response, data_head, cb) { } self.onmessage = function onmessage(event) { + var jar = event.data; + + function makeJarURL(entry) { + return "jar:" + jar + "!/" + entry; + } function test_mapped_sync() { var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true}); - xhr.open('GET', 'jar:http://example.org/tests/dom/base/test/file_bug945152.jar!/data_1.txt', false); + xhr.open('GET', makeJarURL('data_1.txt'), false); xhr.responseType = 'arraybuffer'; xhr.send(); if (xhr.status) { @@ -42,7 +47,7 @@ self.onmessage = function onmessage(event) { function test_mapped_async() { var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true}); - xhr.open('GET', 'jar:http://example.org/tests/dom/base/test/file_bug945152.jar!/data_1.txt'); + xhr.open('GET', makeJarURL('data_1.txt')); xhr.responseType = 'arraybuffer'; xhr.onreadystatechange = function() { if (xhr.readyState !== xhr.DONE) { @@ -62,7 +67,7 @@ self.onmessage = function onmessage(event) { // handled by memory allocation instead of memory mapping. function test_non_mapped() { var xhr = new XMLHttpRequest({mozAnon: true, mozSystem: true}); - xhr.open('GET', 'jar:http://example.org/tests/dom/base/test/file_bug945152.jar!/data_2.txt'); + xhr.open('GET', makeJarURL('data_2.txt')); xhr.responseType = 'arraybuffer'; xhr.onreadystatechange = function() { if (xhr.readyState !== xhr.DONE) { diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini index 1eb67803de..e53f1af9bb 100644 --- a/dom/base/test/mochitest.ini +++ b/dom/base/test/mochitest.ini @@ -159,8 +159,6 @@ support-files = file_bug902350_frame.html file_bug907892.html file_bug945152.jar - file_bug945152_worker.js - file_bug1008126_worker.js file_general_document.html file_html_in_xhr.html file_html_in_xhr.sjs @@ -653,11 +651,7 @@ skip-if = buildapp == 'mulet' || buildapp == 'b2g' || toolkit == 'android' || e1 [test_bug907892.html] [test_bug922681.html] [test_bug927196.html] -[test_bug945152.html] -run-if = os == 'linux' [test_bug982153.html] -[test_bug1008126.html] -run-if = os == 'linux' [test_bug1057176.html] [test_bug1070015.html] [test_bug1101364.html] diff --git a/dom/base/test/test_bug1008126.html b/dom/base/test/test_bug1008126.html index fc58d6d841..cd196de09c 100644 --- a/dom/base/test/test_bug1008126.html +++ b/dom/base/test/test_bug1008126.html @@ -10,8 +10,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1008126 Test for Bug 1008126 - - + + Mozilla Bug 1008126 @@ -20,10 +20,16 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1008126
-
-  
+  
+  
 
 
 Mozilla Bug 945152
@@ -16,7 +16,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=945152
 
 
 
-
+
+    
+      .mbox {
+        display: inline-block;
+        width: 33%;
+        height: 50px;
+        background: green;
+        vertical-align: middle;
+      }
+      .orange {
+        background: orange;
+      }
+      .change > .mbox {
+        width: 60px;
+      }
+    
+
+  
+    
+      
+      
+      
+      
+
+          
+
+      
+    
+  
+
+
diff --git a/layout/xul/tree/TreeBoxObject.h b/layout/xul/tree/TreeBoxObject.h
index fd80ab1bc6..d997b5a63d 100644
--- a/layout/xul/tree/TreeBoxObject.h
+++ b/layout/xul/tree/TreeBoxObject.h
@@ -21,7 +21,7 @@ struct TreeCellInfo;
 class DOMRect;
 
 class TreeBoxObject final : public BoxObject,
-                                public nsITreeBoxObject
+                            public nsITreeBoxObject
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
diff --git a/layout/xul/tree/nsTreeColumns.h b/layout/xul/tree/nsTreeColumns.h
index f7e393d46a..ae4afee2d7 100644
--- a/layout/xul/tree/nsTreeColumns.h
+++ b/layout/xul/tree/nsTreeColumns.h
@@ -40,7 +40,7 @@ class TreeBoxObject;
 // This class is our column info.  We use it to iterate our columns and to obtain
 // information about each column.
 class nsTreeColumn final : public nsITreeColumn
-                             , public nsWrapperCache
+                         , public nsWrapperCache
 {
 public:
   nsTreeColumn(nsTreeColumns* aColumns, nsIContent* aContent);
@@ -151,7 +151,7 @@ private:
 NS_DEFINE_STATIC_IID_ACCESSOR(nsTreeColumn, NS_TREECOLUMN_IMPL_CID)
 
 class nsTreeColumns final : public nsITreeColumns
-                              , public nsWrapperCache
+                          , public nsWrapperCache
 {
 private:
   ~nsTreeColumns();
diff --git a/layout/xul/tree/nsTreeContentView.h b/layout/xul/tree/nsTreeContentView.h
index c6bbbdf468..d0898c9f2e 100644
--- a/layout/xul/tree/nsTreeContentView.h
+++ b/layout/xul/tree/nsTreeContentView.h
@@ -23,8 +23,8 @@ class Row;
 nsresult NS_NewTreeContentView(nsITreeView** aResult);
 
 class nsTreeContentView final : public nsINativeTreeView,
-                                    public nsITreeContentView,
-                                    public nsStubDocumentObserver
+                                public nsITreeContentView,
+                                public nsStubDocumentObserver
 {
   public:
     nsTreeContentView(void);
diff --git a/media/gmp-clearkey/0.1/ClearKeySessionManager.h b/media/gmp-clearkey/0.1/ClearKeySessionManager.h
index 3e734a6c1b..7c11db694b 100644
--- a/media/gmp-clearkey/0.1/ClearKeySessionManager.h
+++ b/media/gmp-clearkey/0.1/ClearKeySessionManager.h
@@ -19,7 +19,7 @@
 #include "RefCounted.h"
 
 class ClearKeySessionManager final : public GMPDecryptor
-                                       , public RefCounted
+                                   , public RefCounted
 {
 public:
   ClearKeySessionManager();
diff --git a/media/mtransport/transportflow.h b/media/mtransport/transportflow.h
index 0d51d3e028..d0fe484456 100644
--- a/media/mtransport/transportflow.h
+++ b/media/mtransport/transportflow.h
@@ -50,7 +50,7 @@
 namespace mozilla {
 
 class TransportFlow final : public nsISupports,
-                                public sigslot::has_slots<> {
+                            public sigslot::has_slots<> {
  public:
   TransportFlow()
     : id_("(anonymous)"),
diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
index cbb9839195..3cf6dd965d 100644
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.h
@@ -229,11 +229,11 @@ class RTCStatsQuery {
 
 class PeerConnectionImpl final : public nsISupports,
 #ifdef MOZILLA_INTERNAL_API
-                                     public mozilla::DataChannelConnection::DataConnectionListener,
-                                     public nsNSSShutDownObject,
-                                     public DOMMediaStream::PrincipalChangeObserver,
+                                 public mozilla::DataChannelConnection::DataConnectionListener,
+                                 public nsNSSShutDownObject,
+                                 public DOMMediaStream::PrincipalChangeObserver,
 #endif
-                                     public sigslot::has_slots<>
+                                 public sigslot::has_slots<>
 {
   struct Internal; // Avoid exposing c includes to bindings
 
diff --git a/mfbt/Attributes.h b/mfbt/Attributes.h
index ffb6b5fe54..89ed84142d 100644
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -319,9 +319,9 @@
 #ifdef __cplusplus
 
 /*
- * MOZ_OVERRIDE explicitly indicates that a virtual member function in a class
+ * override explicitly indicates that a virtual member function in a class
  * overrides a member function of a base class, rather than potentially being a
- * new member function.  MOZ_OVERRIDE should be placed immediately before the
+ * new member function.  override should be placed immediately before the
  * ';' terminating the member function's declaration, or before '= 0;' if the
  * member function is pure.  If the member function is defined in the class
  * definition, it should appear before the opening brace of the function body.
@@ -334,43 +334,43 @@
  *   class Derived1 : public Base
  *   {
  *   public:
- *     virtual void f() MOZ_OVERRIDE;
+ *     virtual void f() override;
  *   };
  *   class Derived2 : public Base
  *   {
  *   public:
- *     virtual void f() MOZ_OVERRIDE = 0;
+ *     virtual void f() override = 0;
  *   };
  *   class Derived3 : public Base
  *   {
  *   public:
- *     virtual void f() MOZ_OVERRIDE { }
+ *     virtual void f() override { }
  *   };
  *
- * In compilers supporting C++11 override controls, MOZ_OVERRIDE *requires* that
+ * In compilers supporting C++11 override controls, override *requires* that
  * the function marked with it override a member function of a base class: it
- * is a compile error if it does not.  Otherwise MOZ_OVERRIDE does not affect
+ * is a compile error if it does not.  Otherwise override does not affect
  * semantics and merely documents the override relationship to the reader (but
  * of course must still be used correctly to not break C++11 compilers).
  */
 #if defined(MOZ_HAVE_CXX11_OVERRIDE)
-#  define MOZ_OVERRIDE          override
+#  define override          override
 #else
-#  define MOZ_OVERRIDE          /* no support */
+#  define override          /* no support */
 #endif
 
 /*
- * MOZ_FINAL indicates that some functionality cannot be overridden through
+ * final indicates that some functionality cannot be overridden through
  * inheritance.  It can be used to annotate either classes/structs or virtual
  * member functions.
  *
- * To annotate a class/struct with MOZ_FINAL, place MOZ_FINAL immediately after
+ * To annotate a class/struct with final, place final immediately after
  * the name of the class, before the list of classes from which it derives (if
- * any) and before its opening brace.  MOZ_FINAL must not be used to annotate
+ * any) and before its opening brace.  final must not be used to annotate
  * unnamed classes or structs.  (With some compilers, and with C++11 proper, the
  * underlying expansion is ambiguous with specifying a class name.)
  *
- *   class Base MOZ_FINAL
+ *   class Base final
  *   {
  *   public:
  *     Base();
@@ -384,32 +384,32 @@
  *     ~Derived() { }
  *   };
  *
- * One particularly common reason to specify MOZ_FINAL upon a class is to tell
+ * One particularly common reason to specify final upon a class is to tell
  * the compiler that it's not dangerous for it to have a non-virtual destructor
  * yet have one or more virtual functions, silencing the warning it might emit
- * in this case.  Suppose Base above weren't annotated with MOZ_FINAL.  Because
+ * in this case.  Suppose Base above weren't annotated with final.  Because
  * ~Base() is non-virtual, an attempt to delete a Derived* through a Base*
  * wouldn't call ~Derived(), so any cleanup ~Derived() might do wouldn't happen.
  * (Formally C++ says behavior is undefined, but compilers will likely just call
- * ~Base() and not ~Derived().)  Specifying MOZ_FINAL tells the compiler that
+ * ~Base() and not ~Derived().)  Specifying final tells the compiler that
  * it's safe for the destructor to be non-virtual.
  *
  * In compilers implementing final controls, it is an error to inherit from a
- * class annotated with MOZ_FINAL.  In other compilers it serves only as
+ * class annotated with final.  In other compilers it serves only as
  * documentation.
  *
- * To annotate a virtual member function with MOZ_FINAL, place MOZ_FINAL
+ * To annotate a virtual member function with final, place final
  * immediately before the ';' terminating the member function's declaration, or
  * before '= 0;' if the member function is pure.  If the member function is
  * defined in the class definition, it should appear before the opening brace of
- * the function body.  (This placement is identical to that for MOZ_OVERRIDE.
- * If both are used, they should appear in the order 'MOZ_FINAL MOZ_OVERRIDE'
+ * the function body.  (This placement is identical to that for override.
+ * If both are used, they should appear in the order 'final override'
  * for consistency.)
  *
  *   class Base
  *   {
  *   public:
- *     virtual void f() MOZ_FINAL;
+ *     virtual void f() final;
  *   };
  *   class Derived
  *   {
@@ -419,13 +419,13 @@
  *   };
  *
  * In compilers implementing final controls, it is an error for a derived class
- * to override a method annotated with MOZ_FINAL.  In other compilers it serves
+ * to override a method annotated with final.  In other compilers it serves
  * only as documentation.
  */
 #if defined(MOZ_HAVE_CXX11_FINAL)
-#  define MOZ_FINAL             MOZ_HAVE_CXX11_FINAL
+#  define final             MOZ_HAVE_CXX11_FINAL
 #else
-#  define MOZ_FINAL             /* no support */
+#  define final             /* no support */
 #endif
 
 /**
diff --git a/mobile/android/components/build/nsAndroidHistory.h b/mobile/android/components/build/nsAndroidHistory.h
index 0d30afa73a..95cf21f51e 100644
--- a/mobile/android/components/build/nsAndroidHistory.h
+++ b/mobile/android/components/build/nsAndroidHistory.h
@@ -24,8 +24,8 @@
 #define EMBED_URI_SIZE 128
 
 class nsAndroidHistory final : public mozilla::IHistory,
-                                   public nsIRunnable,
-                                   public nsITimerCallback
+                               public nsIRunnable,
+                               public nsITimerCallback
 {
 public:
   NS_DECL_ISUPPORTS
diff --git a/modules/libjar/nsIJARChannel.idl b/modules/libjar/nsIJARChannel.idl
index b574bbf7e3..bd1977b32c 100644
--- a/modules/libjar/nsIJARChannel.idl
+++ b/modules/libjar/nsIJARChannel.idl
@@ -25,7 +25,7 @@ interface nsIJARChannel : nsIChannel
     void setAppURI(in nsIURI uri);
 
     /**
-     * Returns the JAR file.
+     * Returns the JAR file.  May be null if the jar is remote.
      */
     readonly attribute nsIFile jarFile;
 
diff --git a/modules/libjar/nsIZipReader.idl b/modules/libjar/nsIZipReader.idl
index b23ea310e1..e1c20e5788 100644
--- a/modules/libjar/nsIZipReader.idl
+++ b/modules/libjar/nsIZipReader.idl
@@ -63,7 +63,7 @@ interface nsIZipEntry : nsISupports
     readonly attribute unsigned long    permissions;
 };
 
-[scriptable, uuid(894c8dc0-37c8-11e4-916c-0800200c9a66)]
+[scriptable, uuid(9ba4ef54-e0a0-4f65-9d23-128482448885)]
 interface nsIZipReader : nsISupports
 {
     /**
@@ -78,9 +78,19 @@ interface nsIZipReader : nsISupports
      */
     void openInner(in nsIZipReader zipReader, in AUTF8String zipEntry);
 
+    /**
+     * Opens a zip file stored in memory; the file attribute will be null.
+     *
+     * The ZipReader does not copy or take ownership of this memory; the
+     * caller must ensure that it is valid and unmodified until the
+     * ZipReader is closed or destroyed, and must free the memory as
+     * appropriate afterwards.
+     */
+    void openMemory(in voidPtr aData, in unsigned long aLength);
+
     /**
      * The file that represents the zip with which this zip reader was
-     * initialized.
+     * initialized.  This will be null if there is no underlying file.
      */
     readonly attribute nsIFile file;
 
diff --git a/modules/libjar/nsJAR.cpp b/modules/libjar/nsJAR.cpp
index 73ae01566a..c3c66d353a 100644
--- a/modules/libjar/nsJAR.cpp
+++ b/modules/libjar/nsJAR.cpp
@@ -181,6 +181,23 @@ nsJAR::OpenInner(nsIZipReader *aZipReader, const nsACString &aZipEntry)
   return mZip->OpenArchive(handle);
 }
 
+NS_IMETHODIMP
+nsJAR::OpenMemory(void* aData, uint32_t aLength)
+{
+  NS_ENSURE_ARG_POINTER(aData);
+  if (mOpened) return NS_ERROR_FAILURE; // Already open!
+
+  mOpened = true;
+
+  nsRefPtr handle;
+  nsresult rv = nsZipHandle::Init(static_cast(aData), aLength,
+                                  getter_AddRefs(handle));
+  if (NS_FAILED(rv))
+    return rv;
+
+  return mZip->OpenArchive(handle);
+}
+
 NS_IMETHODIMP
 nsJAR::GetFile(nsIFile* *result)
 {
diff --git a/modules/libjar/nsJARChannel.cpp b/modules/libjar/nsJARChannel.cpp
index 33cdc0b57e..e363403706 100644
--- a/modules/libjar/nsJARChannel.cpp
+++ b/modules/libjar/nsJARChannel.cpp
@@ -234,7 +234,6 @@ NS_IMPL_ISUPPORTS_INHERITED(nsJARChannel,
                             nsIChannel,
                             nsIStreamListener,
                             nsIRequestObserver,
-                            nsIDownloadObserver,
                             nsIRemoteOpenFileListener,
                             nsIThreadRetargetableRequest,
                             nsIThreadRetargetableStreamListener,
@@ -274,16 +273,21 @@ nsresult
 nsJARChannel::CreateJarInput(nsIZipReaderCache *jarCache, nsJARInputThunk **resultInput)
 {
     MOZ_ASSERT(resultInput);
+    MOZ_ASSERT(mJarFile || mTempMem);
 
     // important to pass a clone of the file since the nsIFile impl is not
     // necessarily MT-safe
     nsCOMPtr clonedFile;
-    nsresult rv = mJarFile->Clone(getter_AddRefs(clonedFile));
-    if (NS_FAILED(rv))
-        return rv;
+    nsresult rv = NS_OK;
+    if (mJarFile) {
+        rv = mJarFile->Clone(getter_AddRefs(clonedFile));
+        if (NS_FAILED(rv))
+            return rv;
+    }
 
     nsCOMPtr reader;
     if (jarCache) {
+        MOZ_ASSERT(mJarFile);
         if (mInnerJarEntry.IsEmpty())
             rv = jarCache->GetZip(clonedFile, getter_AddRefs(reader));
         else
@@ -295,7 +299,12 @@ nsJARChannel::CreateJarInput(nsIZipReaderCache *jarCache, nsJARInputThunk **resu
         if (NS_FAILED(rv))
             return rv;
 
-        rv = outerReader->Open(clonedFile);
+        if (mJarFile) {
+            rv = outerReader->Open(clonedFile);
+        } else {
+            rv = outerReader->OpenMemory(mTempMem->Elements(),
+                                         mTempMem->Length());
+        }
         if (NS_FAILED(rv))
             return rv;
 
@@ -866,26 +875,24 @@ nsJARChannel::AsyncOpen(nsIStreamListener *listener, nsISupports *ctx)
     if (!mJarFile) {
         // Not a local file...
         // kick off an async download of the base URI...
-        rv = NS_NewDownloader(getter_AddRefs(mDownloader), this);
-        if (NS_SUCCEEDED(rv)) {
-            // Since we might not have a loadinfo on all channels yet
-            // we have to provide default arguments in case mLoadInfo is null;
-            uint32_t loadFlags =
-              mLoadFlags & ~(LOAD_DOCUMENT_URI | LOAD_CALL_CONTENT_SNIFFERS);
-            rv = NS_NewChannelInternal(getter_AddRefs(channel),
-                                       mJarBaseURI,
-                                       mLoadInfo,
-                                       mLoadGroup,
-                                       mCallbacks,
-                                       loadFlags);
-            if (NS_FAILED(rv)) {
-              mIsPending = false;
-              mListenerContext = nullptr;
-              mListener = nullptr;
-              return rv;
-            }
-            channel->AsyncOpen(mDownloader, nullptr);
+        nsCOMPtr downloader = new MemoryDownloader(this);
+        // Since we might not have a loadinfo on all channels yet
+        // we have to provide default arguments in case mLoadInfo is null;
+        uint32_t loadFlags =
+            mLoadFlags & ~(LOAD_DOCUMENT_URI | LOAD_CALL_CONTENT_SNIFFERS);
+        rv = NS_NewChannelInternal(getter_AddRefs(channel),
+                                   mJarBaseURI,
+                                   mLoadInfo,
+                                   mLoadGroup,
+                                   mCallbacks,
+                                   loadFlags);
+        if (NS_FAILED(rv)) {
+            mIsPending = false;
+            mListenerContext = nullptr;
+            mListener = nullptr;
+            return rv;
         }
+        rv = channel->AsyncOpen(downloader, nullptr);
     } else if (mOpeningRemote) {
         // nothing to do: already asked parent to open file.
     } else {
@@ -964,15 +971,15 @@ nsJARChannel::EnsureChildFd()
 }
 
 //-----------------------------------------------------------------------------
-// nsIDownloadObserver
+// mozilla::net::MemoryDownloader::IObserver
 //-----------------------------------------------------------------------------
 
-NS_IMETHODIMP
-nsJARChannel::OnDownloadComplete(nsIDownloader *downloader,
+void
+nsJARChannel::OnDownloadComplete(MemoryDownloader* aDownloader,
                                  nsIRequest    *request,
                                  nsISupports   *context,
                                  nsresult       status,
-                                 nsIFile       *file)
+                                 MemoryDownloader::Data aData)
 {
     nsresult rv;
 
@@ -1050,7 +1057,7 @@ nsJARChannel::OnDownloadComplete(nsIDownloader *downloader,
     }
 
     if (NS_SUCCEEDED(status)) {
-        mJarFile = file;
+        mTempMem = Move(aData);
 
         nsRefPtr input;
         rv = CreateJarInput(nullptr, getter_AddRefs(input));
@@ -1066,8 +1073,6 @@ nsJARChannel::OnDownloadComplete(nsIDownloader *downloader,
     if (NS_FAILED(status)) {
         NotifyError(status);
     }
-
-    return NS_OK;
 }
 
 //-----------------------------------------------------------------------------
@@ -1152,7 +1157,6 @@ nsJARChannel::OnStopRequest(nsIRequest *req, nsISupports *ctx, nsresult status)
 
     mPump = 0;
     mIsPending = false;
-    mDownloader = 0; // this may delete the underlying jar file
 
     // Drop notification callbacks to prevent cycles.
     mCallbacks = 0;
diff --git a/modules/libjar/nsJARChannel.h b/modules/libjar/nsJARChannel.h
index a3b2d087b1..59e0777afd 100644
--- a/modules/libjar/nsJARChannel.h
+++ b/modules/libjar/nsJARChannel.h
@@ -6,6 +6,7 @@
 #ifndef nsJARChannel_h__
 #define nsJARChannel_h__
 
+#include "mozilla/net/MemoryDownloader.h"
 #include "nsIJARChannel.h"
 #include "nsIJARURI.h"
 #include "nsIInputStreamPump.h"
@@ -14,7 +15,6 @@
 #include "nsIStreamListener.h"
 #include "nsIRemoteOpenFileListener.h"
 #include "nsIZipReader.h"
-#include "nsIDownloader.h"
 #include "nsILoadGroup.h"
 #include "nsILoadInfo.h"
 #include "nsIThreadRetargetableRequest.h"
@@ -31,19 +31,18 @@ class nsJARInputThunk;
 //-----------------------------------------------------------------------------
 
 class nsJARChannel final : public nsIJARChannel
-                             , public nsIDownloadObserver
-                             , public nsIStreamListener
-                             , public nsIRemoteOpenFileListener
-                             , public nsIThreadRetargetableRequest
-                             , public           nsIThreadRetargetableStreamListener
-                             , public nsHashPropertyBag
+                         , public mozilla::net::MemoryDownloader::IObserver
+                         , public nsIStreamListener
+                         , public nsIRemoteOpenFileListener
+                         , public nsIThreadRetargetableRequest
+                         , public nsIThreadRetargetableStreamListener
+                         , public nsHashPropertyBag
 {
 public:
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSIREQUEST
     NS_DECL_NSICHANNEL
     NS_DECL_NSIJARCHANNEL
-    NS_DECL_NSIDOWNLOADOBSERVER
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIREMOTEOPENFILELISTENER
@@ -63,6 +62,12 @@ private:
     void NotifyError(nsresult aError);
     void FireOnProgress(uint64_t aProgress);
     nsresult SetRemoteNSPRFileDesc(PRFileDesc *fd);
+    virtual void OnDownloadComplete(mozilla::net::MemoryDownloader* aDownloader,
+                                    nsIRequest* aRequest,
+                                    nsISupports* aCtxt,
+                                    nsresult aStatus,
+                                    mozilla::net::MemoryDownloader::Data aData)
+        override;
 
 #if defined(PR_LOGGING)
     nsCString                       mSpec;
@@ -95,7 +100,7 @@ private:
     bool                            mOpeningRemote;
     bool                            mEnsureChildFd;
 
-    nsCOMPtr     mDownloader;
+    mozilla::net::MemoryDownloader::Data mTempMem;
     nsCOMPtr    mPump;
     // mRequest is only non-null during OnStartRequest, so we'll have a pointer
     // to the request if we get called back via RetargetDeliveryTo.
diff --git a/modules/libjar/nsJARProtocolHandler.h b/modules/libjar/nsJARProtocolHandler.h
index 64310f4eab..09e3385932 100644
--- a/modules/libjar/nsJARProtocolHandler.h
+++ b/modules/libjar/nsJARProtocolHandler.h
@@ -21,7 +21,7 @@ class nsIHashable;
 class nsIRemoteOpenFileListener;
 
 class nsJARProtocolHandler final : public nsIJARProtocolHandler
-                                     , public nsSupportsWeakReference
+                                 , public nsSupportsWeakReference
 {
     typedef nsAutoTArray, 5>
             RemoteFileListenerArray;
diff --git a/modules/libjar/nsJARURI.h b/modules/libjar/nsJARURI.h
index 680f215fbe..b264746788 100644
--- a/modules/libjar/nsJARURI.h
+++ b/modules/libjar/nsJARURI.h
@@ -33,10 +33,10 @@
 
 
 class nsJARURI final : public nsIJARURI,
-                           public nsISerializable,
-                           public nsIClassInfo,
-                           public nsINestedURI,
-                           public nsIIPCSerializableURI
+                       public nsISerializable,
+                       public nsIClassInfo,
+                       public nsINestedURI,
+                       public nsIIPCSerializableURI
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
diff --git a/modules/libjar/nsZipArchive.cpp b/modules/libjar/nsZipArchive.cpp
index eaf22acf6b..b3d22efc4e 100644
--- a/modules/libjar/nsZipArchive.cpp
+++ b/modules/libjar/nsZipArchive.cpp
@@ -244,6 +244,17 @@ nsresult nsZipHandle::Init(nsZipArchive *zip, const char *entry,
   return NS_OK;
 }
 
+nsresult nsZipHandle::Init(const uint8_t* aData, uint32_t aLen,
+                           nsZipHandle **aRet)
+{
+  nsRefPtr handle = new nsZipHandle();
+
+  handle->mFileData = aData;
+  handle->mLen = aLen;
+  handle.forget(aRet);
+  return NS_OK;
+}
+
 int64_t nsZipHandle::SizeOfMapping()
 {
     return mLen;
diff --git a/modules/libjar/nsZipArchive.h b/modules/libjar/nsZipArchive.h
index 9540f9a87a..aafde980a9 100644
--- a/modules/libjar/nsZipArchive.h
+++ b/modules/libjar/nsZipArchive.h
@@ -385,6 +385,8 @@ public:
                        PRFileDesc **aFd = nullptr);
   static nsresult Init(nsZipArchive *zip, const char *entry,
                        nsZipHandle **ret);
+  static nsresult Init(const uint8_t* aData, uint32_t aLen,
+                       nsZipHandle **aRet);
 
   NS_METHOD_(MozExternalRefCountType) AddRef(void);
   NS_METHOD_(MozExternalRefCountType) Release(void);
diff --git a/modules/libjar/test/mochitest/mochitest.ini b/modules/libjar/test/mochitest/mochitest.ini
index 4bfdcea924..9ed0efee73 100644
--- a/modules/libjar/test/mochitest/mochitest.ini
+++ b/modules/libjar/test/mochitest/mochitest.ini
@@ -6,3 +6,5 @@ support-files =
   openredirect.sjs
 
 [test_bug403331.html]
+[test_bug1034143_mapped.html]
+run-if = os == 'linux'
diff --git a/modules/libjar/test/mochitest/test_bug1034143_mapped.html b/modules/libjar/test/mochitest/test_bug1034143_mapped.html
new file mode 100644
index 0000000000..d65179b3b4
--- /dev/null
+++ b/modules/libjar/test/mochitest/test_bug1034143_mapped.html
@@ -0,0 +1,52 @@
+
+
+
+
+  
+  Test for Bug 945152
+  
+  
+
+
+Mozilla Bug 1034143
+

+ +
+
+
+ + diff --git a/modules/libjar/zipwriter/nsZipWriter.h b/modules/libjar/zipwriter/nsZipWriter.h index 80d940d9b7..f7fa1b1633 100644 --- a/modules/libjar/zipwriter/nsZipWriter.h +++ b/modules/libjar/zipwriter/nsZipWriter.h @@ -37,7 +37,7 @@ public: }; class nsZipWriter final : public nsIZipWriter, - public nsIRequestObserver + public nsIRequestObserver { public: NS_DECL_ISUPPORTS diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp index f1a799627b..11acbf78d6 100644 --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp @@ -126,7 +126,7 @@ public: }; class ValueObserver final : public nsIObserver, - public ValueObserverHashKey + public ValueObserverHashKey { ~ValueObserver() { Preferences::RemoveObserver(this, mPrefName.get()); diff --git a/modules/libpref/Preferences.h b/modules/libpref/Preferences.h index 7e766a78d1..4a8f03e369 100644 --- a/modules/libpref/Preferences.h +++ b/modules/libpref/Preferences.h @@ -37,9 +37,9 @@ class PrefSetting; } class Preferences final : public nsIPrefService, - public nsIObserver, - public nsIPrefBranchInternal, - public nsSupportsWeakReference + public nsIObserver, + public nsIPrefBranchInternal, + public nsSupportsWeakReference { public: typedef mozilla::dom::PrefSetting PrefSetting; diff --git a/netwerk/base/MemoryDownloader.cpp b/netwerk/base/MemoryDownloader.cpp new file mode 100644 index 0000000000..3e659660aa --- /dev/null +++ b/netwerk/base/MemoryDownloader.cpp @@ -0,0 +1,91 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "MemoryDownloader.h" + +#include "mozilla/Assertions.h" + +namespace mozilla { +namespace net { + +NS_IMPL_ISUPPORTS(MemoryDownloader, + nsIStreamListener, + nsIRequestObserver) + +MemoryDownloader::MemoryDownloader(IObserver* aObserver) +: mObserver(aObserver) +{ +} + +MemoryDownloader::~MemoryDownloader() +{ +} + +NS_IMETHODIMP +MemoryDownloader::OnStartRequest(nsIRequest* aRequest, nsISupports* aCtxt) +{ + MOZ_ASSERT(!mData); + mData.reset(new FallibleTArray()); + mStatus = NS_OK; + return NS_OK; +} + +NS_IMETHODIMP +MemoryDownloader::OnStopRequest(nsIRequest* aRequest, + nsISupports* aCtxt, + nsresult aStatus) +{ + MOZ_ASSERT_IF(NS_FAILED(mStatus), NS_FAILED(aStatus)); + MOZ_ASSERT(!mData == NS_FAILED(mStatus)); + Data data; + data.swap(mData); + nsRefPtr observer; + observer.swap(mObserver); + observer->OnDownloadComplete(this, aRequest, aCtxt, aStatus, + mozilla::Move(data)); + return NS_OK; +} + +NS_METHOD +MemoryDownloader::ConsumeData(nsIInputStream* aIn, + void* aClosure, + const char* aFromRawSegment, + uint32_t aToOffset, + uint32_t aCount, + uint32_t* aWriteCount) +{ + MemoryDownloader* self = static_cast(aClosure); + if (!self->mData->AppendElements(aFromRawSegment, aCount)) { + // The error returned by ConsumeData isn't propagated to the + // return of ReadSegments, so it has to be passed as state. + self->mStatus = NS_ERROR_OUT_OF_MEMORY; + return NS_ERROR_OUT_OF_MEMORY; + } + *aWriteCount = aCount; + return NS_OK; +} + +NS_IMETHODIMP +MemoryDownloader::OnDataAvailable(nsIRequest* aRequest, + nsISupports* aCtxt, + nsIInputStream* aInStr, + uint64_t aSourceOffset, + uint32_t aCount) +{ + uint32_t n; + MOZ_ASSERT(mData); + nsresult rv = aInStr->ReadSegments(ConsumeData, this, aCount, &n); + if (NS_SUCCEEDED(mStatus) && NS_FAILED(rv)) { + mStatus = rv; + } + if (NS_WARN_IF(NS_FAILED(mStatus))) { + mData.reset(nullptr); + return mStatus; + } + return NS_OK; +} + +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/MemoryDownloader.h b/netwerk/base/MemoryDownloader.h new file mode 100644 index 0000000000..56e265485f --- /dev/null +++ b/netwerk/base/MemoryDownloader.h @@ -0,0 +1,65 @@ +/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef mozilla_net_MemoryDownloader_h__ +#define mozilla_net_MemoryDownloader_h__ + +#include "mozilla/UniquePtr.h" +#include "nsCOMPtr.h" +#include "nsIStreamListener.h" +#include "nsTArray.h" + +/** + * mozilla::net::MemoryDownloader + * + * This class is similar to nsIDownloader, but stores the downloaded + * stream in memory instead of a file. Ownership of the temporary + * memory is transferred to the observer when download is complete; + * there is no need to retain a reference to the downloader. + */ + +namespace mozilla { +namespace net { + +class MemoryDownloader final : public nsIStreamListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIREQUESTOBSERVER + NS_DECL_NSISTREAMLISTENER + + typedef mozilla::UniquePtr> Data; + + class IObserver : public nsISupports { + public: + // Note: aData may be null if (and only if) aStatus indicates failure. + virtual void OnDownloadComplete(MemoryDownloader* aDownloader, + nsIRequest* aRequest, + nsISupports* aCtxt, + nsresult aStatus, + Data aData) = 0; + }; + + explicit MemoryDownloader(IObserver* aObserver); + +private: + virtual ~MemoryDownloader(); + + static NS_METHOD ConsumeData(nsIInputStream *in, + void *closure, + const char *fromRawSegment, + uint32_t toOffset, + uint32_t count, + uint32_t *writeCount); + + nsRefPtr mObserver; + Data mData; + nsresult mStatus; +}; + +} // namespace net +} // namespace mozilla + +#endif // mozilla_net_MemoryDownloader_h__ diff --git a/netwerk/base/ProxyAutoConfig.cpp b/netwerk/base/ProxyAutoConfig.cpp index 094d849f79..8d907b56e3 100644 --- a/netwerk/base/ProxyAutoConfig.cpp +++ b/netwerk/base/ProxyAutoConfig.cpp @@ -259,7 +259,7 @@ static void SetRunning(ProxyAutoConfig *arg) // The PACResolver is used for dnsResolve() class PACResolver final : public nsIDNSListener - , public nsITimerCallback + , public nsITimerCallback { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/base/moz.build b/netwerk/base/moz.build index 54aecf7c95..65ebbb4891 100644 --- a/netwerk/base/moz.build +++ b/netwerk/base/moz.build @@ -164,6 +164,7 @@ EXPORTS.mozilla.net += [ 'ChannelDiverterParent.h', 'Dashboard.h', 'DashboardTypes.h', + 'MemoryDownloader.h', 'OfflineObserver.h', 'ReferrerPolicy.h', ] @@ -182,6 +183,7 @@ UNIFIED_SOURCES += [ 'EventTokenBucket.cpp', 'LoadContextInfo.cpp', 'LoadInfo.cpp', + 'MemoryDownloader.cpp', 'NetworkActivityMonitor.cpp', 'nsAsyncRedirectVerifyHelper.cpp', 'nsAsyncStreamCopier.cpp', diff --git a/netwerk/base/nsAsyncRedirectVerifyHelper.h b/netwerk/base/nsAsyncRedirectVerifyHelper.h index fd4680b04d..635acdbfac 100644 --- a/netwerk/base/nsAsyncRedirectVerifyHelper.h +++ b/netwerk/base/nsAsyncRedirectVerifyHelper.h @@ -24,7 +24,7 @@ class nsIChannel; * redirect decision is returned through the callback. */ class nsAsyncRedirectVerifyHelper final : public nsIRunnable, - public nsIAsyncVerifyRedirectCallback + public nsIAsyncVerifyRedirectCallback { NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIRUNNABLE diff --git a/netwerk/base/nsAsyncStreamCopier.h b/netwerk/base/nsAsyncStreamCopier.h index 8709c83dfc..7529a327aa 100644 --- a/netwerk/base/nsAsyncStreamCopier.h +++ b/netwerk/base/nsAsyncStreamCopier.h @@ -16,7 +16,7 @@ class nsIRequestObserver; //----------------------------------------------------------------------------- class nsAsyncStreamCopier final : public nsIAsyncStreamCopier, - nsIAsyncStreamCopier2 + nsIAsyncStreamCopier2 { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/base/nsIOService.h b/netwerk/base/nsIOService.h index 493621ad8c..3604490942 100644 --- a/netwerk/base/nsIOService.h +++ b/netwerk/base/nsIOService.h @@ -46,11 +46,11 @@ namespace net { } // namespace mozilla class nsIOService final : public nsIIOService2 - , public nsIObserver - , public nsINetUtil - , public nsINetUtil_ESR_38 - , public nsISpeculativeConnect - , public nsSupportsWeakReference + , public nsIObserver + , public nsINetUtil + , public nsINetUtil_ESR_38 + , public nsISpeculativeConnect + , public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/base/nsInputStreamPump.h b/netwerk/base/nsInputStreamPump.h index 483cb192a4..c9b7bd64cc 100644 --- a/netwerk/base/nsInputStreamPump.h +++ b/netwerk/base/nsInputStreamPump.h @@ -18,8 +18,8 @@ class nsILoadGroup; class nsIStreamListener; class nsInputStreamPump final : public nsIInputStreamPump - , public nsIInputStreamCallback - , public nsIThreadRetargetableRequest + , public nsIInputStreamCallback + , public nsIThreadRetargetableRequest { ~nsInputStreamPump(); diff --git a/netwerk/base/nsPACMan.h b/netwerk/base/nsPACMan.h index 578ae911c3..953dd10584 100644 --- a/netwerk/base/nsPACMan.h +++ b/netwerk/base/nsPACMan.h @@ -51,7 +51,7 @@ public: }; class PendingPACQuery final : public nsRunnable, - public mozilla::LinkedListElement + public mozilla::LinkedListElement { public: PendingPACQuery(nsPACMan *pacMan, nsIURI *uri, @@ -80,8 +80,8 @@ private: */ class nsPACMan final : public nsIStreamLoaderObserver - , public nsIInterfaceRequestor - , public nsIChannelEventSink + , public nsIInterfaceRequestor + , public nsIChannelEventSink { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/base/nsProtocolProxyService.cpp b/netwerk/base/nsProtocolProxyService.cpp index 2a3933d967..80988c4b72 100644 --- a/netwerk/base/nsProtocolProxyService.cpp +++ b/netwerk/base/nsProtocolProxyService.cpp @@ -97,8 +97,8 @@ GetProxyURI(nsIChannel *channel, nsIURI **aOut) // on the main thread - so call nsPACMan::AsyncGetProxyForURI() with // a true mainThreadResponse parameter. class nsAsyncResolveRequest final : public nsIRunnable - , public nsPACManCallback - , public nsICancelable + , public nsPACManCallback + , public nsICancelable { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/base/nsProtocolProxyService.h b/netwerk/base/nsProtocolProxyService.h index 98f338be23..5628e861f6 100644 --- a/netwerk/base/nsProtocolProxyService.h +++ b/netwerk/base/nsProtocolProxyService.h @@ -34,7 +34,7 @@ class nsPACMan; { 0xad, 0x62, 0x0c, 0x87, 0x35, 0x1e, 0x64, 0x0d } } class nsProtocolProxyService final : public nsIProtocolProxyService2 - , public nsIObserver + , public nsIObserver { public: NS_DECL_ISUPPORTS diff --git a/netwerk/base/nsSocketTransport2.h b/netwerk/base/nsSocketTransport2.h index 9afb856eab..df12d5ccf0 100644 --- a/netwerk/base/nsSocketTransport2.h +++ b/netwerk/base/nsSocketTransport2.h @@ -106,10 +106,10 @@ private: //----------------------------------------------------------------------------- class nsSocketTransport final : public nsASocketHandler - , public nsISocketTransport - , public nsIDNSListener - , public nsIClassInfo - , public nsIInterfaceRequestor + , public nsISocketTransport + , public nsIDNSListener + , public nsIClassInfo + , public nsIInterfaceRequestor { typedef mozilla::Mutex Mutex; diff --git a/netwerk/base/nsSocketTransportService2.h b/netwerk/base/nsSocketTransportService2.h index 2d3df02544..6536bc9fe9 100644 --- a/netwerk/base/nsSocketTransportService2.h +++ b/netwerk/base/nsSocketTransportService2.h @@ -58,10 +58,10 @@ static const int32_t kDefaultTCPKeepCount = //----------------------------------------------------------------------------- class nsSocketTransportService final : public nsPISocketTransportService - , public nsIEventTarget - , public nsIThreadObserver - , public nsIRunnable - , public nsIObserver + , public nsIEventTarget + , public nsIThreadObserver + , public nsIRunnable + , public nsIObserver { typedef mozilla::Mutex Mutex; diff --git a/netwerk/base/nsStreamListenerWrapper.h b/netwerk/base/nsStreamListenerWrapper.h index ffb80ab4f7..c9cc7be73d 100644 --- a/netwerk/base/nsStreamListenerWrapper.h +++ b/netwerk/base/nsStreamListenerWrapper.h @@ -14,7 +14,7 @@ // Wrapper class to make replacement of nsHttpChannel's listener // from JavaScript possible. It is workaround for bug 433711 and 682305. class nsStreamListenerWrapper final : public nsIStreamListener - , public nsIThreadRetargetableStreamListener + , public nsIThreadRetargetableStreamListener { public: explicit nsStreamListenerWrapper(nsIStreamListener *listener) diff --git a/netwerk/base/nsStreamLoader.h b/netwerk/base/nsStreamLoader.h index 2a0c9f184a..391d9f5915 100644 --- a/netwerk/base/nsStreamLoader.h +++ b/netwerk/base/nsStreamLoader.h @@ -15,7 +15,7 @@ class nsIRequest; class nsStreamLoader final : public nsIStreamLoader - , public nsIThreadRetargetableStreamListener + , public nsIThreadRetargetableStreamListener { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/base/nsStreamTransportService.h b/netwerk/base/nsStreamTransportService.h index 280182eba1..f52877295e 100644 --- a/netwerk/base/nsStreamTransportService.h +++ b/netwerk/base/nsStreamTransportService.h @@ -13,8 +13,8 @@ class nsIThreadPool; class nsStreamTransportService final : public nsIStreamTransportService - , public nsIEventTarget - , public nsIObserver + , public nsIEventTarget + , public nsIObserver { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/base/nsSyncStreamListener.h b/netwerk/base/nsSyncStreamListener.h index 20e756a062..9fa9c58c3e 100644 --- a/netwerk/base/nsSyncStreamListener.h +++ b/netwerk/base/nsSyncStreamListener.h @@ -14,7 +14,7 @@ //----------------------------------------------------------------------------- class nsSyncStreamListener final : public nsISyncStreamListener - , public nsIInputStream + , public nsIInputStream { public: NS_DECL_ISUPPORTS diff --git a/netwerk/base/nsUDPSocket.h b/netwerk/base/nsUDPSocket.h index 118c6d49e7..51db15d60d 100644 --- a/netwerk/base/nsUDPSocket.h +++ b/netwerk/base/nsUDPSocket.h @@ -15,7 +15,7 @@ //----------------------------------------------------------------------------- class nsUDPSocket final : public nsASocketHandler - , public nsIUDPSocket + , public nsIUDPSocket { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/cache/nsCacheService.h b/netwerk/cache/nsCacheService.h index b9ec2a1e31..89ed1bc124 100644 --- a/netwerk/cache/nsCacheService.h +++ b/netwerk/cache/nsCacheService.h @@ -63,7 +63,7 @@ private: ******************************************************************************/ class nsCacheService final : public nsICacheServiceInternal, - public nsIMemoryReporter + public nsIMemoryReporter { virtual ~nsCacheService(); diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.h b/netwerk/cache/nsDiskCacheDeviceSQL.h index 27f9f39499..3cdc0dd8c3 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.h +++ b/netwerk/cache/nsDiskCacheDeviceSQL.h @@ -63,7 +63,7 @@ private: }; class nsOfflineCacheDevice final : public nsCacheDevice - , public nsISupports + , public nsISupports { public: nsOfflineCacheDevice(); diff --git a/netwerk/cache2/CacheEntry.h b/netwerk/cache2/CacheEntry.h index 45bcf45d3a..ce8d00384a 100644 --- a/netwerk/cache2/CacheEntry.h +++ b/netwerk/cache2/CacheEntry.h @@ -48,8 +48,8 @@ class CacheOutputCloseListener; class CacheEntryHandle; class CacheEntry final : public nsICacheEntry - , public nsIRunnable - , public CacheFileListener + , public nsIRunnable + , public CacheFileListener { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/cache2/CacheStorageService.h b/netwerk/cache2/CacheStorageService.h index 57f3ba5c9b..570e8f4d22 100644 --- a/netwerk/cache2/CacheStorageService.h +++ b/netwerk/cache2/CacheStorageService.h @@ -65,8 +65,8 @@ protected: }; class CacheStorageService final : public nsICacheStorageService - , public nsIMemoryReporter - , public nsITimerCallback + , public nsIMemoryReporter + , public nsITimerCallback { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/cookie/nsCookieService.h b/netwerk/cookie/nsCookieService.h index ee65ae4f76..1e486e912e 100644 --- a/netwerk/cookie/nsCookieService.h +++ b/netwerk/cookie/nsCookieService.h @@ -239,10 +239,10 @@ enum OpenDBResult ******************************************************************************/ class nsCookieService final : public nsICookieService - , public nsICookieManager2 - , public nsIObserver - , public nsSupportsWeakReference - , public nsIMemoryReporter + , public nsICookieManager2 + , public nsIObserver + , public nsSupportsWeakReference + , public nsIMemoryReporter { private: size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; diff --git a/netwerk/dns/nsDNSService2.cpp b/netwerk/dns/nsDNSService2.cpp index bbe5f5bc3b..393bb388b3 100644 --- a/netwerk/dns/nsDNSService2.cpp +++ b/netwerk/dns/nsDNSService2.cpp @@ -293,7 +293,7 @@ nsDNSRecord::ReportUnusable(uint16_t aPort) //----------------------------------------------------------------------------- class nsDNSAsyncRequest final : public nsResolveHostCallback - , public nsICancelable + , public nsICancelable { ~nsDNSAsyncRequest() {} diff --git a/netwerk/dns/nsDNSService2.h b/netwerk/dns/nsDNSService2.h index 9389e34e79..b5c4f5d8c9 100644 --- a/netwerk/dns/nsDNSService2.h +++ b/netwerk/dns/nsDNSService2.h @@ -22,8 +22,8 @@ #include "mozilla/Attributes.h" class nsDNSService final : public nsPIDNSService - , public nsIObserver - , public nsIMemoryReporter + , public nsIObserver + , public nsIMemoryReporter { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/protocol/ftp/FTPChannelParent.h b/netwerk/protocol/ftp/FTPChannelParent.h index 00eb5919b2..8188a26d69 100644 --- a/netwerk/protocol/ftp/FTPChannelParent.h +++ b/netwerk/protocol/ftp/FTPChannelParent.h @@ -22,11 +22,11 @@ namespace mozilla { namespace net { class FTPChannelParent final : public PFTPChannelParent - , public nsIParentChannel - , public nsIInterfaceRequestor - , public ADivertableParentChannel - , public nsIChannelEventSink - , public DisconnectableParent + , public nsIParentChannel + , public nsIInterfaceRequestor + , public ADivertableParentChannel + , public nsIChannelEventSink + , public DisconnectableParent { public: NS_DECL_ISUPPORTS diff --git a/netwerk/protocol/ftp/nsFtpConnectionThread.h b/netwerk/protocol/ftp/nsFtpConnectionThread.h index 82a67af421..6378d11d38 100644 --- a/netwerk/protocol/ftp/nsFtpConnectionThread.h +++ b/netwerk/protocol/ftp/nsFtpConnectionThread.h @@ -73,11 +73,11 @@ class nsIStreamListener; // control connection and the data connection. class nsFtpState final : public nsBaseContentStream, - public nsIInputStreamCallback, - public nsITransportEventSink, - public nsIRequestObserver, - public nsFtpControlConnectionListener, - public nsIProtocolProxyCallback + public nsIInputStreamCallback, + public nsITransportEventSink, + public nsIRequestObserver, + public nsFtpControlConnectionListener, + public nsIProtocolProxyCallback { public: NS_DECL_ISUPPORTS_INHERITED diff --git a/netwerk/protocol/ftp/nsFtpProtocolHandler.h b/netwerk/protocol/ftp/nsFtpProtocolHandler.h index f112250aaa..7972e1538f 100644 --- a/netwerk/protocol/ftp/nsFtpProtocolHandler.h +++ b/netwerk/protocol/ftp/nsFtpProtocolHandler.h @@ -16,8 +16,8 @@ //----------------------------------------------------------------------------- class nsFtpProtocolHandler final : public nsIProxiedProtocolHandler - , public nsIObserver - , public nsSupportsWeakReference + , public nsIObserver + , public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/protocol/http/Http2Session.h b/netwerk/protocol/http/Http2Session.h index c213c26f06..991637f3b5 100644 --- a/netwerk/protocol/http/Http2Session.h +++ b/netwerk/protocol/http/Http2Session.h @@ -28,9 +28,9 @@ class Http2Stream; class nsHttpTransaction; class Http2Session final : public ASpdySession - , public nsAHttpConnection - , public nsAHttpSegmentReader - , public nsAHttpSegmentWriter + , public nsAHttpConnection + , public nsAHttpSegmentReader + , public nsAHttpSegmentWriter { ~Http2Session(); diff --git a/netwerk/protocol/http/HttpChannelChild.h b/netwerk/protocol/http/HttpChannelChild.h index 7306cede3d..7844f383bd 100644 --- a/netwerk/protocol/http/HttpChannelChild.h +++ b/netwerk/protocol/http/HttpChannelChild.h @@ -39,16 +39,16 @@ class InterceptedChannelContent; class InterceptStreamListener; class HttpChannelChild final : public PHttpChannelChild - , public HttpBaseChannel - , public HttpAsyncAborter - , public nsICacheInfoChannel - , public nsIProxiedChannel - , public nsIApplicationCacheChannel - , public nsIAsyncVerifyRedirectCallback - , public nsIAssociatedContentSecurity - , public nsIChildChannel - , public nsIHttpChannelChild - , public nsIDivertableChannel + , public HttpBaseChannel + , public HttpAsyncAborter + , public nsICacheInfoChannel + , public nsIProxiedChannel + , public nsIApplicationCacheChannel + , public nsIAsyncVerifyRedirectCallback + , public nsIAssociatedContentSecurity + , public nsIChildChannel + , public nsIHttpChannelChild + , public nsIDivertableChannel { virtual ~HttpChannelChild(); public: diff --git a/netwerk/protocol/http/SpdySession31.h b/netwerk/protocol/http/SpdySession31.h index ccf8043c75..3a517aa838 100644 --- a/netwerk/protocol/http/SpdySession31.h +++ b/netwerk/protocol/http/SpdySession31.h @@ -26,9 +26,9 @@ class SpdyStream31; class nsHttpTransaction; class SpdySession31 final : public ASpdySession - , public nsAHttpConnection - , public nsAHttpSegmentReader - , public nsAHttpSegmentWriter + , public nsAHttpConnection + , public nsAHttpSegmentReader + , public nsAHttpSegmentWriter { ~SpdySession31(); diff --git a/netwerk/protocol/http/SpdyStream31.h b/netwerk/protocol/http/SpdyStream31.h index b1fe1407bb..7541b85f30 100644 --- a/netwerk/protocol/http/SpdyStream31.h +++ b/netwerk/protocol/http/SpdyStream31.h @@ -12,7 +12,7 @@ namespace mozilla { namespace net { class SpdyStream31 : public nsAHttpSegmentReader - , public nsAHttpSegmentWriter + , public nsAHttpSegmentWriter { public: NS_DECL_NSAHTTPSEGMENTREADER diff --git a/netwerk/protocol/http/nsAHttpConnection.h b/netwerk/protocol/http/nsAHttpConnection.h index 849e8eefab..d858342c25 100644 --- a/netwerk/protocol/http/nsAHttpConnection.h +++ b/netwerk/protocol/http/nsAHttpConnection.h @@ -153,31 +153,30 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsAHttpConnection, NS_AHTTPCONNECTION_IID) nsresult TakeTransport(nsISocketTransport **, \ nsIAsyncInputStream **, \ nsIAsyncOutputStream **) override; \ - bool IsPersistent() override; \ - bool IsReused() override; \ - void DontReuse() override; \ - nsresult PushBack(const char *, uint32_t) override; \ - nsHttpConnection *TakeHttpConnection() override; \ - uint32_t CancelPipeline(nsresult originalReason) override; \ - nsAHttpTransaction::Classifier Classification() override; \ + bool IsPersistent() override; \ + bool IsReused() override; \ + void DontReuse() override; \ + nsresult PushBack(const char *, uint32_t) override; \ + nsHttpConnection *TakeHttpConnection() override; \ + uint32_t CancelPipeline(nsresult originalReason) override; \ + nsAHttpTransaction::Classifier Classification() override; \ /* \ Thes methods below have automatic definitions that just forward the \ function to a lower level connection object \ */ \ void GetConnectionInfo(nsHttpConnectionInfo **result) \ - override \ + override \ { \ if (!(fwdObject)) { \ - *result = nullptr; \ + *result = nullptr; \ return; \ } \ return (fwdObject)->GetConnectionInfo(result); \ } \ - void GetSecurityInfo(nsISupports **result) \ - override \ + void GetSecurityInfo(nsISupports **result) override \ { \ if (!(fwdObject)) { \ - *result = nullptr; \ + *result = nullptr; \ return; \ } \ return (fwdObject)->GetSecurityInfo(result); \ @@ -219,29 +218,29 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsAHttpConnection, NS_AHTTPCONNECTION_IID) (fwdObject)->Version() : \ NS_HTTP_VERSION_UNKNOWN; \ } \ - bool IsProxyConnectInProgress() override \ + bool IsProxyConnectInProgress() override \ { \ return (fwdObject)->IsProxyConnectInProgress(); \ } \ - bool LastTransactionExpectedNoContent() override \ + bool LastTransactionExpectedNoContent() override \ { \ return (fwdObject)->LastTransactionExpectedNoContent(); \ } \ void SetLastTransactionExpectedNoContent(bool val) \ - override \ + override \ { \ return (fwdObject)->SetLastTransactionExpectedNoContent(val); \ } \ void Classify(nsAHttpTransaction::Classifier newclass) \ - override \ + override \ { \ if (fwdObject) \ return (fwdObject)->Classify(newclass); \ } \ - int64_t BytesWritten() override \ + int64_t BytesWritten() override \ { return fwdObject ? (fwdObject)->BytesWritten() : 0; } \ void SetSecurityCallbacks(nsIInterfaceRequestor* aCallbacks) \ - override \ + override \ { \ if (fwdObject) \ (fwdObject)->SetSecurityCallbacks(aCallbacks); \ diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index 2dee593cb2..5325552395 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -6055,7 +6055,7 @@ nsHttpChannel::SetOfflineCacheToken(nsISupports *token) } class nsHttpChannelCacheKey final : public nsISupportsPRUint32, - public nsISupportsCString + public nsISupportsCString { NS_DECL_ISUPPORTS diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h index f7a249d3c0..379ad14e5c 100644 --- a/netwerk/protocol/http/nsHttpChannel.h +++ b/netwerk/protocol/http/nsHttpChannel.h @@ -47,19 +47,19 @@ class Http2PushedStream; } class nsHttpChannel final : public HttpBaseChannel - , public HttpAsyncAborter - , public nsIStreamListener - , public nsICachingChannel - , public nsICacheEntryOpenCallback - , public nsITransportEventSink - , public nsIProtocolProxyCallback - , public nsIHttpAuthenticableChannel - , public nsIApplicationCacheChannel - , public nsIAsyncVerifyRedirectCallback - , public nsIThreadRetargetableRequest - , public nsIThreadRetargetableStreamListener - , public nsIDNSListener - , public nsSupportsWeakReference + , public HttpAsyncAborter + , public nsIStreamListener + , public nsICachingChannel + , public nsICacheEntryOpenCallback + , public nsITransportEventSink + , public nsIProtocolProxyCallback + , public nsIHttpAuthenticableChannel + , public nsIApplicationCacheChannel + , public nsIAsyncVerifyRedirectCallback + , public nsIThreadRetargetableRequest + , public nsIThreadRetargetableStreamListener + , public nsIDNSListener + , public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS_INHERITED diff --git a/netwerk/protocol/http/nsHttpConnection.h b/netwerk/protocol/http/nsHttpConnection.h index 2a95b21757..7a431fd782 100644 --- a/netwerk/protocol/http/nsHttpConnection.h +++ b/netwerk/protocol/http/nsHttpConnection.h @@ -37,12 +37,12 @@ class ASpdySession; //----------------------------------------------------------------------------- class nsHttpConnection final : public nsAHttpSegmentReader - , public nsAHttpSegmentWriter - , public nsIInputStreamCallback - , public nsIOutputStreamCallback - , public nsITransportEventSink - , public nsIInterfaceRequestor - , public NudgeTunnelCallback + , public nsAHttpSegmentWriter + , public nsIInputStreamCallback + , public nsIOutputStreamCallback + , public nsITransportEventSink + , public nsIInterfaceRequestor + , public NudgeTunnelCallback { virtual ~nsHttpConnection(); diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h index 63d1cac337..a766ab713c 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.h +++ b/netwerk/protocol/http/nsHttpConnectionMgr.h @@ -431,9 +431,9 @@ private: // while we wait for it to establish and bind it to a connection class nsHalfOpenSocket final : public nsIOutputStreamCallback, - public nsITransportEventSink, - public nsIInterfaceRequestor, - public nsITimerCallback + public nsITransportEventSink, + public nsIInterfaceRequestor, + public nsITimerCallback { ~nsHalfOpenSocket(); diff --git a/netwerk/protocol/http/nsHttpHandler.h b/netwerk/protocol/http/nsHttpHandler.h index f599eb0c2a..86f30d50f5 100644 --- a/netwerk/protocol/http/nsHttpHandler.h +++ b/netwerk/protocol/http/nsHttpHandler.h @@ -44,9 +44,9 @@ class AltSvcMapping; //----------------------------------------------------------------------------- class nsHttpHandler final : public nsIHttpProtocolHandler - , public nsIObserver - , public nsSupportsWeakReference - , public nsISpeculativeConnect + , public nsIObserver + , public nsSupportsWeakReference + , public nsISpeculativeConnect { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/protocol/http/nsHttpPipeline.h b/netwerk/protocol/http/nsHttpPipeline.h index 086b0d830c..9ab37178a2 100644 --- a/netwerk/protocol/http/nsHttpPipeline.h +++ b/netwerk/protocol/http/nsHttpPipeline.h @@ -17,8 +17,8 @@ class nsIOutputStream; namespace mozilla { namespace net { class nsHttpPipeline final : public nsAHttpConnection - , public nsAHttpTransaction - , public nsAHttpSegmentReader + , public nsAHttpTransaction + , public nsAHttpSegmentReader { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/protocol/http/nsHttpTransaction.h b/netwerk/protocol/http/nsHttpTransaction.h index a4b501f095..2da0569bba 100644 --- a/netwerk/protocol/http/nsHttpTransaction.h +++ b/netwerk/protocol/http/nsHttpTransaction.h @@ -41,9 +41,9 @@ class nsHttpResponseHead; //----------------------------------------------------------------------------- class nsHttpTransaction final : public nsAHttpTransaction - , public ATokenBucketEvent - , public nsIInputStreamCallback - , public nsIOutputStreamCallback + , public ATokenBucketEvent + , public nsIInputStreamCallback + , public nsIOutputStreamCallback { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/protocol/rtsp/controller/RtspController.h b/netwerk/protocol/rtsp/controller/RtspController.h index 027a3065be..f883c24cb0 100644 --- a/netwerk/protocol/rtsp/controller/RtspController.h +++ b/netwerk/protocol/rtsp/controller/RtspController.h @@ -17,7 +17,7 @@ namespace mozilla { namespace net { class RtspController final : public nsIStreamingProtocolController - , public nsIStreamingProtocolListener + , public nsIStreamingProtocolListener { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/protocol/viewsource/nsViewSourceChannel.h b/netwerk/protocol/viewsource/nsViewSourceChannel.h index 9c7249d775..8f63a5f4aa 100644 --- a/netwerk/protocol/viewsource/nsViewSourceChannel.h +++ b/netwerk/protocol/viewsource/nsViewSourceChannel.h @@ -19,12 +19,12 @@ #include "mozilla/Attributes.h" class nsViewSourceChannel final : public nsIViewSourceChannel, - public nsIStreamListener, - public nsIHttpChannel, - public nsIHttpChannelInternal, - public nsICachingChannel, - public nsIApplicationCacheChannel, - public nsIUploadChannel + public nsIStreamListener, + public nsIHttpChannel, + public nsIHttpChannelInternal, + public nsICachingChannel, + public nsIApplicationCacheChannel, + public nsIUploadChannel { public: diff --git a/netwerk/streamconv/converters/nsMultiMixedConv.h b/netwerk/streamconv/converters/nsMultiMixedConv.h index 0e3e287808..8b3c874da4 100644 --- a/netwerk/streamconv/converters/nsMultiMixedConv.h +++ b/netwerk/streamconv/converters/nsMultiMixedConv.h @@ -35,9 +35,9 @@ using mozilla::net::nsHttpResponseHead; // nsIStreamListener interface. // class nsPartChannel final : public nsIChannel, - public nsIByteRangeRequest, - public nsIResponseHeadProvider, - public nsIMultiPartChannel + public nsIByteRangeRequest, + public nsIResponseHeadProvider, + public nsIMultiPartChannel { public: nsPartChannel(nsIChannel *aMultipartChannel, uint32_t aPartID, diff --git a/netwerk/test/TestIncrementalDownload.cpp b/netwerk/test/TestIncrementalDownload.cpp index 9caecb3166..082828ad85 100644 --- a/netwerk/test/TestIncrementalDownload.cpp +++ b/netwerk/test/TestIncrementalDownload.cpp @@ -20,7 +20,7 @@ //----------------------------------------------------------------------------- class FetchObserver final : public nsIRequestObserver - , public nsIProgressEventSink + , public nsIProgressEventSink { ~FetchObserver() {} public: diff --git a/parser/html/nsHtml5Parser.h b/parser/html/nsHtml5Parser.h index 3ac25d27c3..277143368a 100644 --- a/parser/html/nsHtml5Parser.h +++ b/parser/html/nsHtml5Parser.h @@ -28,7 +28,7 @@ #include "nsHtml5StreamListener.h" class nsHtml5Parser final : public nsIParser, - public nsSupportsWeakReference + public nsSupportsWeakReference { public: NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW diff --git a/parser/html/nsHtml5TreeOpExecutor.h b/parser/html/nsHtml5TreeOpExecutor.h index b3b54eee10..ec922c1bea 100644 --- a/parser/html/nsHtml5TreeOpExecutor.h +++ b/parser/html/nsHtml5TreeOpExecutor.h @@ -32,9 +32,9 @@ class nsIContent; class nsIDocument; class nsHtml5TreeOpExecutor final : public nsHtml5DocumentBuilder, - public nsIContentSink, - public nsAHtml5TreeOpSink, - public mozilla::LinkedListElement + public nsIContentSink, + public nsAHtml5TreeOpSink, + public mozilla::LinkedListElement { friend class nsHtml5FlushLoopGuard; typedef mozilla::net::ReferrerPolicy ReferrerPolicy; diff --git a/parser/html/nsParserUtils.h b/parser/html/nsParserUtils.h index 5356cf6fc2..4645f11b94 100644 --- a/parser/html/nsParserUtils.h +++ b/parser/html/nsParserUtils.h @@ -11,7 +11,7 @@ #include "mozilla/Attributes.h" class nsParserUtils final : public nsIScriptableUnescapeHTML, - public nsIParserUtils + public nsIParserUtils { ~nsParserUtils() {} public: diff --git a/parser/htmlparser/nsParser.h b/parser/htmlparser/nsParser.h index 54bccf4f5c..858ee23d70 100644 --- a/parser/htmlparser/nsParser.h +++ b/parser/htmlparser/nsParser.h @@ -63,8 +63,8 @@ class nsIRunnable; class nsParser final : public nsIParser, - public nsIStreamListener, - public nsSupportsWeakReference + public nsIStreamListener, + public nsSupportsWeakReference { /** * Destructor diff --git a/parser/xml/nsSAXXMLReader.h b/parser/xml/nsSAXXMLReader.h index e1885a8bb2..763f787e56 100644 --- a/parser/xml/nsSAXXMLReader.h +++ b/parser/xml/nsSAXXMLReader.h @@ -26,8 +26,8 @@ { 0x96, 0xd0, 0x47, 0xa8, 0x28, 0x2a, 0xe3, 0xdb} } class nsSAXXMLReader final : public nsISAXXMLReader, - public nsIExtendedExpatSink, - public nsIContentSink + public nsIExtendedExpatSink, + public nsIContentSink { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/rdf/base/nsRDFService.h b/rdf/base/nsRDFService.h index 27905f9b9a..8dad600975 100644 --- a/rdf/base/nsRDFService.h +++ b/rdf/base/nsRDFService.h @@ -34,7 +34,7 @@ class nsIRDFDate; class BlobImpl; class RDFServiceImpl final : public nsIRDFService, - public nsSupportsWeakReference + public nsSupportsWeakReference { protected: PLHashTable* mNamedDataSources; diff --git a/security/manager/ssl/public/moz.build b/security/manager/ssl/public/moz.build index 6307482c56..e2c6f3e07e 100644 --- a/security/manager/ssl/public/moz.build +++ b/security/manager/ssl/public/moz.build @@ -17,7 +17,6 @@ XPIDL_SOURCES += [ 'nsIDataSignatureVerifier.idl', 'nsIDOMCryptoDialogs.idl', 'nsIGenKeypairInfoDlg.idl', - 'nsIIdentityInfo.idl', 'nsIKeygenThread.idl', 'nsIKeyModule.idl', 'nsINSSCertCache.idl', diff --git a/security/manager/ssl/public/nsIIdentityInfo.idl b/security/manager/ssl/public/nsIIdentityInfo.idl deleted file mode 100644 index 2626c613b2..0000000000 --- a/security/manager/ssl/public/nsIIdentityInfo.idl +++ /dev/null @@ -1,30 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "nsISupports.idl" - -[scriptable, uuid(e9da87b8-b87c-4bd1-a6bc-5a9a2c7f6d8d)] -interface nsIIdentityInfo : nsISupports -{ - /** - * A "true" value means: - * The object that implements this interface uses a certificate that - * was successfully verified as an Extended Validation (EV) cert. - * The test is bound to SSL Server Cert Usage. - */ - readonly attribute boolean isExtendedValidation; - - /** - * This function uses the same test as attribute - * isExtendedValidation - * - * If isExtendedValidation is true, this function will return - * a policy identifier in dotted notation (like 1.2.3.4.5). - * - * If isExtendedValidation is false, this function will return - * an empty (length string) value. - */ - ACString getValidEVPolicyOid(); -}; - diff --git a/security/manager/ssl/src/PSMContentListener.h b/security/manager/ssl/src/PSMContentListener.h index 17ee095980..49239029bf 100644 --- a/security/manager/ssl/src/PSMContentListener.h +++ b/security/manager/ssl/src/PSMContentListener.h @@ -17,7 +17,8 @@ namespace mozilla { namespace psm { class PSMContentListener : public nsIURIContentListener, - public nsSupportsWeakReference { + public nsSupportsWeakReference +{ public: PSMContentListener(); nsresult init(); diff --git a/security/manager/ssl/src/SSLServerCertVerification.cpp b/security/manager/ssl/src/SSLServerCertVerification.cpp index 9d4e7807b2..91a3b20e5e 100644 --- a/security/manager/ssl/src/SSLServerCertVerification.cpp +++ b/security/manager/ssl/src/SSLServerCertVerification.cpp @@ -676,7 +676,7 @@ CreateCertErrorRunnable(CertVerifier& certVerifier, return nullptr; } - infoObject->SetStatusErrorBits(*nssCert, collected_errors); + infoObject->SetStatusErrorBits(nssCert, collected_errors); return new CertErrorRunnable(fdForLogging, static_cast(nssCert.get()), diff --git a/security/manager/ssl/src/TransportSecurityInfo.cpp b/security/manager/ssl/src/TransportSecurityInfo.cpp index 21efcd1459..16c28be116 100644 --- a/security/manager/ssl/src/TransportSecurityInfo.cpp +++ b/security/manager/ssl/src/TransportSecurityInfo.cpp @@ -1088,15 +1088,16 @@ RememberCertErrorsTable::LookupCertErrorBits(TransportSecurityInfo* infoObject, } void -TransportSecurityInfo::SetStatusErrorBits(nsIX509Cert & cert, +TransportSecurityInfo::SetStatusErrorBits(nsNSSCertificate* cert, uint32_t collected_errors) { MutexAutoLock lock(mMutex); - if (!mSSLStatus) + if (!mSSLStatus) { mSSLStatus = new nsSSLStatus(); + } - mSSLStatus->SetServerCert(&cert, nsNSSCertificate::ev_status_invalid); + mSSLStatus->SetServerCert(cert, nsNSSCertificate::ev_status_invalid); mSSLStatus->mHaveCertErrorBits = true; mSSLStatus->mIsDomainMismatch = diff --git a/security/manager/ssl/src/TransportSecurityInfo.h b/security/manager/ssl/src/TransportSecurityInfo.h index 1f39d76f64..637f4d7c86 100644 --- a/security/manager/ssl/src/TransportSecurityInfo.h +++ b/security/manager/ssl/src/TransportSecurityInfo.h @@ -74,7 +74,7 @@ public: /* Set SSL Status values */ nsresult SetSSLStatus(nsSSLStatus *aSSLStatus); nsSSLStatus* SSLStatus() { return mSSLStatus; } - void SetStatusErrorBits(nsIX509Cert & cert, uint32_t collected_errors); + void SetStatusErrorBits(nsNSSCertificate* cert, uint32_t collected_errors); nsresult SetFailedCertChain(ScopedCERTCertList& certList); diff --git a/security/manager/ssl/src/nsCertOverrideService.h b/security/manager/ssl/src/nsCertOverrideService.h index 5ab1dce348..3511ceb5bd 100644 --- a/security/manager/ssl/src/nsCertOverrideService.h +++ b/security/manager/ssl/src/nsCertOverrideService.h @@ -127,8 +127,8 @@ class nsCertOverrideEntry final : public PLDHashEntryHdr }; class nsCertOverrideService final : public nsICertOverrideService - , public nsIObserver - , public nsSupportsWeakReference + , public nsIObserver + , public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/security/manager/ssl/src/nsClientAuthRemember.h b/security/manager/ssl/src/nsClientAuthRemember.h index 7b2fbebc46..bfbf2bcad5 100644 --- a/security/manager/ssl/src/nsClientAuthRemember.h +++ b/security/manager/ssl/src/nsClientAuthRemember.h @@ -107,7 +107,7 @@ class nsClientAuthRememberEntry final : public PLDHashEntryHdr }; class nsClientAuthRememberService final : public nsIObserver, - public nsSupportsWeakReference + public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/security/manager/ssl/src/nsNSSCallbacks.cpp b/security/manager/ssl/src/nsNSSCallbacks.cpp index b7e8e9ff47..7d05d7ed9b 100644 --- a/security/manager/ssl/src/nsNSSCallbacks.cpp +++ b/security/manager/ssl/src/nsNSSCallbacks.cpp @@ -1081,8 +1081,6 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) { nsContentUtils::LogSimpleConsoleError(msg, "SSL"); } - ScopedCERTCertificate serverCert(SSL_PeerCertificate(fd)); - /* Set the SSL Status information */ RefPtr status(infoObject->SSLStatus()); if (!status) { @@ -1093,33 +1091,15 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) { RememberCertErrorsTable::GetInstance().LookupCertErrorBits(infoObject, status); - RefPtr nssc(nsNSSCertificate::Create(serverCert.get())); - nsCOMPtr prevcert; - infoObject->GetPreviousCert(getter_AddRefs(prevcert)); - - bool equals_previous = false; - if (prevcert && nssc) { - nsresult rv = nssc->Equals(prevcert, &equals_previous); - if (NS_FAILED(rv)) { - equals_previous = false; - } - } - - if (equals_previous) { + if (status->HasServerCert()) { PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, - ("HandshakeCallback using PREV cert %p\n", prevcert.get())); - status->SetServerCert(prevcert, nsNSSCertificate::ev_status_unknown); - } - else { - if (status->HasServerCert()) { - PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, - ("HandshakeCallback KEEPING existing cert\n")); - } - else { - PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, - ("HandshakeCallback using NEW cert %p\n", nssc.get())); - status->SetServerCert(nssc, nsNSSCertificate::ev_status_unknown); - } + ("HandshakeCallback KEEPING existing cert\n")); + } else { + ScopedCERTCertificate serverCert(SSL_PeerCertificate(fd)); + RefPtr nssc(nsNSSCertificate::Create(serverCert.get())); + PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, + ("HandshakeCallback using NEW cert %p\n", nssc.get())); + status->SetServerCert(nssc, nsNSSCertificate::ev_status_unknown); } infoObject->NoteTimeUntilReady(); diff --git a/security/manager/ssl/src/nsNSSCertificate.cpp b/security/manager/ssl/src/nsNSSCertificate.cpp index b35aac2f64..621867be4e 100644 --- a/security/manager/ssl/src/nsNSSCertificate.cpp +++ b/security/manager/ssl/src/nsNSSCertificate.cpp @@ -66,7 +66,6 @@ extern PRLogModuleInfo* gPIPNSSLog; NS_IMPL_ISUPPORTS(nsNSSCertificate, nsIX509Cert, - nsIIdentityInfo, nsISerializable, nsIClassInfo) @@ -1438,7 +1437,7 @@ nsNSSCertificate::getValidEVOidTag(SECOidTag& resultOidTag, bool& validEV) #endif // MOZ_NO_EV_CERTS -NS_IMETHODIMP +nsresult nsNSSCertificate::GetIsExtendedValidation(bool* aIsEV) { #ifdef MOZ_NO_EV_CERTS @@ -1463,42 +1462,6 @@ nsNSSCertificate::GetIsExtendedValidation(bool* aIsEV) #endif } -NS_IMETHODIMP -nsNSSCertificate::GetValidEVPolicyOid(nsACString& outDottedOid) -{ - outDottedOid.Truncate(); - -#ifndef MOZ_NO_EV_CERTS - nsNSSShutDownPreventionLock locker; - if (isAlreadyShutDown()) { - return NS_ERROR_NOT_AVAILABLE; - } - - SECOidTag oid_tag; - bool valid; - nsresult rv = getValidEVOidTag(oid_tag, valid); - if (NS_FAILED(rv)) { - return rv; - } - - if (valid) { - SECOidData* oid_data = SECOID_FindOIDByTag(oid_tag); - if (!oid_data) { - return NS_ERROR_FAILURE; - } - - char* oid_str = CERT_GetOidString(&oid_data->oid); - if (!oid_str) { - return NS_ERROR_FAILURE; - } - - outDottedOid.Assign(oid_str); - PR_smprintf_free(oid_str); - } -#endif - - return NS_OK; -} namespace mozilla { diff --git a/security/manager/ssl/src/nsNSSCertificate.h b/security/manager/ssl/src/nsNSSCertificate.h index 4e565ed48e..77e3ab45bd 100644 --- a/security/manager/ssl/src/nsNSSCertificate.h +++ b/security/manager/ssl/src/nsNSSCertificate.h @@ -10,7 +10,6 @@ #include "nsIX509CertDB.h" #include "nsIX509CertList.h" #include "nsIASN1Object.h" -#include "nsIIdentityInfo.h" #include "nsCOMPtr.h" #include "nsNSSShutDown.h" #include "nsISimpleEnumerator.h" @@ -26,15 +25,13 @@ class nsINSSComponent; class nsIASN1Sequence; class nsNSSCertificate final : public nsIX509Cert, - public nsIIdentityInfo, - public nsISerializable, - public nsIClassInfo, - public nsNSSShutDownObject + public nsISerializable, + public nsIClassInfo, + public nsNSSShutDownObject { public: NS_DECL_THREADSAFE_ISUPPORTS NS_DECL_NSIX509CERT - NS_DECL_NSIIDENTITYINFO NS_DECL_NSISERIALIZABLE NS_DECL_NSICLASSINFO @@ -48,6 +45,7 @@ public: static nsNSSCertificate* Create(CERTCertificate*cert = nullptr, SECOidTag* evOidPolicy = nullptr); static nsNSSCertificate* ConstructFromDER(char* certDER, int derLen); + nsresult GetIsExtendedValidation(bool* aIsEV); enum EVStatus { ev_status_invalid = 0, diff --git a/security/manager/ssl/src/nsNSSCertificateDB.h b/security/manager/ssl/src/nsNSSCertificateDB.h index 9440537dc0..3f272a9a21 100644 --- a/security/manager/ssl/src/nsNSSCertificateDB.h +++ b/security/manager/ssl/src/nsNSSCertificateDB.h @@ -15,7 +15,7 @@ class nsCString; class nsIArray; class nsNSSCertificateDB final : public nsIX509CertDB - , public nsNSSShutDownObject + , public nsNSSShutDownObject { public: diff --git a/security/manager/ssl/src/nsNSSComponent.h b/security/manager/ssl/src/nsNSSComponent.h index 5e49515120..24e4b82df9 100644 --- a/security/manager/ssl/src/nsNSSComponent.h +++ b/security/manager/ssl/src/nsNSSComponent.h @@ -106,9 +106,9 @@ class nsCertVerificationThread; // Implementation of the PSM component interface. class nsNSSComponent final : public nsIEntropyCollector, - public nsINSSComponent, - public nsIObserver, - public nsSupportsWeakReference + public nsINSSComponent, + public nsIObserver, + public nsSupportsWeakReference { typedef mozilla::Mutex Mutex; diff --git a/security/manager/ssl/src/nsNSSIOLayer.cpp b/security/manager/ssl/src/nsNSSIOLayer.cpp index 6000b0cc37..1c7254ad5b 100644 --- a/security/manager/ssl/src/nsNSSIOLayer.cpp +++ b/security/manager/ssl/src/nsNSSIOLayer.cpp @@ -26,13 +26,6 @@ #include "SSLServerCertVerification.h" #include "nsNSSCertHelper.h" -#ifndef MOZ_NO_EV_CERTS -#include "nsIDocShell.h" -#include "nsIDocShellTreeItem.h" -#include "nsISecureBrowserUI.h" -#include "nsIInterfaceRequestorUtils.h" -#endif - #include "nsCharSeparatedTokenizer.h" #include "nsIConsoleService.h" #include "PSMRunnable.h" @@ -276,39 +269,6 @@ nsNSSSocketInfo::SetNotificationCallbacks(nsIInterfaceRequestor* aCallbacks) return NS_OK; } -#ifndef MOZ_NO_EV_CERTS -static void -getSecureBrowserUI(nsIInterfaceRequestor* callbacks, - nsISecureBrowserUI** result) -{ - NS_ASSERTION(result, "result parameter to getSecureBrowserUI is null"); - *result = nullptr; - - NS_ASSERTION(NS_IsMainThread(), - "getSecureBrowserUI called off the main thread"); - - if (!callbacks) - return; - - nsCOMPtr secureUI = do_GetInterface(callbacks); - if (secureUI) { - secureUI.forget(result); - return; - } - - nsCOMPtr item = do_GetInterface(callbacks); - if (item) { - nsCOMPtr rootItem; - (void) item->GetSameTypeRootTreeItem(getter_AddRefs(rootItem)); - - nsCOMPtr docShell = do_QueryInterface(rootItem); - if (docShell) { - (void) docShell->GetSecurityUI(result); - } - } -} -#endif - void nsNSSSocketInfo::NoteTimeUntilReady() { @@ -619,49 +579,6 @@ nsNSSSocketInfo::SetFileDescPtr(PRFileDesc* aFilePtr) return NS_OK; } -#ifndef MOZ_NO_EV_CERTS -class PreviousCertRunnable : public SyncRunnableBase -{ -public: - explicit PreviousCertRunnable(nsIInterfaceRequestor* callbacks) - : mCallbacks(callbacks) - { - } - - virtual void RunOnTargetThread() - { - nsCOMPtr secureUI; - getSecureBrowserUI(mCallbacks, getter_AddRefs(secureUI)); - nsCOMPtr statusProvider = do_QueryInterface(secureUI); - if (statusProvider) { - nsCOMPtr status; - (void) statusProvider->GetSSLStatus(getter_AddRefs(status)); - if (status) { - (void) status->GetServerCert(getter_AddRefs(mPreviousCert)); - } - } - } - - nsCOMPtr mPreviousCert; // out -private: - nsCOMPtr mCallbacks; // in -}; -#endif - -void -nsNSSSocketInfo::GetPreviousCert(nsIX509Cert** _result) -{ - NS_ASSERTION(_result, "_result parameter to GetPreviousCert is null"); - *_result = nullptr; - -#ifndef MOZ_NO_EV_CERTS - RefPtr runnable(new PreviousCertRunnable(mCallbacks)); - DebugOnly rv = runnable->DispatchToMainThreadAndWait(); - NS_ASSERTION(NS_SUCCEEDED(rv), "runnable->DispatchToMainThreadAndWait() failed"); - runnable->mPreviousCert.forget(_result); -#endif -} - void nsNSSSocketInfo::SetCertVerificationWaiting() { diff --git a/security/manager/ssl/src/nsNSSIOLayer.h b/security/manager/ssl/src/nsNSSIOLayer.h index d0bfabfa93..0109b2119b 100644 --- a/security/manager/ssl/src/nsNSSIOLayer.h +++ b/security/manager/ssl/src/nsNSSIOLayer.h @@ -25,8 +25,8 @@ class SharedSSLState; class nsIObserver; class nsNSSSocketInfo final : public mozilla::psm::TransportSecurityInfo, - public nsISSLSocketControl, - public nsIClientAuthUserDecision + public nsISSLSocketControl, + public nsIClientAuthUserDecision { public: nsNSSSocketInfo(mozilla::psm::SharedSSLState& aState, uint32_t providerFlags); @@ -44,8 +44,6 @@ public: bool IsHandshakePending() const { return mHandshakePending; } void SetHandshakeNotPending() { mHandshakePending = false; } - void GetPreviousCert(nsIX509Cert** _result); - void SetTLSVersionRange(SSLVersionRange range) { mTLSVersionRange = range; } SSLVersionRange GetTLSVersionRange() const { return mTLSVersionRange; }; diff --git a/security/manager/ssl/src/nsRandomGenerator.h b/security/manager/ssl/src/nsRandomGenerator.h index 970d75d844..197f2d7477 100644 --- a/security/manager/ssl/src/nsRandomGenerator.h +++ b/security/manager/ssl/src/nsRandomGenerator.h @@ -16,7 +16,7 @@ "@mozilla.org/security/random-generator;1" class nsRandomGenerator final : public nsIRandomGenerator - , public nsNSSShutDownObject + , public nsNSSShutDownObject { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/security/manager/ssl/src/nsSSLStatus.cpp b/security/manager/ssl/src/nsSSLStatus.cpp index 4b797d9035..9570908422 100644 --- a/security/manager/ssl/src/nsSSLStatus.cpp +++ b/security/manager/ssl/src/nsSSLStatus.cpp @@ -7,7 +7,6 @@ #include "nsSSLStatus.h" #include "plstr.h" #include "nsIClassInfoImpl.h" -#include "nsIIdentityInfo.h" #include "nsIProgrammingLanguage.h" #include "nsIObjectOutputStream.h" #include "nsIObjectInputStream.h" @@ -305,7 +304,8 @@ nsSSLStatus::~nsSSLStatus() } void -nsSSLStatus::SetServerCert(nsIX509Cert* aServerCert, nsNSSCertificate::EVStatus aEVStatus) +nsSSLStatus::SetServerCert(nsNSSCertificate* aServerCert, + nsNSSCertificate::EVStatus aEVStatus) { mServerCert = aServerCert; @@ -316,10 +316,9 @@ nsSSLStatus::SetServerCert(nsIX509Cert* aServerCert, nsNSSCertificate::EVStatus } #ifndef MOZ_NO_EV_CERTS - nsCOMPtr idinfo = do_QueryInterface(mServerCert); - if (idinfo) { - nsresult rv = idinfo->GetIsExtendedValidation(&mIsEV); - if (NS_WARN_IF(NS_FAILED(rv))) { + if (aServerCert) { + nsresult rv = aServerCert->GetIsExtendedValidation(&mIsEV); + if (NS_FAILED(rv)) { return; } mHasIsEVStatus = true; diff --git a/security/manager/ssl/src/nsSSLStatus.h b/security/manager/ssl/src/nsSSLStatus.h index 795e0eb966..e51fe27812 100644 --- a/security/manager/ssl/src/nsSSLStatus.h +++ b/security/manager/ssl/src/nsSSLStatus.h @@ -30,7 +30,8 @@ public: nsSSLStatus(); - void SetServerCert(nsIX509Cert* aServerCert, nsNSSCertificate::EVStatus aEVStatus); + void SetServerCert(nsNSSCertificate* aServerCert, + nsNSSCertificate::EVStatus aEVStatus); bool HasServerCert() { return mServerCert != nullptr; diff --git a/security/manager/ssl/tests/unit/test_ev_certs.js b/security/manager/ssl/tests/unit/test_ev_certs.js index 794a58af85..3652651ea6 100644 --- a/security/manager/ssl/tests/unit/test_ev_certs.js +++ b/security/manager/ssl/tests/unit/test_ev_certs.js @@ -255,9 +255,5 @@ function check_no_ocsp_requests(cert_name, expected_error) { // Since we're not doing OCSP requests, no certificate will be EV. do_check_eq(hasEVPolicy.value, false); do_check_eq(expected_error, error); - // Also check that isExtendedValidation doesn't cause OCSP requests. - let identityInfo = cert.QueryInterface(Ci.nsIIdentityInfo); - do_check_eq(identityInfo.isExtendedValidation, false); ocspResponder.stop(run_next_test); } - diff --git a/storage/src/mozStorageAsyncStatement.h b/storage/src/mozStorageAsyncStatement.h index 5c95285c47..72534d0770 100644 --- a/storage/src/mozStorageAsyncStatement.h +++ b/storage/src/mozStorageAsyncStatement.h @@ -28,7 +28,7 @@ class AsyncStatementJSHelper; class Connection; class AsyncStatement final : public mozIStorageAsyncStatement - , public StorageBaseStatementInternal + , public StorageBaseStatementInternal { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/storage/src/mozStorageAsyncStatementExecution.h b/storage/src/mozStorageAsyncStatementExecution.h index 841800641b..4364231e70 100644 --- a/storage/src/mozStorageAsyncStatementExecution.h +++ b/storage/src/mozStorageAsyncStatementExecution.h @@ -30,7 +30,7 @@ class ResultSet; class StatementData; class AsyncExecuteStatements final : public nsIRunnable - , public mozIStoragePendingStatement + , public mozIStoragePendingStatement { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/storage/src/mozStorageAsyncStatementParams.h b/storage/src/mozStorageAsyncStatementParams.h index ec10fa3d99..71f53dab65 100644 --- a/storage/src/mozStorageAsyncStatementParams.h +++ b/storage/src/mozStorageAsyncStatementParams.h @@ -23,7 +23,7 @@ class AsyncStatement; * an async variant. */ class AsyncStatementParams final : public mozIStorageStatementParams - , public nsIXPCScriptable + , public nsIXPCScriptable { public: explicit AsyncStatementParams(AsyncStatement *aStatement); diff --git a/storage/src/mozStorageConnection.h b/storage/src/mozStorageConnection.h index 9a3848871a..a86ec796f0 100644 --- a/storage/src/mozStorageConnection.h +++ b/storage/src/mozStorageConnection.h @@ -37,7 +37,7 @@ namespace mozilla { namespace storage { class Connection final : public mozIStorageConnection - , public nsIInterfaceRequestor + , public nsIInterfaceRequestor { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/storage/src/mozStorageStatement.h b/storage/src/mozStorageStatement.h index ee786cfa2b..84fd5da2de 100644 --- a/storage/src/mozStorageStatement.h +++ b/storage/src/mozStorageStatement.h @@ -28,8 +28,8 @@ class StatementJSHelper; class Connection; class Statement final : public mozIStorageStatement - , public mozIStorageValueArray - , public StorageBaseStatementInternal + , public mozIStorageValueArray + , public StorageBaseStatementInternal { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/storage/src/mozStorageStatementParams.h b/storage/src/mozStorageStatementParams.h index a51b189970..2627f8aa19 100644 --- a/storage/src/mozStorageStatementParams.h +++ b/storage/src/mozStorageStatementParams.h @@ -17,7 +17,7 @@ namespace mozilla { namespace storage { class StatementParams final : public mozIStorageStatementParams - , public nsIXPCScriptable + , public nsIXPCScriptable { public: explicit StatementParams(mozIStorageStatement *aStatement); diff --git a/storage/src/mozStorageStatementRow.h b/storage/src/mozStorageStatementRow.h index 5cb065b728..ea9e403484 100644 --- a/storage/src/mozStorageStatementRow.h +++ b/storage/src/mozStorageStatementRow.h @@ -17,7 +17,7 @@ namespace storage { class Statement; class StatementRow final : public mozIStorageStatementRow - , public nsIXPCScriptable + , public nsIXPCScriptable { public: NS_DECL_ISUPPORTS diff --git a/toolkit/components/autocomplete/nsAutoCompleteController.h b/toolkit/components/autocomplete/nsAutoCompleteController.h index 796e04dbad..9a6dae7825 100644 --- a/toolkit/components/autocomplete/nsAutoCompleteController.h +++ b/toolkit/components/autocomplete/nsAutoCompleteController.h @@ -21,9 +21,9 @@ #include "nsCycleCollectionParticipant.h" class nsAutoCompleteController final : public nsIAutoCompleteController, - public nsIAutoCompleteObserver, - public nsITimerCallback, - public nsITreeView + public nsIAutoCompleteObserver, + public nsITimerCallback, + public nsITreeView { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h index 82d8ea28e9..6559af3cde 100644 --- a/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h +++ b/toolkit/components/diskspacewatcher/DiskSpaceWatcher.h @@ -9,7 +9,7 @@ #include "nsCOMPtr.h" class DiskSpaceWatcher final : public nsIDiskSpaceWatcher, - public nsIObserver + public nsIObserver { public: NS_DECL_ISUPPORTS diff --git a/toolkit/components/downloads/nsDownloadManager.h b/toolkit/components/downloads/nsDownloadManager.h index aa957adf6e..aaf09bc499 100644 --- a/toolkit/components/downloads/nsDownloadManager.h +++ b/toolkit/components/downloads/nsDownloadManager.h @@ -39,9 +39,9 @@ class nsDownload; #endif class nsDownloadManager final : public nsIDownloadManager, - public nsINavHistoryObserver, - public nsIObserver, - public nsSupportsWeakReference + public nsINavHistoryObserver, + public nsIObserver, + public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS diff --git a/toolkit/components/filewatcher/NativeFileWatcherWin.h b/toolkit/components/filewatcher/NativeFileWatcherWin.h index 43f9419e04..37dd97f84d 100644 --- a/toolkit/components/filewatcher/NativeFileWatcherWin.h +++ b/toolkit/components/filewatcher/NativeFileWatcherWin.h @@ -17,7 +17,7 @@ namespace mozilla { class NativeFileWatcherService final : public nsINativeFileWatcherService, - public nsIObserver + public nsIObserver { public: NS_DECL_ISUPPORTS diff --git a/toolkit/components/places/Database.h b/toolkit/components/places/Database.h index 0eed6eecbe..69af86e964 100644 --- a/toolkit/components/places/Database.h +++ b/toolkit/components/places/Database.h @@ -62,7 +62,7 @@ enum JournalMode { }; class Database final : public nsIObserver - , public nsSupportsWeakReference + , public nsSupportsWeakReference { typedef mozilla::storage::StatementCache StatementCache; typedef mozilla::storage::StatementCache AsyncStatementCache; diff --git a/toolkit/components/places/History.cpp b/toolkit/components/places/History.cpp index d6e4c67329..9b5d6e4113 100644 --- a/toolkit/components/places/History.cpp +++ b/toolkit/components/places/History.cpp @@ -466,8 +466,8 @@ GetJSObjectFromArray(JSContext* aCtx, return NS_OK; } -class VisitedQuery final: public AsyncStatementCallback, - public mozIStorageCompletionCallback +class VisitedQuery final : public AsyncStatementCallback, + public mozIStorageCompletionCallback { public: NS_DECL_ISUPPORTS_INHERITED diff --git a/toolkit/components/places/History.h b/toolkit/components/places/History.h index fbaa07b0e3..4051792a64 100644 --- a/toolkit/components/places/History.h +++ b/toolkit/components/places/History.h @@ -37,10 +37,10 @@ class ConcurrentStatementsHolder; #define RECENTLY_VISITED_URI_SIZE 8 class History final : public IHistory - , public nsIDownloadHistory - , public mozIAsyncHistory - , public nsIObserver - , public nsIMemoryReporter + , public nsIDownloadHistory + , public mozIAsyncHistory + , public nsIObserver + , public nsIMemoryReporter { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/toolkit/components/places/nsAnnotationService.h b/toolkit/components/places/nsAnnotationService.h index 397d7c688e..d60113b89b 100644 --- a/toolkit/components/places/nsAnnotationService.h +++ b/toolkit/components/places/nsAnnotationService.h @@ -44,8 +44,8 @@ private: } // namespace mozilla class nsAnnotationService final : public nsIAnnotationService - , public nsIObserver - , public nsSupportsWeakReference + , public nsIObserver + , public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS diff --git a/toolkit/components/places/nsFaviconService.h b/toolkit/components/places/nsFaviconService.h index 36bf179266..629a4a2aa5 100644 --- a/toolkit/components/places/nsFaviconService.h +++ b/toolkit/components/places/nsFaviconService.h @@ -52,8 +52,8 @@ public: }; class nsFaviconService final : public nsIFaviconService - , public mozIAsyncFavicons - , public nsITimerCallback + , public mozIAsyncFavicons + , public nsITimerCallback { public: nsFaviconService(); diff --git a/toolkit/components/places/nsNavBookmarks.h b/toolkit/components/places/nsNavBookmarks.h index cedd73980b..586d2548a8 100644 --- a/toolkit/components/places/nsNavBookmarks.h +++ b/toolkit/components/places/nsNavBookmarks.h @@ -70,10 +70,10 @@ namespace places { } // namespace mozilla class nsNavBookmarks final : public nsINavBookmarksService - , public nsINavHistoryObserver - , public nsIAnnotationObserver - , public nsIObserver - , public nsSupportsWeakReference + , public nsINavHistoryObserver + , public nsIAnnotationObserver + , public nsIObserver + , public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS diff --git a/toolkit/components/places/nsNavHistory.h b/toolkit/components/places/nsNavHistory.h index be39bb5e83..d21a5b3b0a 100644 --- a/toolkit/components/places/nsNavHistory.h +++ b/toolkit/components/places/nsNavHistory.h @@ -62,11 +62,11 @@ class nsIAutoCompleteController; // nsNavHistory class nsNavHistory final : public nsSupportsWeakReference - , public nsINavHistoryService - , public nsIObserver - , public nsIBrowserHistory - , public nsPIPlacesDatabase - , public mozIStorageVacuumParticipant + , public nsINavHistoryService + , public nsIObserver + , public nsIBrowserHistory + , public nsPIPlacesDatabase + , public mozIStorageVacuumParticipant { friend class PlacesSQLQueryBuilder; diff --git a/toolkit/components/places/nsNavHistoryResult.h b/toolkit/components/places/nsNavHistoryResult.h index 8a351799d9..5c1d33206f 100644 --- a/toolkit/components/places/nsNavHistoryResult.h +++ b/toolkit/components/places/nsNavHistoryResult.h @@ -106,9 +106,9 @@ private: { 0x455d1d40, 0x1b9b, 0x40e6, { 0xa6, 0x41, 0x8b, 0xb7, 0xe8, 0x82, 0x23, 0x87 } } class nsNavHistoryResult final : public nsSupportsWeakReference, - public nsINavHistoryResult, - public nsINavBookmarkObserver, - public nsINavHistoryObserver + public nsINavHistoryResult, + public nsINavBookmarkObserver, + public nsINavHistoryObserver { public: static nsresult NewHistoryResult(nsINavHistoryQuery** aQueries, @@ -612,8 +612,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsNavHistoryContainerResultNode, // bookmark notifications. class nsNavHistoryQueryResultNode final : public nsNavHistoryContainerResultNode, - public nsINavHistoryQueryResultNode, - public nsINavBookmarkObserver + public nsINavHistoryQueryResultNode, + public nsINavBookmarkObserver { public: nsNavHistoryQueryResultNode(const nsACString& aTitle, @@ -693,9 +693,9 @@ protected: // of the folder in sync with the bookmark service. class nsNavHistoryFolderResultNode final : public nsNavHistoryContainerResultNode, - public nsINavHistoryQueryResultNode, - public nsINavBookmarkObserver, - public mozilla::places::AsyncStatementCallback + public nsINavHistoryQueryResultNode, + public nsINavBookmarkObserver, + public mozilla::places::AsyncStatementCallback { public: nsNavHistoryFolderResultNode(const nsACString& aTitle, diff --git a/toolkit/components/satchel/nsFormFillController.h b/toolkit/components/satchel/nsFormFillController.h index c9f68a7223..8a732369d4 100644 --- a/toolkit/components/satchel/nsFormFillController.h +++ b/toolkit/components/satchel/nsFormFillController.h @@ -32,11 +32,11 @@ class nsFormHistory; class nsINode; class nsFormFillController final : public nsIFormFillController, - public nsIAutoCompleteInput, - public nsIAutoCompleteSearch, - public nsIDOMEventListener, - public nsIFormAutoCompleteObserver, - public nsIMutationObserver + public nsIAutoCompleteInput, + public nsIAutoCompleteSearch, + public nsIDOMEventListener, + public nsIFormAutoCompleteObserver, + public nsIMutationObserver { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/toolkit/components/startup/nsAppStartup.h b/toolkit/components/startup/nsAppStartup.h index 7f8b9bd614..d3a9f3b70c 100644 --- a/toolkit/components/startup/nsAppStartup.h +++ b/toolkit/components/startup/nsAppStartup.h @@ -30,9 +30,9 @@ struct PLEvent; class nsAppStartup final : public nsIAppStartup, - public nsIWindowCreator2, - public nsIObserver, - public nsSupportsWeakReference + public nsIWindowCreator2, + public nsIObserver, + public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/toolkit/xre/nsXREDirProvider.h b/toolkit/xre/nsXREDirProvider.h index 3944c90a40..1243bebc43 100644 --- a/toolkit/xre/nsXREDirProvider.h +++ b/toolkit/xre/nsXREDirProvider.h @@ -15,7 +15,7 @@ #include "mozilla/Attributes.h" class nsXREDirProvider final : public nsIDirectoryServiceProvider2, - public nsIProfileStartup + public nsIProfileStartup { public: // we use a custom isupports implementation (no refcount) diff --git a/tools/profiler/ProfileEntry.cpp b/tools/profiler/ProfileEntry.cpp index 8b7e0436ec..9f790e5bd6 100644 --- a/tools/profiler/ProfileEntry.cpp +++ b/tools/profiler/ProfileEntry.cpp @@ -217,7 +217,7 @@ public: { } void readType(const char *keyedBy, const char *name, - const char *location, unsigned lineno) MOZ_OVERRIDE { + const char *location, unsigned lineno) override { if (!mStartedTypeList) { mStartedTypeList = true; mWriter.BeginObject(); @@ -239,7 +239,7 @@ public: mWriter.EndObject(); } - void operator()(JS::TrackedTypeSite site, const char *mirType) MOZ_OVERRIDE { + void operator()(JS::TrackedTypeSite site, const char *mirType) override { if (mStartedTypeList) { mWriter.EndArray(); mStartedTypeList = false; @@ -262,7 +262,7 @@ public: : mWriter(b) { } - void operator()(JS::TrackedStrategy strategy, JS::TrackedOutcome outcome) MOZ_OVERRIDE { + void operator()(JS::TrackedStrategy strategy, JS::TrackedOutcome outcome) override { mWriter.BeginObject(); { // Stringify the reasons for now; could stream enum values in the future diff --git a/uriloader/base/nsURILoader.cpp b/uriloader/base/nsURILoader.cpp index a8e377d8b3..85fbbe225f 100644 --- a/uriloader/base/nsURILoader.cpp +++ b/uriloader/base/nsURILoader.cpp @@ -69,7 +69,7 @@ PRLogModuleInfo* nsURILoader::mLog = nullptr; * (or aborted). */ class nsDocumentOpenInfo final : public nsIStreamListener - , public nsIThreadRetargetableStreamListener + , public nsIThreadRetargetableStreamListener { public: // Needed for nsCOMPtr to work right... Don't call this! diff --git a/uriloader/exthandler/nsExternalHelperAppService.h b/uriloader/exthandler/nsExternalHelperAppService.h index a425d47ffc..511daac8c1 100644 --- a/uriloader/exthandler/nsExternalHelperAppService.h +++ b/uriloader/exthandler/nsExternalHelperAppService.h @@ -202,9 +202,9 @@ private: * data using a helper app. */ class nsExternalAppHandler final : public nsIStreamListener, - public nsIHelperAppLauncher, - public nsITimerCallback, - public nsIBackgroundFileSaverObserver + public nsIHelperAppLauncher, + public nsITimerCallback, + public nsIBackgroundFileSaverObserver { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/uriloader/prefetch/OfflineCacheUpdateGlue.h b/uriloader/prefetch/OfflineCacheUpdateGlue.h index f2e41f31d0..b4a9b96ca9 100644 --- a/uriloader/prefetch/OfflineCacheUpdateGlue.h +++ b/uriloader/prefetch/OfflineCacheUpdateGlue.h @@ -38,8 +38,8 @@ namespace docshell { NS_IMETHOD Cancel() override { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(); } class OfflineCacheUpdateGlue final : public nsSupportsWeakReference - , public nsIOfflineCacheUpdate - , public nsIOfflineCacheUpdateObserver + , public nsIOfflineCacheUpdate + , public nsIOfflineCacheUpdateObserver { public: NS_DECL_ISUPPORTS diff --git a/uriloader/prefetch/nsOfflineCacheUpdate.cpp b/uriloader/prefetch/nsOfflineCacheUpdate.cpp index 63a50e39dd..8a928883a9 100644 --- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp +++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp @@ -116,8 +116,8 @@ LogToConsole(const char * message, nsOfflineCacheUpdateItem * item = nullptr) //----------------------------------------------------------------------------- class nsManifestCheck final : public nsIStreamListener - , public nsIChannelEventSink - , public nsIInterfaceRequestor + , public nsIChannelEventSink + , public nsIInterfaceRequestor { public: nsManifestCheck(nsOfflineCacheUpdate *aUpdate, diff --git a/uriloader/prefetch/nsOfflineCacheUpdate.h b/uriloader/prefetch/nsOfflineCacheUpdate.h index cfbad3d2a5..873e322ed8 100644 --- a/uriloader/prefetch/nsOfflineCacheUpdate.h +++ b/uriloader/prefetch/nsOfflineCacheUpdate.h @@ -194,9 +194,9 @@ public: }; class nsOfflineCacheUpdate final : public nsIOfflineCacheUpdate - , public nsIOfflineCacheUpdateObserver - , public nsIRunnable - , public nsOfflineCacheUpdateOwner + , public nsIOfflineCacheUpdateObserver + , public nsIRunnable + , public nsOfflineCacheUpdateOwner { public: NS_DECL_ISUPPORTS @@ -319,9 +319,9 @@ private: }; class nsOfflineCacheUpdateService final : public nsIOfflineCacheUpdateService - , public nsIObserver - , public nsOfflineCacheUpdateOwner - , public nsSupportsWeakReference + , public nsIObserver + , public nsOfflineCacheUpdateOwner + , public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS diff --git a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp index ac8ae28cfc..f96bfc3e8b 100644 --- a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp +++ b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp @@ -126,7 +126,7 @@ GetAppIDAndInBrowserFromWindow(nsIDOMWindow *aWindow, //----------------------------------------------------------------------------- class nsOfflineCachePendingUpdate final : public nsIWebProgressListener - , public nsSupportsWeakReference + , public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS diff --git a/uriloader/prefetch/nsPrefetchService.h b/uriloader/prefetch/nsPrefetchService.h index 28912ed269..0ac2636d94 100644 --- a/uriloader/prefetch/nsPrefetchService.h +++ b/uriloader/prefetch/nsPrefetchService.h @@ -28,9 +28,9 @@ class nsPrefetchNode; //----------------------------------------------------------------------------- class nsPrefetchService final : public nsIPrefetchService - , public nsIWebProgressListener - , public nsIObserver - , public nsSupportsWeakReference + , public nsIWebProgressListener + , public nsIObserver + , public nsSupportsWeakReference { public: NS_DECL_ISUPPORTS @@ -82,9 +82,9 @@ private: //----------------------------------------------------------------------------- class nsPrefetchNode final : public nsIStreamListener - , public nsIInterfaceRequestor - , public nsIChannelEventSink - , public nsIRedirectResultListener + , public nsIInterfaceRequestor + , public nsIChannelEventSink + , public nsIRedirectResultListener { public: NS_DECL_ISUPPORTS diff --git a/widget/android/APZCCallbackHandler.h b/widget/android/APZCCallbackHandler.h index 3ba46831c0..94d3541932 100644 --- a/widget/android/APZCCallbackHandler.h +++ b/widget/android/APZCCallbackHandler.h @@ -44,7 +44,7 @@ public: public: // GoannaContentController methods void RequestContentRepaint(const mozilla::layers::FrameMetrics& aFrameMetrics) override; void RequestFlingSnap(const mozilla::layers::FrameMetrics::ViewID& aScrollId, - const mozilla::CSSPoint& aDestination) MOZ_OVERRIDE; + const mozilla::CSSPoint& aDestination) override; void AcknowledgeScrollUpdate(const mozilla::layers::FrameMetrics::ViewID& aScrollId, const uint32_t& aScrollGeneration) override; void HandleDoubleTap(const mozilla::CSSPoint& aPoint, Modifiers aModifiers, diff --git a/widget/android/nsAndroidProtocolHandler.h b/widget/android/nsAndroidProtocolHandler.h index c395fc9568..11705dd0a5 100644 --- a/widget/android/nsAndroidProtocolHandler.h +++ b/widget/android/nsAndroidProtocolHandler.h @@ -19,7 +19,7 @@ } class nsAndroidProtocolHandler final : public nsIProtocolHandler, - public nsSupportsWeakReference + public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/widget/gonk/nativewindow/GonkBufferQueueKK.h b/widget/gonk/nativewindow/GonkBufferQueueKK.h index 447437b579..cca3cb63db 100644 --- a/widget/gonk/nativewindow/GonkBufferQueueKK.h +++ b/widget/gonk/nativewindow/GonkBufferQueueKK.h @@ -37,8 +37,9 @@ namespace android { // ---------------------------------------------------------------------------- class GonkBufferQueue : public BnGraphicBufferProducer, - public BnGonkGraphicBufferConsumer, - private IBinder::DeathRecipient { + public BnGonkGraphicBufferConsumer, + private IBinder::DeathRecipient +{ typedef mozilla::layers::TextureClient TextureClient; public: diff --git a/widget/gtk/nsDragService.h b/widget/gtk/nsDragService.h index b3ab9422ad..35fa40638f 100644 --- a/widget/gtk/nsDragService.h +++ b/widget/gtk/nsDragService.h @@ -49,7 +49,7 @@ class nsAutoRefTraits : */ class nsDragService final : public nsBaseDragService, - public nsIObserver + public nsIObserver { public: nsDragService(); diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h index 00165dcb72..f13e6c738b 100644 --- a/widget/nsBaseWidget.h +++ b/widget/nsBaseWidget.h @@ -232,7 +232,7 @@ public: NS_IMETHOD_(TextEventDispatcher*) GetTextEventDispatcher() override final; // Dispatch an event that must be first be routed through APZ. - nsEventStatus DispatchAPZAwareEvent(mozilla::WidgetInputEvent* aEvent) MOZ_OVERRIDE; + nsEventStatus DispatchAPZAwareEvent(mozilla::WidgetInputEvent* aEvent) override; void NotifyWindowDestroyed(); void NotifySizeMoveDone(); diff --git a/widget/nsColorPickerProxy.h b/widget/nsColorPickerProxy.h index c166801c2b..0f3af3793f 100644 --- a/widget/nsColorPickerProxy.h +++ b/widget/nsColorPickerProxy.h @@ -11,7 +11,7 @@ #include "mozilla/dom/PColorPickerChild.h" class nsColorPickerProxy final : public nsIColorPicker, - public mozilla::dom::PColorPickerChild + public mozilla::dom::PColorPickerChild { public: NS_DECL_ISUPPORTS diff --git a/widget/nsScreenManagerProxy.h b/widget/nsScreenManagerProxy.h index eb9915d6e7..2db660ca74 100644 --- a/widget/nsScreenManagerProxy.h +++ b/widget/nsScreenManagerProxy.h @@ -24,7 +24,7 @@ * loop. */ class nsScreenManagerProxy final : public nsIScreenManager, - public mozilla::dom::PScreenManagerChild + public mozilla::dom::PScreenManagerChild { public: nsScreenManagerProxy(); diff --git a/widget/windows/nsTextStore.cpp b/widget/windows/nsTextStore.cpp index 8fd51654f5..8df37696f1 100644 --- a/widget/windows/nsTextStore.cpp +++ b/widget/windows/nsTextStore.cpp @@ -701,7 +701,7 @@ private: /******************************************************************/ class TSFStaticSink final : public ITfActiveLanguageProfileNotifySink - , public ITfInputProcessorProfileActivationSink + , public ITfInputProcessorProfileActivationSink { public: static TSFStaticSink* GetInstance() diff --git a/widget/windows/nsTextStore.h b/widget/windows/nsTextStore.h index fcd1a9315f..06b61a5a08 100644 --- a/widget/windows/nsTextStore.h +++ b/widget/windows/nsTextStore.h @@ -54,8 +54,8 @@ struct MSGResult; */ class nsTextStore final : public ITextStoreACP - , public ITfContextOwnerCompositionSink - , public ITfMouseTrackerACP + , public ITfContextOwnerCompositionSink + , public ITfMouseTrackerACP { public: /*IUnknown*/ STDMETHODIMP QueryInterface(REFIID, void**); diff --git a/xpcom/base/nsIStatusReporter.idl b/xpcom/base/nsIStatusReporter.idl index e85632d90f..9f9245f498 100644 --- a/xpcom/base/nsIStatusReporter.idl +++ b/xpcom/base/nsIStatusReporter.idl @@ -65,15 +65,15 @@ interface nsIStatusReporterManager : nsISupports * Note that this defaults 'process' to "", which is usually what's desired. */ #define NS_STATUS_REPORTER_IMPLEMENT(_classname, _name, _desc_Function) \ - class StatusReporter_##_classname final : public nsIStatusReporter { \ + class StatusReporter_##_classname final : public nsIStatusReporter { \ ~StatusReporter_##_classname() {} \ public: \ NS_DECL_ISUPPORTS \ - NS_IMETHOD GetName(nsACString &name) override \ + NS_IMETHOD GetName(nsACString &name) override \ { name.AssignLiteral(_name); return NS_OK; } \ - NS_IMETHOD GetProcess(nsACString &process) override \ + NS_IMETHOD GetProcess(nsACString &process) override \ { process.Truncate(); return NS_OK; } \ - NS_IMETHOD GetDescription(nsACString &desc) override \ + NS_IMETHOD GetDescription(nsACString &desc) override \ { _desc_Function(desc); return NS_OK; } \ }; \ NS_IMPL_ISUPPORTS(StatusReporter_##_classname, nsIStatusReporter) diff --git a/xpcom/glue/nsCycleCollectionParticipant.h b/xpcom/glue/nsCycleCollectionParticipant.h index 4c6f66842f..128cf0138c 100644 --- a/xpcom/glue/nsCycleCollectionParticipant.h +++ b/xpcom/glue/nsCycleCollectionParticipant.h @@ -267,7 +267,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsXPCOMCycleCollectionParticipant, } \ nsresult rv; -#define NS_CYCLE_COLLECTION_UPCAST(obj, clazz) \ +#define NS_CYCLE_COLLECTION_UPCAST(obj, clazz) \ NS_CYCLE_COLLECTION_CLASSNAME(clazz)::Upcast(obj) #ifdef DEBUG @@ -508,8 +508,8 @@ DowncastCCParticipant(void* aPtr) #define NS_DECL_CYCLE_COLLECTION_CLASS_BODY_NO_UNLINK(_class, _base) \ public: \ NS_IMETHOD Traverse(void *p, nsCycleCollectionTraversalCallback &cb) \ - override; \ - NS_IMETHOD_(void) DeleteCycleCollectable(void *p) override \ + override; \ + NS_IMETHOD_(void) DeleteCycleCollectable(void *p) override \ { \ DowncastCCParticipant<_class>(p)->DeleteCycleCollectable(); \ } \ @@ -574,9 +574,9 @@ public: : nsXPCOMCycleCollectionParticipant(true) {} \ private: \ NS_DECL_CYCLE_COLLECTION_CLASS_BODY(_class, _base) \ - NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ - NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ - NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ + NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ NS_IMPL_GET_XPCOM_CYCLE_COLLECTION_PARTICIPANT(_class) \ }; \ NS_CHECK_FOR_RIGHT_PARTICIPANT_IMPL(_class) \ @@ -591,8 +591,7 @@ class NS_CYCLE_COLLECTION_INNERCLASS : public nsXPCOMCycleCollectionParticipant \ { \ NS_DECL_CYCLE_COLLECTION_CLASS_BODY(_class, _base) \ - NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) \ - override; \ + NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) override; \ NS_IMPL_GET_XPCOM_CYCLE_COLLECTION_PARTICIPANT(_class) \ }; \ NS_CHECK_FOR_RIGHT_PARTICIPANT_IMPL(_class) \ @@ -608,10 +607,10 @@ public: : nsXPCOMCycleCollectionParticipant(true) {} \ private: \ NS_DECL_CYCLE_COLLECTION_CLASS_BODY(_class, _base) \ - NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) override; \ - NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ - NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ - NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ + NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) override; \ + NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ + NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ NS_IMPL_GET_XPCOM_CYCLE_COLLECTION_PARTICIPANT(_class) \ }; \ NS_CHECK_FOR_RIGHT_PARTICIPANT_IMPL(_class) \ @@ -627,10 +626,10 @@ class NS_CYCLE_COLLECTION_INNERCLASS : public NS_CYCLE_COLLECTION_CLASSNAME(_base_class) \ { \ NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_BODY(_class, _base_class) \ - NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) override; \ - NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ - NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ - NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ + NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) override; \ + NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ + NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ NS_IMPL_GET_XPCOM_CYCLE_COLLECTION_PARTICIPANT(_class) \ }; \ NS_CHECK_FOR_RIGHT_PARTICIPANT_IMPL_INHERITED(_class) \ @@ -643,7 +642,7 @@ static NS_CYCLE_COLLECTION_INNERCLASS NS_CYCLE_COLLECTION_INNERNAME; _base_class) \ public: \ NS_IMETHOD Traverse(void *p, nsCycleCollectionTraversalCallback &cb) \ - override; \ + override; \ static _class* Downcast(nsISupports* s) \ { \ return static_cast<_class*>(static_cast<_base_class*>( \ @@ -684,7 +683,7 @@ class NS_CYCLE_COLLECTION_INNERCLASS { \ NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_BODY(_class, _base_class) \ NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) \ - override; \ + override; \ NS_IMPL_GET_XPCOM_CYCLE_COLLECTION_PARTICIPANT(_class) \ }; \ NS_CHECK_FOR_RIGHT_PARTICIPANT_IMPL_INHERITED(_class) \ @@ -694,12 +693,12 @@ static NS_CYCLE_COLLECTION_INNERCLASS NS_CYCLE_COLLECTION_INNERNAME; #define NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS_BODY(_class) \ public: \ - NS_IMETHOD_(void) Root(void *n) override; \ - NS_IMETHOD_(void) Unlink(void *n) override; \ - NS_IMETHOD_(void) Unroot(void *n) override; \ + NS_IMETHOD_(void) Root(void *n) override; \ + NS_IMETHOD_(void) Unlink(void *n) override; \ + NS_IMETHOD_(void) Unroot(void *n) override; \ NS_IMETHOD Traverse(void *n, nsCycleCollectionTraversalCallback &cb) \ - override; \ - NS_IMETHOD_(void) DeleteCycleCollectable(void *n) override \ + override; \ + NS_IMETHOD_(void) DeleteCycleCollectable(void *n) override \ { \ DowncastCCParticipant<_class>(n)->DeleteCycleCollectable(); \ } \ @@ -741,9 +740,9 @@ static NS_CYCLE_COLLECTION_INNERCLASS NS_CYCLE_COLLECTION_INNERNAME; : nsCycleCollectionParticipant(true) {} \ private: \ NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS_BODY(_class) \ - NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override;\ - NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ - NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ + NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ static nsCycleCollectionParticipant* GetParticipant() \ { \ return &_class::NS_CYCLE_COLLECTION_INNERNAME; \ @@ -760,9 +759,9 @@ public: \ : nsCycleCollectionParticipant(true) {} \ private: \ NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS_BODY(_class) \ - NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ - NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ - NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipReal(void *p, bool aRemovingAllowed) override; \ + NS_IMETHOD_(bool) CanSkipInCCReal(void *p) override; \ + NS_IMETHOD_(bool) CanSkipThisReal(void *p) override; \ static nsCycleCollectionParticipant* GetParticipant() \ { \ return &_class::NS_CYCLE_COLLECTION_INNERNAME; \ @@ -780,7 +779,7 @@ static NS_CYCLE_COLLECTION_INNERCLASS NS_CYCLE_COLLECTION_INNERNAME; { \ NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS_BODY(_class) \ NS_IMETHOD_(void) Trace(void *p, const TraceCallbacks &cb, void *closure) \ - override; \ + override; \ static MOZ_CONSTEXPR nsScriptObjectTracer* GetParticipant() \ { \ return &_class::NS_CYCLE_COLLECTION_INNERNAME; \ diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h index 0d4ed02f57..c58a6c3337 100644 --- a/xpcom/glue/nsISupportsImpl.h +++ b/xpcom/glue/nsISupportsImpl.h @@ -376,9 +376,9 @@ private: #define NS_DECL_ISUPPORTS \ public: \ NS_IMETHOD QueryInterface(REFNSIID aIID, \ - void** aInstancePtr) override; \ - NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \ - NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \ + void** aInstancePtr) override; \ + NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \ + NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \ protected: \ nsAutoRefCnt mRefCnt; \ NS_DECL_OWNINGTHREAD \ @@ -387,9 +387,9 @@ public: #define NS_DECL_THREADSAFE_ISUPPORTS \ public: \ NS_IMETHOD QueryInterface(REFNSIID aIID, \ - void** aInstancePtr) override; \ - NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \ - NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \ + void** aInstancePtr) override; \ + NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \ + NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \ protected: \ ::mozilla::ThreadSafeAutoRefCnt mRefCnt; \ NS_DECL_OWNINGTHREAD \ @@ -398,9 +398,9 @@ public: #define NS_DECL_CYCLE_COLLECTING_ISUPPORTS \ public: \ NS_IMETHOD QueryInterface(REFNSIID aIID, \ - void** aInstancePtr) override; \ - NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \ - NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \ + void** aInstancePtr) override; \ + NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \ + NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \ NS_IMETHOD_(void) DeleteCycleCollectable(void); \ protected: \ nsCycleCollectingAutoRefCnt mRefCnt; \ diff --git a/xpcom/io/SnappyCompressOutputStream.h b/xpcom/io/SnappyCompressOutputStream.h index 98f51c544e..36c47e66e3 100644 --- a/xpcom/io/SnappyCompressOutputStream.h +++ b/xpcom/io/SnappyCompressOutputStream.h @@ -17,7 +17,7 @@ namespace mozilla { class SnappyCompressOutputStream final : public nsIOutputStream - , protected detail::SnappyFrameUtils + , protected detail::SnappyFrameUtils { public: // Maximum compression block size. diff --git a/xpcom/io/SnappyUncompressInputStream.h b/xpcom/io/SnappyUncompressInputStream.h index 60e4afdd34..0d24c0d115 100644 --- a/xpcom/io/SnappyUncompressInputStream.h +++ b/xpcom/io/SnappyUncompressInputStream.h @@ -17,7 +17,7 @@ namespace mozilla { class SnappyUncompressInputStream final : public nsIInputStream - , protected detail::SnappyFrameUtils + , protected detail::SnappyFrameUtils { public: // Construct a new blocking stream to uncompress the given base stream. The diff --git a/xpcom/tests/TestCallTemplates.cpp b/xpcom/tests/TestCallTemplates.cpp index 65d46a0e10..9d55ecad1e 100644 --- a/xpcom/tests/TestCallTemplates.cpp +++ b/xpcom/tests/TestCallTemplates.cpp @@ -34,7 +34,7 @@ class NS_NO_VTABLE nsITestService : public nsISupports { NS_DEFINE_STATIC_IID_ACCESSOR(nsITestService, NS_ITESTSERVICE_IID) class nsTestService final : public nsITestService, - public nsSupportsWeakReference + public nsSupportsWeakReference { ~nsTestService() {} public: diff --git a/xpcom/tests/TestObserverService.cpp b/xpcom/tests/TestObserverService.cpp index 374868526a..213d116bf5 100644 --- a/xpcom/tests/TestObserverService.cpp +++ b/xpcom/tests/TestObserverService.cpp @@ -31,7 +31,7 @@ void printString(nsString &str) { } class TestObserver final : public nsIObserver, - public nsSupportsWeakReference + public nsSupportsWeakReference { public: explicit TestObserver( const nsAString &name ) diff --git a/xpfe/appshell/nsAppShellService.cpp b/xpfe/appshell/nsAppShellService.cpp index 1416a1367c..7b5e83379e 100644 --- a/xpfe/appshell/nsAppShellService.cpp +++ b/xpfe/appshell/nsAppShellService.cpp @@ -322,7 +322,8 @@ WebBrowserChrome2Stub::GetInterface(const nsIID & aIID, void **aSink) // purely to keep a strong reference to the browser and the container to // prevent the container being collected while the stub remains alive. class WindowlessBrowserStub final : public nsIWebNavigation, - public nsIInterfaceRequestor { + public nsIInterfaceRequestor +{ public: WindowlessBrowserStub(nsIWebBrowser *aBrowser, nsISupports *aContainer) { mBrowser = aBrowser; diff --git a/xpfe/appshell/nsAppShellService.h b/xpfe/appshell/nsAppShellService.h index 9afca13f0f..389b1a75ab 100644 --- a/xpfe/appshell/nsAppShellService.h +++ b/xpfe/appshell/nsAppShellService.h @@ -21,7 +21,7 @@ { 0x99907d, 0x123c, 0x4853, { 0xa4, 0x6a, 0x43, 0x9, 0x8b, 0x5f, 0xb6, 0x8c } } class nsAppShellService final : public nsIAppShellService, - public nsIObserver + public nsIObserver { public: NS_DECL_ISUPPORTS diff --git a/xpfe/appshell/nsContentTreeOwner.h b/xpfe/appshell/nsContentTreeOwner.h index dcad42617f..d6a0d42b3d 100644 --- a/xpfe/appshell/nsContentTreeOwner.h +++ b/xpfe/appshell/nsContentTreeOwner.h @@ -23,10 +23,10 @@ class nsXULWindow; class nsSiteWindow; class nsContentTreeOwner final : public nsIDocShellTreeOwner, - public nsIBaseWindow, - public nsIInterfaceRequestor, - public nsIWebBrowserChrome3, - public nsIWindowProvider + public nsIBaseWindow, + public nsIInterfaceRequestor, + public nsIWebBrowserChrome3, + public nsIWindowProvider { friend class nsXULWindow; friend class nsSiteWindow; diff --git a/xpfe/appshell/nsWebShellWindow.h b/xpfe/appshell/nsWebShellWindow.h index 8ae2f20196..65e1d3d3d1 100644 --- a/xpfe/appshell/nsWebShellWindow.h +++ b/xpfe/appshell/nsWebShellWindow.h @@ -24,8 +24,8 @@ class WebShellWindowTimerCallback; } // namespace mozilla class nsWebShellWindow final : public nsXULWindow, - public nsIWebProgressListener, - public nsIWidgetListener + public nsIWebProgressListener, + public nsIWidgetListener { public: explicit nsWebShellWindow(uint32_t aChromeFlags); diff --git a/xpfe/components/directory/nsDirectoryViewer.h b/xpfe/components/directory/nsDirectoryViewer.h index dea0b0318a..4a3b5eb601 100644 --- a/xpfe/components/directory/nsDirectoryViewer.h +++ b/xpfe/components/directory/nsDirectoryViewer.h @@ -35,11 +35,11 @@ protected: }; class nsHTTPIndex final : public nsIHTTPIndex, - public nsIRDFDataSource, - public nsIStreamListener, - public nsIDirIndexListener, - public nsIInterfaceRequestor, - public nsIFTPEventSink + public nsIRDFDataSource, + public nsIStreamListener, + public nsIDirIndexListener, + public nsIInterfaceRequestor, + public nsIFTPEventSink { private: diff --git a/xpfe/components/windowds/nsWindowDataSource.h b/xpfe/components/windowds/nsWindowDataSource.h index f499c9bef6..351ff951b1 100644 --- a/xpfe/components/windowds/nsWindowDataSource.h +++ b/xpfe/components/windowds/nsWindowDataSource.h @@ -21,9 +21,9 @@ class nsWindowDataSource final : public nsIRDFDataSource, - public nsIObserver, - public nsIWindowMediatorListener, - public nsIWindowDataSource + public nsIObserver, + public nsIWindowMediatorListener, + public nsIWindowDataSource { public: nsWindowDataSource() { }