diff --git a/accessible/windows/msaa/AccessibleWrap.h b/accessible/windows/msaa/AccessibleWrap.h index 1bbd4a7b31..cbf0c75c60 100644 --- a/accessible/windows/msaa/AccessibleWrap.h +++ b/accessible/windows/msaa/AccessibleWrap.h @@ -215,6 +215,7 @@ WrapperFor(ProxyAccessible* aProxy) { return reinterpret_cast(aProxy->GetWrapper()); } + } // namespace a11y } // namespace mozilla diff --git a/caps/DomainPolicy.h b/caps/DomainPolicy.h index eea89d476f..fcd31f2784 100644 --- a/caps/DomainPolicy.h +++ b/caps/DomainPolicy.h @@ -19,7 +19,7 @@ class nsIContentParent; namespace ipc { class URIParams; -}; +} // namespace ipc enum DomainSetChangeType{ ACTIVATE_POLICY, diff --git a/chrome/RegistryMessageUtils.h b/chrome/RegistryMessageUtils.h index 72b3243dbb..1f8879cdbf 100644 --- a/chrome/RegistryMessageUtils.h +++ b/chrome/RegistryMessageUtils.h @@ -197,6 +197,6 @@ struct ParamTraits } }; -} +} // namespace IPC #endif // RegistryMessageUtils_h diff --git a/chrome/nsChromeRegistryChrome.h b/chrome/nsChromeRegistryChrome.h index b10e50416c..553c4e2917 100644 --- a/chrome/nsChromeRegistryChrome.h +++ b/chrome/nsChromeRegistryChrome.h @@ -15,8 +15,8 @@ namespace mozilla { namespace dom { class PContentParent; -} -} +} // namespace dom +} // namespace mozilla class nsIPrefBranch; struct ChromePackage; diff --git a/docshell/base/IHistory.h b/docshell/base/IHistory.h index bdaa85238a..9d144f324a 100644 --- a/docshell/base/IHistory.h +++ b/docshell/base/IHistory.h @@ -16,7 +16,7 @@ namespace mozilla { namespace dom { class Link; -} +} // namespace dom // 0057c9d3-b98e-4933-bdc5-0275d06705e1 #define IHISTORY_IID \ diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index f537056ec6..7c7613001b 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -8486,7 +8486,8 @@ private: mRestorePresentationEvent; nsRefPtr mEvent; }; -} + +} // namespace nsresult nsDocShell::RestoreFromHistory() @@ -9526,7 +9527,7 @@ CopyFavicon(nsIURI* aOldURI, nsIURI* aNewURI, bool aInPrivateBrowsing) #endif } -} // anonymous namespace +} // namespace class InternalLoadEvent : public nsRunnable { diff --git a/dom/alarm/AlarmHalService.cpp b/dom/alarm/AlarmHalService.cpp index 47b4c57a72..73afb8613a 100644 --- a/dom/alarm/AlarmHalService.cpp +++ b/dom/alarm/AlarmHalService.cpp @@ -95,6 +95,6 @@ AlarmHalService::Notify( aSystemTimezoneChangeInfo.newTimezoneOffsetMinutes()); } -} // alarm -} // dom -} // mozilla +} // namespace alarm +} // namespace dom +} // namespace mozilla diff --git a/dom/asmjscache/AsmJSCache.cpp b/dom/asmjscache/AsmJSCache.cpp index dbe07f4413..736c58786f 100644 --- a/dom/asmjscache/AsmJSCache.cpp +++ b/dom/asmjscache/AsmJSCache.cpp @@ -1594,7 +1594,7 @@ OpenFile(nsIPrincipal* aPrincipal, return JS::AsmJSCache_Success; } -} // anonymous namespace +} // namespace typedef uint32_t AsmJSCookieType; static const uint32_t sAsmJSCookie = 0x600d600d; diff --git a/dom/asmjscache/AsmJSCache.h b/dom/asmjscache/AsmJSCache.h index dd8fdc5099..8221852b27 100644 --- a/dom/asmjscache/AsmJSCache.h +++ b/dom/asmjscache/AsmJSCache.h @@ -19,7 +19,7 @@ namespace dom { namespace quota { class Client; -} +} // namespace quota namespace asmjscache { diff --git a/dom/base/AnonymousContent.cpp b/dom/base/AnonymousContent.cpp index 69878bd055..529c3150a9 100644 --- a/dom/base/AnonymousContent.cpp +++ b/dom/base/AnonymousContent.cpp @@ -137,5 +137,5 @@ AnonymousContent::WrapObject(JSContext* aCx, return AnonymousContentBinding::Wrap(aCx, this, aGivenProto, aReflector); } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/base/AnonymousContent.h b/dom/base/AnonymousContent.h index d568bb30b7..497907286f 100644 --- a/dom/base/AnonymousContent.h +++ b/dom/base/AnonymousContent.h @@ -58,7 +58,7 @@ private: nsCOMPtr mContentNode; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_AnonymousContent_h diff --git a/dom/base/BlobSet.h b/dom/base/BlobSet.h index 198e80850b..40a9a35ae8 100644 --- a/dom/base/BlobSet.h +++ b/dom/base/BlobSet.h @@ -82,7 +82,7 @@ protected: uint64_t mDataBufferLen; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_BlobSet_h diff --git a/dom/base/ChildIterator.cpp b/dom/base/ChildIterator.cpp index 2f2fd99376..28da46f764 100644 --- a/dom/base/ChildIterator.cpp +++ b/dom/base/ChildIterator.cpp @@ -345,5 +345,6 @@ AllChildrenIterator::GetNextChild() return nullptr; } + } // namespace dom } // namespace mozilla diff --git a/dom/base/Console.h b/dom/base/Console.h index 0c0a356382..3e449f2a45 100644 --- a/dom/base/Console.h +++ b/dom/base/Console.h @@ -207,7 +207,7 @@ private: friend class ConsoleProfileRunnable; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif /* mozilla_dom_Console_h */ diff --git a/dom/base/DOMMatrix.h b/dom/base/DOMMatrix.h index 7802f17fb6..5085df73e9 100644 --- a/dom/base/DOMMatrix.h +++ b/dom/base/DOMMatrix.h @@ -247,7 +247,7 @@ private: void Ensure3DMatrix(); }; -} -} +} // namespace dom +} // namespace mozilla #endif /*MOZILLA_DOM_DOMMATRIX_H_*/ diff --git a/dom/base/DOMPoint.h b/dom/base/DOMPoint.h index d9213293b0..9634c5713b 100644 --- a/dom/base/DOMPoint.h +++ b/dom/base/DOMPoint.h @@ -72,7 +72,7 @@ public: void SetW(double aW) { mW = aW; } }; -} -} +} // namespace dom +} // namespace mozilla #endif /*MOZILLA_DOMPOINT_H_*/ diff --git a/dom/base/DOMQuad.h b/dom/base/DOMQuad.h index 9fcb1412cb..ff2a93d3a8 100644 --- a/dom/base/DOMQuad.h +++ b/dom/base/DOMQuad.h @@ -64,7 +64,7 @@ protected: mutable nsRefPtr mBounds; // allocated lazily }; -} -} +} // namespace dom +} // namespace mozilla #endif /*MOZILLA_DOMRECT_H_*/ diff --git a/dom/base/DOMRect.h b/dom/base/DOMRect.h index d0e94e54a1..7f0a659f98 100644 --- a/dom/base/DOMRect.h +++ b/dom/base/DOMRect.h @@ -209,8 +209,7 @@ protected: nsCOMPtr mParent; }; -} - -} +} // namespace dom +} // namespace mozilla #endif /*MOZILLA_DOMRECT_H_*/ diff --git a/dom/base/ElementInlines.h b/dom/base/ElementInlines.h index 8e0e6194be..c921d355fa 100644 --- a/dom/base/ElementInlines.h +++ b/dom/base/ElementInlines.h @@ -25,7 +25,7 @@ Element::UnregisterActivityObserver() OwnerDoc()->UnregisterActivityObserver(this); } -} -} +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_ElementInlines_h diff --git a/dom/base/File.cpp b/dom/base/File.cpp index dfd05f746c..887546d2d1 100644 --- a/dom/base/File.cpp +++ b/dom/base/File.cpp @@ -1321,5 +1321,5 @@ BlobSet::AppendBlobImpls(const nsTArray>& aBlobImpls) return NS_OK; } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/base/File.h b/dom/base/File.h index ad704a007c..1859f8ff21 100644 --- a/dom/base/File.h +++ b/dom/base/File.h @@ -43,7 +43,7 @@ namespace dom { namespace indexedDB { class FileInfo; -}; +} // namespace indexedDB struct BlobPropertyBag; struct ChromeFilePropertyBag; @@ -890,7 +890,7 @@ private: nsISupports *mParent; }; -} // dom namespace -} // file namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_File_h diff --git a/dom/base/FragmentOrElement.cpp b/dom/base/FragmentOrElement.cpp index 853dba2116..8578a1e674 100644 --- a/dom/base/FragmentOrElement.cpp +++ b/dom/base/FragmentOrElement.cpp @@ -2336,7 +2336,7 @@ private: uint32_t mLength; }; -} // anonymous namespace +} // namespace static void AppendEncodedCharacters(const nsTextFragment* aText, StringBuilder& aBuilder) diff --git a/dom/base/FragmentOrElement.h b/dom/base/FragmentOrElement.h index 0e24f2e776..3f938d5e0a 100644 --- a/dom/base/FragmentOrElement.h +++ b/dom/base/FragmentOrElement.h @@ -35,8 +35,8 @@ class nsIURI; namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla /** * Class that implements the nsIDOMNodeList interface (a list of children of diff --git a/dom/base/ImageEncoder.h b/dom/base/ImageEncoder.h index 65965ad059..528977c8de 100644 --- a/dom/base/ImageEncoder.h +++ b/dom/base/ImageEncoder.h @@ -20,7 +20,7 @@ namespace mozilla { namespace layers { class Image; -} +} // namespace layers namespace dom { diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 2fe99c1903..203ec5ba30 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -743,7 +743,7 @@ VibrateWindowListener::RemoveListener() true /* use capture */); } -} // anonymous namespace +} // namespace void Navigator::AddIdleObserver(MozIdleObserver& aIdleObserver, ErrorResult& aRv) diff --git a/dom/base/Navigator.h b/dom/base/Navigator.h index 02821bd19b..1a5bd75893 100644 --- a/dom/base/Navigator.h +++ b/dom/base/Navigator.h @@ -38,8 +38,8 @@ class WakeLock; class ArrayBufferViewOrBlobOrStringOrFormData; struct MobileIdOptions; class ServiceWorkerContainer; -} -} +} // namespace dom +} // namespace mozilla #ifdef MOZ_B2G_RIL class nsIDOMMozIccManager; @@ -76,7 +76,7 @@ class MozGetUserMediaDevicesSuccessCallback; namespace network { class Connection; -} // namespace Connection; +} // namespace network #ifdef MOZ_B2G_BT namespace bluetooth { diff --git a/dom/base/ShadowRoot.h b/dom/base/ShadowRoot.h index ae7104fe3e..2217f62ea3 100644 --- a/dom/base/ShadowRoot.h +++ b/dom/base/ShadowRoot.h @@ -28,8 +28,8 @@ class HTMLContentElement; class HTMLShadowElement; class ShadowRootStyleSheetList; -class ShadowRoot : public DocumentFragment, - public nsStubMutationObserver +class ShadowRoot final : public DocumentFragment, + public nsStubMutationObserver { friend class ShadowRootStyleSheetList; public: diff --git a/dom/base/URL.cpp b/dom/base/URL.cpp index 2c6a10c93a..285f6184d8 100644 --- a/dom/base/URL.cpp +++ b/dom/base/URL.cpp @@ -546,5 +546,5 @@ URL::CreateSearchParamsIfNeeded() } } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/base/URL.h b/dom/base/URL.h index ff5f3ae590..bd160abff4 100644 --- a/dom/base/URL.h +++ b/dom/base/URL.h @@ -30,7 +30,7 @@ struct objectURLOptions; namespace workers { class URLProxy; -} +} // namespace workers class URL final : public URLSearchParamsObserver { @@ -158,7 +158,7 @@ private: bool IsChromeURI(nsIURI* aURI); -} -} +} // namespace dom +} // namespace mozilla #endif /* URL_h___ */ diff --git a/dom/base/URLSearchParams.cpp b/dom/base/URLSearchParams.cpp index 11b9d4d549..8f67d82f92 100644 --- a/dom/base/URLSearchParams.cpp +++ b/dom/base/URLSearchParams.cpp @@ -357,7 +357,7 @@ void SerializeString(const nsCString& aInput, nsAString& aValue) } } -} // anonymous namespace +} // namespace void URLSearchParams::Serialize(nsAString& aValue) const diff --git a/dom/base/WebSocket.cpp b/dom/base/WebSocket.cpp index 68a326cca9..63e3553f14 100644 --- a/dom/base/WebSocket.cpp +++ b/dom/base/WebSocket.cpp @@ -314,7 +314,7 @@ private: nsresult mRv; }; -} // anonymous namespace +} // namespace nsresult WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI, @@ -488,7 +488,7 @@ private: const nsCString mReasonString; }; -} // anonymous namespace +} // namespace nsresult WebSocketImpl::CloseConnection(uint16_t aReasonCode, @@ -628,7 +628,7 @@ private: WebSocketImpl* mImpl; }; -} // anonymous namespace +} // namespace nsresult WebSocketImpl::Disconnect() @@ -1181,7 +1181,7 @@ private: ErrorResult& mRv; }; -} // anonymous namespace +} // namespace already_AddRefed WebSocket::Constructor(const GlobalObject& aGlobal, @@ -2122,7 +2122,7 @@ private: WebSocketImpl* mWebSocketImpl; }; -} // anonymous namespace +} // namespace void WebSocketImpl::AddRefObject() @@ -2553,7 +2553,7 @@ private: nsRefPtr mImpl; }; -} // anonymous namespace +} // namespace // Window closed, stop/reload button pressed, user navigated away from page, etc. NS_IMETHODIMP @@ -2724,7 +2724,7 @@ private: nsCOMPtr mEvent; }; -} // anonymous namespace +} // namespace NS_IMETHODIMP WebSocketImpl::Dispatch(nsIRunnable* aEvent, uint32_t aFlags) @@ -2776,5 +2776,5 @@ WebSocket::AssertIsOnTargetThread() const MOZ_ASSERT(NS_IsMainThread() == mIsMainThread); } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/base/mozFlushType.h b/dom/base/mozFlushType.h index 6129412302..b837a8dbda 100644 --- a/dom/base/mozFlushType.h +++ b/dom/base/mozFlushType.h @@ -40,5 +40,6 @@ struct ChangesToFlush { bool mFlushAnimations; }; -} +} // namespace mozilla + #endif /* mozFlushType_h___ */ diff --git a/dom/base/nsAttrValue.h b/dom/base/nsAttrValue.h index 3bf1151baf..6863b60897 100644 --- a/dom/base/nsAttrValue.h +++ b/dom/base/nsAttrValue.h @@ -34,8 +34,8 @@ namespace css { class StyleRule; struct URLValue; struct ImageValue; -} -} +} // namespace css +} // namespace mozilla #define NS_ATTRVALUE_MAX_STRINGLENGTH_ATOM 12 diff --git a/dom/base/nsCCUncollectableMarker.h b/dom/base/nsCCUncollectableMarker.h index da8074de53..3d6337b6bb 100644 --- a/dom/base/nsCCUncollectableMarker.h +++ b/dom/base/nsCCUncollectableMarker.h @@ -44,7 +44,7 @@ private: namespace mozilla { namespace dom { void TraceBlackJS(JSTracer* aTrc, uint32_t aGCNumber, bool aIsShutdownGC); -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/base/nsContentAreaDragDrop.h b/dom/base/nsContentAreaDragDrop.h index 091502e575..98e6788ed1 100644 --- a/dom/base/nsContentAreaDragDrop.h +++ b/dom/base/nsContentAreaDragDrop.h @@ -25,8 +25,8 @@ class nsISimpleEnumerator; namespace mozilla { namespace dom { class DataTransfer; -} -} +} // namespace dom +} // namespace mozilla // // class nsContentAreaDragDrop, used to generate the dragdata diff --git a/dom/base/nsContentList.h b/dom/base/nsContentList.h index 27bc13fae8..655dca4f0c 100644 --- a/dom/base/nsContentList.h +++ b/dom/base/nsContentList.h @@ -32,8 +32,8 @@ namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla class nsBaseContentList : public nsINodeList diff --git a/dom/base/nsContentPermissionHelper.h b/dom/base/nsContentPermissionHelper.h index e3368e836d..b3b66e0ad9 100644 --- a/dom/base/nsContentPermissionHelper.h +++ b/dom/base/nsContentPermissionHelper.h @@ -25,7 +25,7 @@ class nsContentPermissionRequestProxy; // That will mess up windows build. namespace IPC { class Principal; -} +} // namespace IPC namespace mozilla { namespace dom { diff --git a/dom/base/nsContentSink.h b/dom/base/nsContentSink.h index 4339b6eeb9..8ffa209241 100644 --- a/dom/base/nsContentSink.h +++ b/dom/base/nsContentSink.h @@ -43,8 +43,8 @@ class nsIApplicationCache; namespace mozilla { namespace css { class Loader; -} -} +} // namespace css +} // namespace mozilla #ifdef DEBUG diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index 9e46f22f43..bb2d7761ea 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -431,7 +431,7 @@ private: nsCString mCharset; }; -} // anonymous namespace +} // namespace /* static */ TimeDuration @@ -1982,9 +1982,9 @@ namespace dom { namespace workers { extern bool IsCurrentThreadRunningChromeWorker(); extern JSContext* GetCurrentThreadJSContext(); -} -} -} +} // namespace workers +} // namespace dom +} // namespace mozilla bool nsContentUtils::ThreadsafeIsCallerChrome() diff --git a/dom/base/nsDOMAttributeMap.h b/dom/base/nsDOMAttributeMap.h index 590af229aa..e3fed748c9 100644 --- a/dom/base/nsDOMAttributeMap.h +++ b/dom/base/nsDOMAttributeMap.h @@ -82,8 +82,8 @@ private: }; // Helper class that implements the nsIDOMMozNamedAttrMap interface. -class nsDOMAttributeMap : public nsIDOMMozNamedAttrMap - , public nsWrapperCache +class nsDOMAttributeMap final : public nsIDOMMozNamedAttrMap + , public nsWrapperCache { public: typedef mozilla::dom::Attr Attr; diff --git a/dom/base/nsDOMCaretPosition.h b/dom/base/nsDOMCaretPosition.h index 1e31c1966d..406c316c71 100644 --- a/dom/base/nsDOMCaretPosition.h +++ b/dom/base/nsDOMCaretPosition.h @@ -13,8 +13,8 @@ namespace mozilla { namespace dom { class DOMRect; -} -} +} // namespace dom +} // namespace mozilla /** * Implementation of a DOM Caret Position, which is a node and offset within diff --git a/dom/base/nsDOMDataChannel.h b/dom/base/nsDOMDataChannel.h index 8e4add68c2..3cadcab338 100644 --- a/dom/base/nsDOMDataChannel.h +++ b/dom/base/nsDOMDataChannel.h @@ -24,9 +24,9 @@ class File; class DataChannel; }; -class nsDOMDataChannel : public mozilla::DOMEventTargetHelper, - public nsIDOMDataChannel, - public mozilla::DataChannelListener +class nsDOMDataChannel final : public mozilla::DOMEventTargetHelper, + public nsIDOMDataChannel, + public mozilla::DataChannelListener { public: nsDOMDataChannel(already_AddRefed& aDataChannel, diff --git a/dom/base/nsDOMFileReader.h b/dom/base/nsDOMFileReader.h index 0ba5d94fc9..92fb59e503 100644 --- a/dom/base/nsDOMFileReader.h +++ b/dom/base/nsDOMFileReader.h @@ -30,10 +30,10 @@ class File; } } -class nsDOMFileReader : public mozilla::dom::FileIOObject, - public nsIDOMFileReader, - public nsIInterfaceRequestor, - public nsSupportsWeakReference +class nsDOMFileReader final : public mozilla::dom::FileIOObject, + public nsIDOMFileReader, + public nsIInterfaceRequestor, + public nsSupportsWeakReference { typedef mozilla::ErrorResult ErrorResult; typedef mozilla::dom::GlobalObject GlobalObject; diff --git a/dom/base/nsDOMNavigationTiming.h b/dom/base/nsDOMNavigationTiming.h index 7ae592c59d..c84f974e98 100644 --- a/dom/base/nsDOMNavigationTiming.h +++ b/dom/base/nsDOMNavigationTiming.h @@ -23,9 +23,9 @@ static const nsDOMPerformanceNavigationType TYPE_NAVIGATE = 0; static const nsDOMPerformanceNavigationType TYPE_RELOAD = 1; static const nsDOMPerformanceNavigationType TYPE_BACK_FORWARD = 2; static const nsDOMPerformanceNavigationType TYPE_RESERVED = 255; -} -} -} +} // namespace PerformanceNavigation +} // namespace dom +} // namespace mozilla class nsDOMNavigationTiming final { diff --git a/dom/base/nsDOMWindowUtils.h b/dom/base/nsDOMWindowUtils.h index aa13a3bd4c..8c48099a8c 100644 --- a/dom/base/nsDOMWindowUtils.h +++ b/dom/base/nsDOMWindowUtils.h @@ -23,8 +23,8 @@ struct nsPoint; namespace mozilla { namespace layers { class LayerTransactionChild; - } -} + } // namespace layers +} // namespace mozilla class nsTranslationNodeList final : public nsITranslationNodeList { diff --git a/dom/base/nsDocument.cpp b/dom/base/nsDocument.cpp index fd43f3d139..d4b7135bfd 100644 --- a/dom/base/nsDocument.cpp +++ b/dom/base/nsDocument.cpp @@ -568,6 +568,7 @@ struct PositionComparator return 1; } }; + } // namespace bool @@ -5964,7 +5965,7 @@ public: NS_IMPL_ISUPPORTS(ProcessStackRunner, nsIRunnable); -} // anonymous namespace +} // namespace void nsDocument::EnqueueLifecycleCallback(nsIDocument::ElementCallbackType aType, @@ -9631,7 +9632,7 @@ struct SuppressArgs uint32_t mIncrease; }; -} +} // namespace static bool SuppressEventHandlingInDocument(nsIDocument* aDocument, void* aData) @@ -9869,7 +9870,7 @@ public: }; NS_IMPL_ISUPPORTS(StubCSSLoaderObserver, nsICSSLoaderObserver) -} +} // namespace void nsDocument::PreloadStyle(nsIURI* uri, const nsAString& charset, @@ -9926,7 +9927,7 @@ struct UnsuppressArgs nsTArray> mDocs; }; -} +} // namespace static bool GetAndUnsuppressSubDocuments(nsIDocument* aDocument, diff --git a/dom/base/nsFrameLoader.h b/dom/base/nsFrameLoader.h index 89c29fc287..a8f2b66c84 100644 --- a/dom/base/nsFrameLoader.h +++ b/dom/base/nsFrameLoader.h @@ -41,12 +41,12 @@ class ContentParent; class PBrowserParent; class TabParent; struct StructuredCloneData; -} +} // namespace dom namespace layout { class RenderFrameParent; -} -} +} // namespace layout +} // namespace mozilla #if defined(MOZ_WIDGET_GTK) typedef struct _GtkWidget GtkWidget; diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp index 39db28ee50..bd9e9cd888 100644 --- a/dom/base/nsFrameMessageManager.cpp +++ b/dom/base/nsFrameMessageManager.cpp @@ -1305,7 +1305,7 @@ struct MessageManagerReferentCount nsDataHashtable mMessageCounter; }; -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index 1b7dea8b69..07175f3202 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -569,8 +569,8 @@ namespace mozilla { namespace dom { extern uint64_t NextWindowID(); -} -} +} // namespace dom +} // namespace mozilla nsPIDOMWindow::nsPIDOMWindow(nsPIDOMWindow *aOuterWindow) : mFrameElement(nullptr), mDocShell(nullptr), mModalStateDepth(0), diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 2f5f6cfb1b..b61203ef18 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -267,7 +267,7 @@ CreateVoidVariant() // // We also use the same machinery for |returnValue|, which needs similar origin // checks. -class DialogValueHolder : public nsISupports +class DialogValueHolder final : public nsISupports { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS diff --git a/dom/base/nsHTMLContentSerializer.h b/dom/base/nsHTMLContentSerializer.h index bf70bb63c8..66bb719b76 100644 --- a/dom/base/nsHTMLContentSerializer.h +++ b/dom/base/nsHTMLContentSerializer.h @@ -20,7 +20,7 @@ class nsIContent; class nsIAtom; -class nsHTMLContentSerializer : public nsXHTMLContentSerializer { +class nsHTMLContentSerializer final : public nsXHTMLContentSerializer { public: nsHTMLContentSerializer(); virtual ~nsHTMLContentSerializer(); diff --git a/dom/base/nsHostObjectProtocolHandler.cpp b/dom/base/nsHostObjectProtocolHandler.cpp index aac33f9480..7a42c2e2c8 100644 --- a/dom/base/nsHostObjectProtocolHandler.cpp +++ b/dom/base/nsHostObjectProtocolHandler.cpp @@ -275,7 +275,7 @@ class BlobURLsReporter final : public nsIMemoryReporter NS_IMPL_ISUPPORTS(BlobURLsReporter, nsIMemoryReporter) -} +} // namespace mozilla void nsHostObjectProtocolHandler::Init(void) diff --git a/dom/base/nsHostObjectProtocolHandler.h b/dom/base/nsHostObjectProtocolHandler.h index 977e5e078f..e2f3f2e19c 100644 --- a/dom/base/nsHostObjectProtocolHandler.h +++ b/dom/base/nsHostObjectProtocolHandler.h @@ -25,8 +25,8 @@ class DOMMediaStream; namespace dom { class FileImpl; class MediaSource; -} -} +} // namespace dom +} // namespace mozilla class nsHostObjectProtocolHandler : public nsIProtocolHandler { diff --git a/dom/base/nsINode.cpp b/dom/base/nsINode.cpp index b5234dec9d..1cfeb06aff 100644 --- a/dom/base/nsINode.cpp +++ b/dom/base/nsINode.cpp @@ -2697,7 +2697,7 @@ struct SelectorMatchInfo { nsCSSSelectorList* const mSelectorList; TreeMatchContext& mMatchContext; }; -} +} // namespace // Given an id, find elements with that id under aRoot that match aMatchInfo if // any is provided. If no SelectorMatchInfo is provided, just find the ones diff --git a/dom/base/nsImageLoadingContent.cpp b/dom/base/nsImageLoadingContent.cpp index 2cc9b0faf3..b95376a37f 100644 --- a/dom/base/nsImageLoadingContent.cpp +++ b/dom/base/nsImageLoadingContent.cpp @@ -1317,7 +1317,7 @@ private: nsCOMPtr mRequest; }; -} // anonymous namespace +} // namespace void nsImageLoadingContent::MakePendingRequestCurrent() diff --git a/dom/base/nsJSUtils.h b/dom/base/nsJSUtils.h index 4679151c01..2748f52997 100644 --- a/dom/base/nsJSUtils.h +++ b/dom/base/nsJSUtils.h @@ -27,8 +27,8 @@ namespace mozilla { namespace dom { class AutoJSAPI; class Element; -} -} +} // namespace dom +} // namespace mozilla class nsJSUtils { diff --git a/dom/base/nsNodeInfoManager.h b/dom/base/nsNodeInfoManager.h index 224a2a1679..b30209e7a3 100644 --- a/dom/base/nsNodeInfoManager.h +++ b/dom/base/nsNodeInfoManager.h @@ -29,8 +29,8 @@ template struct already_AddRefed; namespace mozilla { namespace dom { class NodeInfo; -} -} +} // namespace dom +} // namespace mozilla class nsNodeInfoManager final { diff --git a/dom/base/nsObjectLoadingContent.h b/dom/base/nsObjectLoadingContent.h index c9b786eeb6..6f2288c1b7 100644 --- a/dom/base/nsObjectLoadingContent.h +++ b/dom/base/nsObjectLoadingContent.h @@ -35,8 +35,8 @@ namespace mozilla { namespace dom { template class Sequence; struct MozPluginParameter; -} -} +} // namespace dom +} // namespace mozilla class nsObjectLoadingContent : public nsImageLoadingContent , public nsIStreamListener diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index 1406b6c154..0764f2836b 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -38,11 +38,11 @@ namespace mozilla { namespace dom { class AudioContext; class Element; -} +} // namespace dom namespace gfx { class VRHMDInfo; -} -} +} // namespace gfx +} // namespace mozilla // Popup control state enum. The values in this enum must go from most // permissive to least permissive so that it's safe to push state in diff --git a/dom/base/nsPerformance.h b/dom/base/nsPerformance.h index 7ece91ba2e..a59d8778e7 100644 --- a/dom/base/nsPerformance.h +++ b/dom/base/nsPerformance.h @@ -24,8 +24,8 @@ namespace mozilla { class ErrorResult; namespace dom { class PerformanceEntry; -} -} +} // namespace dom +} // namespace mozilla // Script "performance.timing" object class nsPerformanceTiming final : public nsWrapperCache diff --git a/dom/base/nsScriptLoader.h b/dom/base/nsScriptLoader.h index 802ac5b1c8..cd67f378a8 100644 --- a/dom/base/nsScriptLoader.h +++ b/dom/base/nsScriptLoader.h @@ -24,13 +24,13 @@ class nsIURI; namespace JS { class SourceBufferHolder; -} +} // namespace JS namespace mozilla { namespace dom { class AutoJSAPI; -} -} +} // namespace dom +} // namespace mozilla ////////////////////////////////////////////////////////////// // Script loader implementation diff --git a/dom/base/nsStyledElement.h b/dom/base/nsStyledElement.h index 8892ccb40d..7bde2368ee 100644 --- a/dom/base/nsStyledElement.h +++ b/dom/base/nsStyledElement.h @@ -20,8 +20,8 @@ namespace mozilla { namespace css { class StyleRule; -} -} +} // namespace css +} // namespace mozilla typedef mozilla::dom::Element nsStyledElementBase; diff --git a/dom/base/nsTextFragment.cpp b/dom/base/nsTextFragment.cpp index f39d680de3..7c9bbd017b 100644 --- a/dom/base/nsTextFragment.cpp +++ b/dom/base/nsTextFragment.cpp @@ -167,8 +167,8 @@ FirstNon8BitUnvectorized(const char16_t *str, const char16_t *end) namespace mozilla { namespace SSE2 { int32_t FirstNon8Bit(const char16_t *str, const char16_t *end); - } -} + } // namespace SSE2 +} // namespace mozilla #endif /* diff --git a/dom/base/nsWindowRoot.h b/dom/base/nsWindowRoot.h index b5c107583a..58488df307 100644 --- a/dom/base/nsWindowRoot.h +++ b/dom/base/nsWindowRoot.h @@ -26,7 +26,7 @@ class EventChainPreVisitor; #include "nsTHashtable.h" #include "nsHashKeys.h" -class nsWindowRoot : public nsPIWindowRoot +class nsWindowRoot final : public nsPIWindowRoot { public: explicit nsWindowRoot(nsPIDOMWindow* aWindow); diff --git a/dom/bindings/BindingUtils.h b/dom/bindings/BindingUtils.h index 3a6bc956de..b1b1a1922d 100644 --- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -968,6 +968,7 @@ DoGetOrCreateDOMReflector(JSContext* cx, T* value, return JS_WrapValue(cx, rval); } + } // namespace binding_detail // Create a JSObject wrapping "value", if there isn't one already, and store it diff --git a/dom/bindings/ErrorIPCUtils.h b/dom/bindings/ErrorIPCUtils.h index c929949bc4..36352c11ee 100644 --- a/dom/bindings/ErrorIPCUtils.h +++ b/dom/bindings/ErrorIPCUtils.h @@ -65,6 +65,6 @@ struct ParamTraits } }; -} +} // namespace IPC #endif diff --git a/dom/bindings/ErrorResult.h b/dom/bindings/ErrorResult.h index 816f6b00df..bb4ee2d34c 100644 --- a/dom/bindings/ErrorResult.h +++ b/dom/bindings/ErrorResult.h @@ -22,7 +22,7 @@ namespace IPC { class Message; template struct ParamTraits; -} +} // namespace IPC namespace mozilla { diff --git a/dom/bindings/MozMap.h b/dom/bindings/MozMap.h index d303c664f3..6476f55259 100644 --- a/dom/bindings/MozMap.h +++ b/dom/bindings/MozMap.h @@ -41,6 +41,7 @@ public: DataType mData; }; + } // namespace binding_detail template diff --git a/dom/bluetooth/BluetoothHidManager.cpp b/dom/bluetooth/BluetoothHidManager.cpp index 3f08e09b14..75f4c7d21c 100644 --- a/dom/bluetooth/BluetoothHidManager.cpp +++ b/dom/bluetooth/BluetoothHidManager.cpp @@ -24,7 +24,7 @@ USING_BLUETOOTH_NAMESPACE namespace { StaticRefPtr sBluetoothHidManager; bool sInShutdown = false; -} // anonymous namespace +} // namespace NS_IMETHODIMP BluetoothHidManager::Observe(nsISupports* aSubject, diff --git a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp index 0fbb8fbd26..b4c8a958aa 100644 --- a/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/bluedroid/BluetoothA2dpManager.cpp @@ -32,7 +32,7 @@ namespace { bool sInShutdown = false; static BluetoothA2dpInterface* sBtA2dpInterface; static BluetoothAvrcpInterface* sBtAvrcpInterface; -} // anonymous namespace +} // namespace /* * This function maps attribute id and returns corresponding values diff --git a/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.cpp b/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.cpp index 00101e13cc..76a7b0c4d6 100644 --- a/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluedroid/hfp-fallback/BluetoothHfpManager.cpp @@ -18,7 +18,7 @@ USING_BLUETOOTH_NAMESPACE namespace { StaticRefPtr sBluetoothHfpManager; bool sInShutdown = false; -} // anonymous namespace +} // namespace /** * nsIObserver function diff --git a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp index 296fd22c52..0b499d5c18 100644 --- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp @@ -55,7 +55,7 @@ namespace { // The mechanism should be revised once we know the exact time at which // Dialer stops playing. static int sBusyToneInterval = 3700; //unit: ms -} // anonymous namespace +} // namespace const int BluetoothHfpManager::MAX_NUM_CLIENTS = 1; diff --git a/dom/bluetooth/bluez/BluetoothA2dpManager.cpp b/dom/bluetooth/bluez/BluetoothA2dpManager.cpp index b7a88e8bd1..4b8da2da6f 100644 --- a/dom/bluetooth/bluez/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/bluez/BluetoothA2dpManager.cpp @@ -26,7 +26,7 @@ USING_BLUETOOTH_NAMESPACE namespace { StaticRefPtr sBluetoothA2dpManager; bool sInShutdown = false; -} // anonymous namespace +} // namespace NS_IMETHODIMP BluetoothA2dpManager::Observe(nsISupports* aSubject, diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.cpp b/dom/bluetooth/bluez/BluetoothHfpManager.cpp index 145a828b5d..bd82e9e323 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp @@ -97,7 +97,7 @@ namespace { // Dialer stops playing. static int sBusyToneInterval = 3700; //unit: ms #endif // MOZ_B2G_RIL -} // anonymous namespace +} // namespace #ifdef MOZ_B2G_RIL /* CallState for sCINDItems[CINDType::CALL].value diff --git a/dom/broadcastchannel/BroadcastChannel.cpp b/dom/broadcastchannel/BroadcastChannel.cpp index 26c8b1a1e8..552a527e4b 100644 --- a/dom/broadcastchannel/BroadcastChannel.cpp +++ b/dom/broadcastchannel/BroadcastChannel.cpp @@ -378,7 +378,7 @@ private: bool mEnabled; }; -} // anonymous namespace +} // namespace /* static */ bool BroadcastChannel::IsEnabled(JSContext* aCx, JSObject* aGlobal) @@ -791,5 +791,5 @@ NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper) NS_IMPL_ADDREF_INHERITED(BroadcastChannel, DOMEventTargetHelper) NS_IMPL_RELEASE_INHERITED(BroadcastChannel, DOMEventTargetHelper) -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/broadcastchannel/BroadcastChannel.h b/dom/broadcastchannel/BroadcastChannel.h index 6ab086b5cf..f1ae7519d4 100644 --- a/dom/broadcastchannel/BroadcastChannel.h +++ b/dom/broadcastchannel/BroadcastChannel.h @@ -19,13 +19,13 @@ namespace mozilla { namespace ipc { class PrincipalInfo; -} +} // namespace ipc namespace dom { namespace workers { class WorkerFeature; -} +} // namespace workers class BroadcastChannelChild; class BroadcastChannelMessage; diff --git a/dom/broadcastchannel/BroadcastChannelChild.cpp b/dom/broadcastchannel/BroadcastChannelChild.cpp index 88a457ca74..a2a042094c 100644 --- a/dom/broadcastchannel/BroadcastChannelChild.cpp +++ b/dom/broadcastchannel/BroadcastChannelChild.cpp @@ -127,5 +127,5 @@ BroadcastChannelChild::ActorDestroy(ActorDestroyReason aWhy) mActorDestroyed = true; } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/broadcastchannel/BroadcastChannelChild.h b/dom/broadcastchannel/BroadcastChannelChild.h index ffd9749050..6192578254 100644 --- a/dom/broadcastchannel/BroadcastChannelChild.h +++ b/dom/broadcastchannel/BroadcastChannelChild.h @@ -11,7 +11,7 @@ namespace mozilla { namespace ipc { class BackgroundChildImpl; -} +} // namespace ipc namespace dom { @@ -51,7 +51,7 @@ private: bool mActorDestroyed; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_BroadcastChannelChild_h diff --git a/dom/broadcastchannel/BroadcastChannelParent.cpp b/dom/broadcastchannel/BroadcastChannelParent.cpp index 7a1740dcea..1152108294 100644 --- a/dom/broadcastchannel/BroadcastChannelParent.cpp +++ b/dom/broadcastchannel/BroadcastChannelParent.cpp @@ -116,5 +116,5 @@ BroadcastChannelParent::CheckAndDeliver(const ClonedMessageData& aData, } } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/broadcastchannel/BroadcastChannelParent.h b/dom/broadcastchannel/BroadcastChannelParent.h index 6ab3bb9637..9a0c212c86 100644 --- a/dom/broadcastchannel/BroadcastChannelParent.h +++ b/dom/broadcastchannel/BroadcastChannelParent.h @@ -46,7 +46,7 @@ private: bool mPrivateBrowsing; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_BroadcastChannelParent_h diff --git a/dom/broadcastchannel/BroadcastChannelService.cpp b/dom/broadcastchannel/BroadcastChannelService.cpp index 7b73c72abd..efe1241c2f 100644 --- a/dom/broadcastchannel/BroadcastChannelService.cpp +++ b/dom/broadcastchannel/BroadcastChannelService.cpp @@ -23,7 +23,7 @@ namespace { BroadcastChannelService* sInstance = nullptr; -} // anonymous namespace +} // namespace BroadcastChannelService::BroadcastChannelService() { @@ -138,7 +138,7 @@ PostMessageEnumerator(nsPtrHashKey* aKey, void* aPtr) return PL_DHASH_NEXT; } -} // anonymous namespace +} // namespace void BroadcastChannelService::PostMessage(BroadcastChannelParent* aParent, @@ -155,5 +155,5 @@ BroadcastChannelService::PostMessage(BroadcastChannelParent* aParent, mAgents.EnumerateEntries(PostMessageEnumerator, &data); } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/broadcastchannel/BroadcastChannelService.h b/dom/broadcastchannel/BroadcastChannelService.h index 3864e78607..6f8ad77d05 100644 --- a/dom/broadcastchannel/BroadcastChannelService.h +++ b/dom/broadcastchannel/BroadcastChannelService.h @@ -42,7 +42,7 @@ private: nsTHashtable> mAgents; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_BroadcastChannelService_h diff --git a/dom/browser-element/BrowserElementParent.cpp b/dom/browser-element/BrowserElementParent.cpp index 5140d3252e..d04ca6ff39 100644 --- a/dom/browser-element/BrowserElementParent.cpp +++ b/dom/browser-element/BrowserElementParent.cpp @@ -127,7 +127,7 @@ DispatchCustomDOMEvent(Element* aFrameElement, const nsAString& aEventName, return NS_SUCCEEDED(rv); } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/dom/browser-element/BrowserElementParent.h b/dom/browser-element/BrowserElementParent.h index 4c72662989..373010958c 100644 --- a/dom/browser-element/BrowserElementParent.h +++ b/dom/browser-element/BrowserElementParent.h @@ -18,7 +18,7 @@ namespace mozilla { namespace dom { class TabParent; -} +} // namespace dom /** * BrowserElementParent implements a portion of the parent-process side of diff --git a/dom/cache/ActorUtils.h b/dom/cache/ActorUtils.h index d0acba222e..7528821c9f 100644 --- a/dom/cache/ActorUtils.h +++ b/dom/cache/ActorUtils.h @@ -14,7 +14,7 @@ namespace mozilla { namespace ipc { class PBackgroundParent; class PrincipalInfo; -} +} // namespace ipc namespace dom { namespace cache { @@ -58,7 +58,7 @@ DeallocPCacheStorageChild(PCacheStorageChild* aActor); void DeallocPCacheStorageParent(PCacheStorageParent* aActor); -} // namesapce cache +} // namespace cache } // namespace dom } // namespace mozilla diff --git a/dom/cache/AutoUtils.cpp b/dom/cache/AutoUtils.cpp index ff75acf9fc..bdad6da2bf 100644 --- a/dom/cache/AutoUtils.cpp +++ b/dom/cache/AutoUtils.cpp @@ -129,7 +129,7 @@ CleanupParentFds(CacheReadStreamOrVoid& aReadStreamOrVoid, CleanupAction aAction CleanupParentFds(aReadStreamOrVoid.get_CacheReadStream(), aAction); } -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/cache/AutoUtils.h b/dom/cache/AutoUtils.h index 69864591d5..7d92e42d24 100644 --- a/dom/cache/AutoUtils.h +++ b/dom/cache/AutoUtils.h @@ -21,7 +21,7 @@ class ErrorResult; namespace ipc { class PBackgroundParent; -} +} // namespace ipc namespace dom { diff --git a/dom/cache/Cache.cpp b/dom/cache/Cache.cpp index 7a69510bb4..864f02dee7 100644 --- a/dom/cache/Cache.cpp +++ b/dom/cache/Cache.cpp @@ -65,7 +65,7 @@ IsValidPutRequestMethod(const OwningRequestOrUSVString& aRequest, return IsValidPutRequestMethod(*aRequest.GetAsRequest().get(), aRv); } -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/cache/CacheChild.cpp b/dom/cache/CacheChild.cpp index 830958be29..c7ff66a470 100644 --- a/dom/cache/CacheChild.cpp +++ b/dom/cache/CacheChild.cpp @@ -165,4 +165,4 @@ CacheChild::NoteDeletedActor() } // namespace cache } // namespace dom -} // namesapce mozilla +} // namespace mozilla diff --git a/dom/cache/CacheOpChild.cpp b/dom/cache/CacheOpChild.cpp index 7d892afa1a..dd13fa2565 100644 --- a/dom/cache/CacheOpChild.cpp +++ b/dom/cache/CacheOpChild.cpp @@ -54,7 +54,7 @@ AddFeatureToStreamChild(const CacheRequest& aRequest, Feature* aFeature) AddFeatureToStreamChild(aRequest.body().get_CacheReadStream(), aFeature); } -} // anonymous namespace +} // namespace CacheOpChild::CacheOpChild(Feature* aFeature, nsIGlobalObject* aGlobal, Promise* aPromise) diff --git a/dom/cache/CacheOpParent.h b/dom/cache/CacheOpParent.h index 6b6679e29e..0e64e54bb2 100644 --- a/dom/cache/CacheOpParent.h +++ b/dom/cache/CacheOpParent.h @@ -16,7 +16,7 @@ namespace mozilla { namespace ipc { class PBackgroundParent; -} +} // namespace ipc namespace dom { namespace cache { diff --git a/dom/cache/CacheParent.cpp b/dom/cache/CacheParent.cpp index 15ca59b2a4..9523631127 100644 --- a/dom/cache/CacheParent.cpp +++ b/dom/cache/CacheParent.cpp @@ -101,4 +101,4 @@ CacheParent::RecvTeardown() } // namespace cache } // namespace dom -} // namesapce mozilla +} // namespace mozilla diff --git a/dom/cache/CacheStorage.h b/dom/cache/CacheStorage.h index ff227e61e1..d42f246304 100644 --- a/dom/cache/CacheStorage.h +++ b/dom/cache/CacheStorage.h @@ -25,7 +25,7 @@ class ErrorResult; namespace ipc { class PrincipalInfo; -} +} // namespace ipc namespace dom { @@ -33,7 +33,7 @@ class Promise; namespace workers { class WorkerPrivate; -} +} // namespace workers namespace cache { diff --git a/dom/cache/CacheStorageParent.h b/dom/cache/CacheStorageParent.h index f46e226f3f..828f8aad07 100644 --- a/dom/cache/CacheStorageParent.h +++ b/dom/cache/CacheStorageParent.h @@ -53,7 +53,7 @@ private: nsRefPtr mManagerId; }; -} // namesapce cache +} // namespace cache } // namespace dom } // namespace mozilla diff --git a/dom/cache/Context.cpp b/dom/cache/Context.cpp index 2b5c92959a..fdcc7f69ae 100644 --- a/dom/cache/Context.cpp +++ b/dom/cache/Context.cpp @@ -54,7 +54,7 @@ private: const QuotaInfo mQuotaInfo; }; -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/cache/DBSchema.cpp b/dom/cache/DBSchema.cpp index a8c3bca1f2..36426456a3 100644 --- a/dom/cache/DBSchema.cpp +++ b/dom/cache/DBSchema.cpp @@ -35,7 +35,7 @@ namespace { const int32_t kLatestSchemaVersion = 6; const int32_t kMaxEntriesPerStatement = 255; -} // anonymous namespace +} // namespace // If any of the static_asserts below fail, it means that you have changed // the corresponding WebIDL enum in a way that may be incompatible with the @@ -1562,7 +1562,7 @@ ExtractId(mozIStorageStatement* aState, uint32_t aPos, nsID* aIdOut) return rv; } -} // anonymouns namespace +} // namespace } // namespace db } // namespace cache diff --git a/dom/cache/Feature.h b/dom/cache/Feature.h index 2ef50672d4..bc4c4f1f71 100644 --- a/dom/cache/Feature.h +++ b/dom/cache/Feature.h @@ -15,7 +15,7 @@ namespace mozilla { namespace workers { class WorkerPrivate; -} +} // namespace workers namespace dom { namespace cache { diff --git a/dom/cache/FileUtils.cpp b/dom/cache/FileUtils.cpp index 665cd0d1c0..1648578966 100644 --- a/dom/cache/FileUtils.cpp +++ b/dom/cache/FileUtils.cpp @@ -36,7 +36,7 @@ nsresult BodyIdToFile(nsIFile* aBaseDir, const nsID& aId, BodyFileType aType, nsIFile** aBodyFileOut); -} // anonymous namespace +} // namespace // static nsresult @@ -317,7 +317,7 @@ BodyIdToFile(nsIFile* aBaseDir, const nsID& aId, BodyFileType aType, return rv; } -} // anonymous namespace +} // namespace } // namespace cache } // namespace dom diff --git a/dom/cache/IPCUtils.h b/dom/cache/IPCUtils.h index fb843748bf..81068ccc1a 100644 --- a/dom/cache/IPCUtils.h +++ b/dom/cache/IPCUtils.h @@ -54,6 +54,6 @@ namespace IPC { mozilla::dom::cache::DEFAULT_NAMESPACE, mozilla::dom::cache::NUMBER_OF_NAMESPACES> {}; -} +} // namespace IPC #endif // mozilla_dom_cache_IPCUtils_h diff --git a/dom/cache/Manager.cpp b/dom/cache/Manager.cpp index 508568637e..eeff5c3b23 100644 --- a/dom/cache/Manager.cpp +++ b/dom/cache/Manager.cpp @@ -127,7 +127,7 @@ private: nsTArray mDeletedBodyIdList; }; -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/cache/PrincipalVerifier.cpp b/dom/cache/PrincipalVerifier.cpp index 7f4f40b95b..f9f54853c6 100644 --- a/dom/cache/PrincipalVerifier.cpp +++ b/dom/cache/PrincipalVerifier.cpp @@ -209,6 +209,6 @@ PrincipalVerifier::DispatchToInitiatingThread(nsresult aRv) } } -} // namesapce cache +} // namespace cache } // namespace dom } // namespace mozilla diff --git a/dom/cache/PrincipalVerifier.h b/dom/cache/PrincipalVerifier.h index 689bf483aa..46b246dcb2 100644 --- a/dom/cache/PrincipalVerifier.h +++ b/dom/cache/PrincipalVerifier.h @@ -15,7 +15,7 @@ namespace mozilla { namespace ipc { class PBackgroundParent; -} +} // namespace ipc namespace dom { namespace cache { @@ -72,7 +72,7 @@ public: NS_DECL_NSIRUNNABLE }; -} // namesapce cache +} // namespace cache } // namespace dom } // namespace mozilla diff --git a/dom/cache/QuotaClient.cpp b/dom/cache/QuotaClient.cpp index 740daca83b..420971feb0 100644 --- a/dom/cache/QuotaClient.cpp +++ b/dom/cache/QuotaClient.cpp @@ -248,7 +248,7 @@ private: NS_INLINE_DECL_REFCOUNTING(CacheQuotaClient, override) }; -} // anonymous namespace; +} // namespace namespace mozilla { namespace dom { diff --git a/dom/cache/StreamControl.h b/dom/cache/StreamControl.h index 78ce45de42..f2f27d2b4a 100644 --- a/dom/cache/StreamControl.h +++ b/dom/cache/StreamControl.h @@ -16,7 +16,7 @@ struct nsID; namespace mozilla { namespace ipc { class FileDescriptor; -} +} // namespace ipc namespace dom { namespace cache { diff --git a/dom/cache/TypeUtils.cpp b/dom/cache/TypeUtils.cpp index 5814fd06e1..199ab4506c 100644 --- a/dom/cache/TypeUtils.cpp +++ b/dom/cache/TypeUtils.cpp @@ -170,7 +170,7 @@ ToHeadersEntryList(nsTArray& aOut, InternalHeaders* aHeaders) } } -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/camera/CameraPreviewMediaStream.cpp b/dom/camera/CameraPreviewMediaStream.cpp index deb5f67cfb..8eb66c17f5 100644 --- a/dom/camera/CameraPreviewMediaStream.cpp +++ b/dom/camera/CameraPreviewMediaStream.cpp @@ -205,4 +205,4 @@ CameraPreviewMediaStream::ClearCurrentFrame() } } -} +} // namespace mozilla diff --git a/dom/camera/CameraPreviewMediaStream.h b/dom/camera/CameraPreviewMediaStream.h index 5c54738464..359f814d78 100644 --- a/dom/camera/CameraPreviewMediaStream.h +++ b/dom/camera/CameraPreviewMediaStream.h @@ -73,6 +73,6 @@ protected: nsRefPtr mFakeMediaStreamGraph; }; -} +} // namespace mozilla #endif // DOM_CAMERA_CAMERAPREVIEWMEDIASTREAM_H diff --git a/dom/camera/DOMCameraControl.h b/dom/camera/DOMCameraControl.h index dae5754d2a..4d3cecaa0c 100644 --- a/dom/camera/DOMCameraControl.h +++ b/dom/camera/DOMCameraControl.h @@ -36,7 +36,7 @@ namespace dom { struct CameraRegion; struct CameraSize; template class Optional; -} +} // namespace dom class ErrorResult; class StartRecordingHelper; diff --git a/dom/camera/DOMCameraManager.h b/dom/camera/DOMCameraManager.h index f9e37c1dcb..a63dd8f2c5 100644 --- a/dom/camera/DOMCameraManager.h +++ b/dom/camera/DOMCameraManager.h @@ -26,8 +26,8 @@ namespace mozilla { class nsDOMCameraControl; namespace dom { struct CameraConfiguration; - } -} + } // namespace dom +} // namespace mozilla typedef nsTArray CameraControls; typedef nsClassHashtable WindowTable; diff --git a/dom/camera/FallbackCameraControl.cpp b/dom/camera/FallbackCameraControl.cpp index abbe2ab7ed..c474a7471b 100644 --- a/dom/camera/FallbackCameraControl.cpp +++ b/dom/camera/FallbackCameraControl.cpp @@ -12,8 +12,8 @@ namespace mozilla { namespace layers { class GraphicBufferLocked; - } -} + } // namespace layers +} // namespace mozilla /** * Fallback camera control subclass. Can be used as a template for the diff --git a/dom/canvas/CanvasImageCache.h b/dom/canvas/CanvasImageCache.h index 95d0eebea5..6b5fb3cfaa 100644 --- a/dom/canvas/CanvasImageCache.h +++ b/dom/canvas/CanvasImageCache.h @@ -53,6 +53,6 @@ public: static SourceSurface* SimpleLookup(dom::Element* aImage); }; -} +} // namespace mozilla #endif /* CANVASIMAGECACHE_H_ */ diff --git a/dom/canvas/CanvasPattern.h b/dom/canvas/CanvasPattern.h index 64d26168c1..3744c36796 100644 --- a/dom/canvas/CanvasPattern.h +++ b/dom/canvas/CanvasPattern.h @@ -17,7 +17,7 @@ class nsIPrincipal; namespace mozilla { namespace gfx { class SourceSurface; -} +} // namespace gfx namespace dom { class SVGMatrix; @@ -74,7 +74,7 @@ public: const RepeatMode mRepeat; }; -} -} +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_CanvasPattern_h diff --git a/dom/canvas/CanvasRenderingContext2D.cpp b/dom/canvas/CanvasRenderingContext2D.cpp index 7a1539d5f4..0f91585768 100644 --- a/dom/canvas/CanvasRenderingContext2D.cpp +++ b/dom/canvas/CanvasRenderingContext2D.cpp @@ -5810,5 +5810,5 @@ CanvasPath::EnsurePathBuilder() const mPath = nullptr; } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/canvas/CanvasRenderingContext2D.h b/dom/canvas/CanvasRenderingContext2D.h index 3b05d0468f..b2a20fafac 100644 --- a/dom/canvas/CanvasRenderingContext2D.h +++ b/dom/canvas/CanvasRenderingContext2D.h @@ -34,7 +34,7 @@ class nsXULElement; namespace mozilla { namespace gl { class SourceSurface; -} +} // namespace gl namespace dom { class HTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement; @@ -1114,7 +1114,7 @@ protected: friend class CanvasDrawObserver; }; -} -} +} // namespace dom +} // namespace mozilla #endif /* CanvasRenderingContext2D_h */ diff --git a/dom/canvas/CanvasUtils.h b/dom/canvas/CanvasUtils.h index 31347ee651..fc69043fcd 100644 --- a/dom/canvas/CanvasUtils.h +++ b/dom/canvas/CanvasUtils.h @@ -21,7 +21,7 @@ class Matrix; namespace dom { class HTMLCanvasElement; -} +} // namespace dom namespace CanvasUtils { @@ -168,7 +168,7 @@ DashArrayToJSVal(FallibleTArray& dashes, } } -} -} +} // namespace CanvasUtils +} // namespace mozilla #endif /* _CANVASUTILS_H_ */ diff --git a/dom/canvas/DocumentRendererChild.h b/dom/canvas/DocumentRendererChild.h index d7a8e3c166..7c914ee46e 100644 --- a/dom/canvas/DocumentRendererChild.h +++ b/dom/canvas/DocumentRendererChild.h @@ -31,7 +31,7 @@ private: DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererChild); }; -} -} +} // namespace ipc +} // namespace mozilla #endif diff --git a/dom/canvas/DocumentRendererParent.h b/dom/canvas/DocumentRendererParent.h index f4f1b17d10..d0e30e7f97 100644 --- a/dom/canvas/DocumentRendererParent.h +++ b/dom/canvas/DocumentRendererParent.h @@ -38,7 +38,7 @@ private: DISALLOW_EVIL_CONSTRUCTORS(DocumentRendererParent); }; -} -} +} // namespace ipc +} // namespace mozilla #endif diff --git a/dom/canvas/WebGL2Context.h b/dom/canvas/WebGL2Context.h index 935a11826e..eef6e81541 100644 --- a/dom/canvas/WebGL2Context.h +++ b/dom/canvas/WebGL2Context.h @@ -17,7 +17,7 @@ class WebGLVertexArrayObject; namespace dom { class OwningUnsignedLongOrUint32ArrayOrBoolean; class OwningWebGLBufferOrLongLong; -} +} // namespace dom class WebGL2Context : public WebGLContext diff --git a/dom/canvas/WebGLContext.h b/dom/canvas/WebGLContext.h index a5828f10dd..3378555108 100644 --- a/dom/canvas/WebGLContext.h +++ b/dom/canvas/WebGLContext.h @@ -91,15 +91,15 @@ class Element; class ImageData; struct WebGLContextAttributes; template struct Nullable; -} +} // namespace dom namespace gfx { class SourceSurface; -} +} // namespace gfx namespace webgl { struct LinkedProgramInfo; -} +} // namespace webgl WebGLTexelFormat GetWebGLTexelFormat(TexInternalFormat format); diff --git a/dom/canvas/WebGLContextUnchecked.h b/dom/canvas/WebGLContextUnchecked.h index d061d12e5c..9236f8cb2d 100644 --- a/dom/canvas/WebGLContextUnchecked.h +++ b/dom/canvas/WebGLContextUnchecked.h @@ -17,7 +17,7 @@ class WebGLBuffer; class WebGLSampler; namespace gl { class GLContext; -} +} // namespace gl class WebGLContextUnchecked { diff --git a/dom/canvas/WebGLFramebuffer.h b/dom/canvas/WebGLFramebuffer.h index 96e8ff7ed3..817edc34b4 100644 --- a/dom/canvas/WebGLFramebuffer.h +++ b/dom/canvas/WebGLFramebuffer.h @@ -20,7 +20,7 @@ class WebGLTexture; namespace gl { class GLContext; -} +} // namespace gl class WebGLFramebuffer final : public nsWrapperCache diff --git a/dom/canvas/WebGLUniformLocation.h b/dom/canvas/WebGLUniformLocation.h index 134d19a5c8..13df4cd085 100644 --- a/dom/canvas/WebGLUniformLocation.h +++ b/dom/canvas/WebGLUniformLocation.h @@ -22,7 +22,7 @@ class WebGLProgram; namespace webgl { struct LinkedProgramInfo; -} +} // namespace webgl class WebGLUniformLocation final : public nsWrapperCache diff --git a/dom/canvas/nsICanvasRenderingContextInternal.h b/dom/canvas/nsICanvasRenderingContextInternal.h index d7ffcd68d7..f6c9e39044 100644 --- a/dom/canvas/nsICanvasRenderingContextInternal.h +++ b/dom/canvas/nsICanvasRenderingContextInternal.h @@ -27,11 +27,11 @@ namespace mozilla { namespace layers { class CanvasLayer; class LayerManager; -} +} // namespace layers namespace gfx { class SourceSurface; -} -} +} // namespace gfx +} // namespace mozilla class nsICanvasRenderingContextInternal : public nsISupports, diff --git a/dom/datastore/DataStoreCallbacks.h b/dom/datastore/DataStoreCallbacks.h index 4f976a5fb8..44f48ca9af 100644 --- a/dom/datastore/DataStoreCallbacks.h +++ b/dom/datastore/DataStoreCallbacks.h @@ -48,7 +48,7 @@ protected: } }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_DataStoreCallbacks_h diff --git a/dom/datastore/DataStoreDB.h b/dom/datastore/DataStoreDB.h index a6c34292df..2d28c8c374 100644 --- a/dom/datastore/DataStoreDB.h +++ b/dom/datastore/DataStoreDB.h @@ -24,7 +24,7 @@ class IDBFactory; class IDBObjectStore; class IDBOpenDBRequest; class IDBTransaction; -} +} // namespace indexedDB class DataStoreDBCallback; diff --git a/dom/datastore/DataStoreRevision.cpp b/dom/datastore/DataStoreRevision.cpp index 1078df678b..d262cddbb5 100644 --- a/dom/datastore/DataStoreRevision.cpp +++ b/dom/datastore/DataStoreRevision.cpp @@ -98,5 +98,5 @@ DataStoreRevision::HandleEvent(nsIDOMEvent* aEvent) return NS_OK; } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/datastore/DataStoreRevision.h b/dom/datastore/DataStoreRevision.h index 4c0505b3f1..6fff6bb2e7 100644 --- a/dom/datastore/DataStoreRevision.h +++ b/dom/datastore/DataStoreRevision.h @@ -18,7 +18,7 @@ namespace dom { namespace indexedDB { class IDBObjectStore; class IDBRequest; -} +} // namespace indexedDB class DataStoreRevisionCallback; diff --git a/dom/devicestorage/DeviceStorage.h b/dom/devicestorage/DeviceStorage.h index d67190130b..27f240ea0d 100644 --- a/dom/devicestorage/DeviceStorage.h +++ b/dom/devicestorage/DeviceStorage.h @@ -37,7 +37,7 @@ class DeviceStorageFileSystem; } // namespace dom namespace ipc { class FileDescriptor; -} +} // namespace ipc } // namespace mozilla class DeviceStorageFile final diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index 4eb773d920..aa3bdaa7c7 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -90,7 +90,7 @@ const char *kDownloadWatcherNotify = "download-watcher-notify"; namespace mozilla { MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPRFileDesc, PRFileDesc, PR_Close); -} +} // namespace mozilla StaticAutoPtr DeviceStorageUsedSpaceCache::sDeviceStorageUsedSpaceCache; diff --git a/dom/encoding/EncodingUtils.h b/dom/encoding/EncodingUtils.h index bba38192d6..629298de25 100644 --- a/dom/encoding/EncodingUtils.h +++ b/dom/encoding/EncodingUtils.h @@ -142,7 +142,7 @@ private: EncodingUtils() = delete; }; -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_encodingutils_h_ diff --git a/dom/encoding/FallbackEncoding.h b/dom/encoding/FallbackEncoding.h index 431dd4ee8d..47d098b25d 100644 --- a/dom/encoding/FallbackEncoding.h +++ b/dom/encoding/FallbackEncoding.h @@ -87,8 +87,8 @@ private: nsCString mFallback; }; -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_FallbackEncoding_h_ diff --git a/dom/encoding/TextDecoder.cpp b/dom/encoding/TextDecoder.cpp index b0984588b6..f2bc2c5d2c 100644 --- a/dom/encoding/TextDecoder.cpp +++ b/dom/encoding/TextDecoder.cpp @@ -137,5 +137,5 @@ TextDecoder::GetEncoding(nsAString& aEncoding) nsContentUtils::ASCIIToLower(aEncoding); } -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/encoding/TextDecoder.h b/dom/encoding/TextDecoder.h index 055d8c7896..15abdd0504 100644 --- a/dom/encoding/TextDecoder.h +++ b/dom/encoding/TextDecoder.h @@ -116,7 +116,7 @@ private: bool mFatal; }; -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_textdecoder_h_ diff --git a/dom/encoding/TextEncoder.cpp b/dom/encoding/TextEncoder.cpp index d02f149c6d..968cd67359 100644 --- a/dom/encoding/TextEncoder.cpp +++ b/dom/encoding/TextEncoder.cpp @@ -94,5 +94,5 @@ TextEncoder::GetEncoding(nsAString& aEncoding) nsContentUtils::ASCIIToLower(aEncoding); } -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/encoding/TextEncoder.h b/dom/encoding/TextEncoder.h index 477f785213..4a2b0d8157 100644 --- a/dom/encoding/TextEncoder.h +++ b/dom/encoding/TextEncoder.h @@ -87,7 +87,7 @@ private: nsCOMPtr mEncoder; }; -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_textencoder_h_ diff --git a/dom/events/MessageEvent.h b/dom/events/MessageEvent.h index c82477d3bd..c4249f132a 100644 --- a/dom/events/MessageEvent.h +++ b/dom/events/MessageEvent.h @@ -21,7 +21,7 @@ namespace workers { class ServiceWorkerClient; -} +} // namespace workers /** * Implements the MessageEvent event, used for cross-document messaging and diff --git a/dom/events/SpeechRecognitionError.h b/dom/events/SpeechRecognitionError.h index 655a6d2b18..7ea51b1444 100644 --- a/dom/events/SpeechRecognitionError.h +++ b/dom/events/SpeechRecognitionError.h @@ -56,7 +56,7 @@ protected: nsString mMessage; }; -} -} +} // namespace dom +} // namespace mozilla #endif // SpeechRecognitionError_h__ diff --git a/dom/fetch/Fetch.cpp b/dom/fetch/Fetch.cpp index ea3f7752a2..1ead082b04 100644 --- a/dom/fetch/Fetch.cpp +++ b/dom/fetch/Fetch.cpp @@ -888,7 +888,7 @@ public: return mFormData.forget(); } }; -} // anonymous namespace +} // namespace nsresult ExtractByteStreamFromBody(const OwningArrayBufferOrArrayBufferViewOrBlobOrFormDataOrUSVStringOrURLSearchParams& aBodyInit, @@ -1215,7 +1215,7 @@ public: return true; } }; -} // anonymous namespace +} // namespace template class FetchBodyFeature final : public workers::WorkerFeature diff --git a/dom/fetch/FetchDriver.cpp b/dom/fetch/FetchDriver.cpp index db414a75b0..29d74f29fb 100644 --- a/dom/fetch/FetchDriver.cpp +++ b/dom/fetch/FetchDriver.cpp @@ -631,7 +631,7 @@ public: }; NS_IMPL_ISUPPORTS(FillResponseHeaders, nsIHttpHeaderVisitor) -} // anonymous namespace +} // namespace NS_IMETHODIMP FetchDriver::OnStartRequest(nsIRequest* aRequest, @@ -910,5 +910,6 @@ FetchDriver::SetDocument(nsIDocument* aDocument) MOZ_ASSERT(mFetchRecursionCount == 0); mDocument = aDocument; } + } // namespace dom } // namespace mozilla diff --git a/dom/fetch/Headers.cpp b/dom/fetch/Headers.cpp index a88bb96cbc..22f9249189 100644 --- a/dom/fetch/Headers.cpp +++ b/dom/fetch/Headers.cpp @@ -92,5 +92,6 @@ Headers::WrapObject(JSContext* aCx, JS::Handle aGivenProto) Headers::~Headers() { } + } // namespace dom } // namespace mozilla diff --git a/dom/fetch/InternalHeaders.cpp b/dom/fetch/InternalHeaders.cpp index 244e6621c8..633ade84c6 100644 --- a/dom/fetch/InternalHeaders.cpp +++ b/dom/fetch/InternalHeaders.cpp @@ -368,5 +368,6 @@ InternalHeaders::GetUnsafeHeaders(nsTArray& aNames) const } } } + } // namespace dom } // namespace mozilla diff --git a/dom/fetch/Request.cpp b/dom/fetch/Request.cpp index ff4ab91960..5ee3315ce2 100644 --- a/dom/fetch/Request.cpp +++ b/dom/fetch/Request.cpp @@ -121,7 +121,7 @@ GetRequestURLFromWorker(const GlobalObject& aGlobal, const nsAString& aInput, } } -} // anonymous namespace +} // namespace /*static*/ already_AddRefed Request::Constructor(const GlobalObject& aGlobal, diff --git a/dom/fetch/Response.cpp b/dom/fetch/Response.cpp index d01ce2312d..a09b39c557 100644 --- a/dom/fetch/Response.cpp +++ b/dom/fetch/Response.cpp @@ -229,5 +229,6 @@ Response::Headers_() return mHeaders; } + } // namespace dom } // namespace mozilla diff --git a/dom/filehandle/FileHandle.cpp b/dom/filehandle/FileHandle.cpp index a0c2f4bd89..c64022a55c 100644 --- a/dom/filehandle/FileHandle.cpp +++ b/dom/filehandle/FileHandle.cpp @@ -189,7 +189,7 @@ private: nsCOMPtr mStream; }; -} // anonymous namespace +} // namespace FileHandleBase::FileHandleBase(FileMode aMode, RequestMode aRequestMode) diff --git a/dom/filehandle/FileHelper.cpp b/dom/filehandle/FileHelper.cpp index 2502f68392..5f6d2d55c8 100644 --- a/dom/filehandle/FileHelper.cpp +++ b/dom/filehandle/FileHelper.cpp @@ -24,7 +24,7 @@ namespace { FileHandleBase* gCurrentFileHandle = nullptr; -} // anonymous namespace +} // namespace FileHelper::FileHelper(FileHandleBase* aFileHandle, FileRequestBase* aFileRequest) diff --git a/dom/filehandle/FileService.cpp b/dom/filehandle/FileService.cpp index 47662eae43..f2a703c1c6 100644 --- a/dom/filehandle/FileService.cpp +++ b/dom/filehandle/FileService.cpp @@ -26,7 +26,7 @@ namespace { FileService* gInstance = nullptr; bool gShutdown = false; -} // anonymous namespace +} // namespace FileService::FileService() { diff --git a/dom/filehandle/FileStreamWrappers.cpp b/dom/filehandle/FileStreamWrappers.cpp index 03a4202bd4..2350e15787 100644 --- a/dom/filehandle/FileStreamWrappers.cpp +++ b/dom/filehandle/FileStreamWrappers.cpp @@ -82,7 +82,7 @@ private: nsRefPtr mFileHelper; }; -} // anonymous namespace +} // namespace FileStreamWrapper::FileStreamWrapper(nsISupports* aFileStream, FileHelper* aFileHelper, diff --git a/dom/geolocation/nsGeoPositionIPCSerialiser.h b/dom/geolocation/nsGeoPositionIPCSerialiser.h index 7fbbabc229..60bab76802 100644 --- a/dom/geolocation/nsGeoPositionIPCSerialiser.h +++ b/dom/geolocation/nsGeoPositionIPCSerialiser.h @@ -145,6 +145,6 @@ struct ParamTraits }; -} +} // namespace IPC #endif diff --git a/dom/geolocation/nsGeolocation.h b/dom/geolocation/nsGeolocation.h index 423b7bf773..c5f04dcbce 100644 --- a/dom/geolocation/nsGeolocation.h +++ b/dom/geolocation/nsGeolocation.h @@ -42,8 +42,8 @@ namespace dom { class Geolocation; typedef CallbackObjectHolder GeoPositionCallback; typedef CallbackObjectHolder GeoPositionErrorCallback; -} -} +} // namespace dom +} // namespace mozilla struct CachedPositionAndAccuracy { nsCOMPtr position; @@ -247,13 +247,14 @@ private: nsRefPtr mParent; }; -} +} // namespace dom inline nsISupports* ToSupports(dom::Geolocation* aGeolocation) { return ToSupports(static_cast(aGeolocation)); } -} + +} // namespace mozilla #endif /* nsGeoLocation_h */ diff --git a/dom/html/HTMLAnchorElement.cpp b/dom/html/HTMLAnchorElement.cpp index f0d27a679a..d96fce4754 100644 --- a/dom/html/HTMLAnchorElement.cpp +++ b/dom/html/HTMLAnchorElement.cpp @@ -471,5 +471,5 @@ HTMLAnchorElement::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) cons Link::SizeOfExcludingThis(aMallocSizeOf); } -} // namespace mozilla } // namespace dom +} // namespace mozilla diff --git a/dom/html/HTMLCanvasElement.cpp b/dom/html/HTMLCanvasElement.cpp index 146fd56d3c..bb00b80f2e 100644 --- a/dom/html/HTMLCanvasElement.cpp +++ b/dom/html/HTMLCanvasElement.cpp @@ -48,7 +48,7 @@ namespace { typedef mozilla::dom::HTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement HTMLImageOrCanvasOrVideoElement; -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/html/HTMLCanvasElement.h b/dom/html/HTMLCanvasElement.h index 8fe1cb2b26..88288e657d 100644 --- a/dom/html/HTMLCanvasElement.h +++ b/dom/html/HTMLCanvasElement.h @@ -23,10 +23,10 @@ namespace mozilla { namespace layers { class CanvasLayer; class LayerManager; -} +} // namespace layers namespace gfx { class SourceSurface; -} +} // namespace gfx namespace dom { diff --git a/dom/html/HTMLFrameElement.cpp b/dom/html/HTMLFrameElement.cpp index 0699a6c8a0..6ddffeb892 100644 --- a/dom/html/HTMLFrameElement.cpp +++ b/dom/html/HTMLFrameElement.cpp @@ -86,5 +86,5 @@ HTMLFrameElement::WrapNode(JSContext* aCx, JS::Handle aGivenProto) return HTMLFrameElementBinding::Wrap(aCx, this, aGivenProto); } -} // namespace mozilla } // namespace dom +} // namespace mozilla diff --git a/dom/html/HTMLHRElement.cpp b/dom/html/HTMLHRElement.cpp index 0dbc162835..5baeab481e 100644 --- a/dom/html/HTMLHRElement.cpp +++ b/dom/html/HTMLHRElement.cpp @@ -262,5 +262,5 @@ HTMLHRElement::WrapNode(JSContext* aCx, JS::Handle aGivenProto) return HTMLHRElementBinding::Wrap(aCx, this, aGivenProto); } -} // namespace mozilla } // namespace dom +} // namespace mozilla diff --git a/dom/html/HTMLHeadingElement.h b/dom/html/HTMLHeadingElement.h index ed0092cd85..92f775347f 100644 --- a/dom/html/HTMLHeadingElement.h +++ b/dom/html/HTMLHeadingElement.h @@ -49,7 +49,7 @@ private: nsRuleData* aData); }; -} // namespace mozilla } // namespace dom +} // namespace mozilla #endif // mozilla_dom_HTMLHeadingElement_h diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp index 32aeaf33cb..5deda7049c 100644 --- a/dom/html/HTMLInputElement.cpp +++ b/dom/html/HTMLInputElement.cpp @@ -500,7 +500,7 @@ DOMFileToLocalFile(nsIDOMFile* aDomFile) return localFile.forget(); } -} // anonymous namespace +} // namespace class DirPickerFileListBuilderTask final : public nsRunnable diff --git a/dom/html/HTMLMediaElement.h b/dom/html/HTMLMediaElement.h index ea62601deb..4c8da24e05 100644 --- a/dom/html/HTMLMediaElement.h +++ b/dom/html/HTMLMediaElement.h @@ -52,8 +52,8 @@ class TextTrack; class TimeRanges; class WakeLock; class MediaTrack; -} -} +} // namespace dom +} // namespace mozilla class nsITimer; class nsRange; diff --git a/dom/html/HTMLPropertiesCollection.h b/dom/html/HTMLPropertiesCollection.h index ff40ea0c23..c742a84e74 100644 --- a/dom/html/HTMLPropertiesCollection.h +++ b/dom/html/HTMLPropertiesCollection.h @@ -218,4 +218,5 @@ protected: } // namespace dom } // namespace mozilla + #endif // HTMLPropertiesCollection_h_ diff --git a/dom/html/HTMLSharedElement.cpp b/dom/html/HTMLSharedElement.cpp index 0a88313b99..997742dfdf 100644 --- a/dom/html/HTMLSharedElement.cpp +++ b/dom/html/HTMLSharedElement.cpp @@ -336,5 +336,5 @@ HTMLSharedElement::WrapNode(JSContext *aCx, JS::Handle aGivenProto) return HTMLHtmlElementBinding::Wrap(aCx, this, aGivenProto); } -} // namespace mozilla } // namespace dom +} // namespace mozilla diff --git a/dom/html/HTMLSharedElement.h b/dom/html/HTMLSharedElement.h index 048d2c9846..d1664cf5ae 100644 --- a/dom/html/HTMLSharedElement.h +++ b/dom/html/HTMLSharedElement.h @@ -182,7 +182,7 @@ protected: virtual JSObject* WrapNode(JSContext* aCx, JS::Handle aGivenProto) override; }; -} // namespace mozilla } // namespace dom +} // namespace mozilla #endif // mozilla_dom_HTMLSharedElement_h diff --git a/dom/html/HTMLTableElement.cpp b/dom/html/HTMLTableElement.cpp index 9fc446a62d..545e3b9960 100644 --- a/dom/html/HTMLTableElement.cpp +++ b/dom/html/HTMLTableElement.cpp @@ -23,8 +23,8 @@ namespace dom { * This class provides a late-bound collection of rows in a table. * mParent is NOT ref-counted to avoid circular references */ -class TableRowsCollection : public nsIHTMLCollection, - public nsWrapperCache +class TableRowsCollection final : public nsIHTMLCollection, + public nsWrapperCache { public: explicit TableRowsCollection(HTMLTableElement* aParent); diff --git a/dom/html/TimeRanges.h b/dom/html/TimeRanges.h index 7324ca6120..0a268bddbb 100644 --- a/dom/html/TimeRanges.h +++ b/dom/html/TimeRanges.h @@ -19,7 +19,7 @@ namespace dom { class TimeRanges; -} +} // namespace dom namespace dom { diff --git a/dom/html/nsDOMStringMap.h b/dom/html/nsDOMStringMap.h index 39719f1c3d..97430e1c48 100644 --- a/dom/html/nsDOMStringMap.h +++ b/dom/html/nsDOMStringMap.h @@ -17,7 +17,7 @@ namespace mozilla { class ErrorResult; -} +} // namespace mozilla class nsDOMStringMap : public nsStubMutationObserver, public nsWrapperCache diff --git a/dom/html/nsGenericHTMLElement.h b/dom/html/nsGenericHTMLElement.h index 17bc388019..5bcf91605e 100644 --- a/dom/html/nsGenericHTMLElement.h +++ b/dom/html/nsGenericHTMLElement.h @@ -39,8 +39,8 @@ namespace dom { class HTMLFormElement; class HTMLPropertiesCollection; class HTMLMenuElement; -} -} +} // namespace dom +} // namespace mozilla typedef nsMappedAttributeElement nsGenericHTMLElementBase; @@ -1244,8 +1244,8 @@ private: namespace mozilla { namespace dom { class HTMLFieldSetElement; -} -} +} // namespace dom +} // namespace mozilla #define FORM_ELEMENT_FLAG_BIT(n_) NODE_FLAG_BIT(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + (n_)) diff --git a/dom/html/nsGenericHTMLFrameElement.cpp b/dom/html/nsGenericHTMLFrameElement.cpp index 22a04c9d93..f6a7fdbf5b 100644 --- a/dom/html/nsGenericHTMLFrameElement.cpp +++ b/dom/html/nsGenericHTMLFrameElement.cpp @@ -479,7 +479,7 @@ bool WidgetsEnabled() return sMozWidgetsEnabled; } -} // anonymous namespace +} // namespace /* [infallible] */ NS_IMETHODIMP nsGenericHTMLFrameElement::GetReallyIsWidget(bool *aOut) diff --git a/dom/html/nsIConstraintValidation.h b/dom/html/nsIConstraintValidation.h index 6e565bd365..bf4a5f7431 100644 --- a/dom/html/nsIConstraintValidation.h +++ b/dom/html/nsIConstraintValidation.h @@ -15,8 +15,8 @@ class nsIDOMValidityState; namespace mozilla { namespace dom { class ValidityState; -} -} +} // namespace dom +} // namespace mozilla #define NS_ICONSTRAINTVALIDATION_IID \ { 0x983829da, 0x1aaf, 0x449c, \ diff --git a/dom/html/nsIRadioGroupContainer.h b/dom/html/nsIRadioGroupContainer.h index 4153894899..00cc274d9a 100644 --- a/dom/html/nsIRadioGroupContainer.h +++ b/dom/html/nsIRadioGroupContainer.h @@ -14,8 +14,8 @@ class nsIFormControl; namespace mozilla { namespace dom { class HTMLInputElement; -} -} +} // namespace dom +} // namespace mozilla #define NS_IRADIOGROUPCONTAINER_IID \ { 0x800320a0, 0x733f, 0x11e4, \ diff --git a/dom/html/nsTextEditorState.h b/dom/html/nsTextEditorState.h index 59a8a7b58b..97df5ecc93 100644 --- a/dom/html/nsTextEditorState.h +++ b/dom/html/nsTextEditorState.h @@ -28,8 +28,8 @@ class nsFrame; namespace mozilla { namespace dom { class HTMLInputElement; -} -} +} // namespace dom +} // namespace mozilla /** * nsTextEditorState is a class which is responsible for managing the state of diff --git a/dom/icc/Icc.cpp b/dom/icc/Icc.cpp index 4b149ada79..1ce041b1ae 100644 --- a/dom/icc/Icc.cpp +++ b/dom/icc/Icc.cpp @@ -40,7 +40,7 @@ IsPukCardLockType(IccLockType aLockType) } } -} // anonymous namespace +} // namespace NS_IMPL_CYCLE_COLLECTION_INHERITED(Icc, DOMEventTargetHelper, mIccInfo) diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index 2cf30919ab..c7338ea0d8 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -774,7 +774,7 @@ DispatchSuccessEvent(ResultHelper* aResultHelper, } } -} // anonymous namespace +} // namespace /******************************************************************************* * Local class implementations diff --git a/dom/indexedDB/ActorsParent.cpp b/dom/indexedDB/ActorsParent.cpp index f0fdd43034..c642a7a0e4 100644 --- a/dom/indexedDB/ActorsParent.cpp +++ b/dom/indexedDB/ActorsParent.cpp @@ -5650,7 +5650,7 @@ StaticRefPtr gDEBUGThreadSlower; #endif // DEBUG -} // anonymous namespace +} // namespace /******************************************************************************* * Exported functions diff --git a/dom/indexedDB/FileInfo.cpp b/dom/indexedDB/FileInfo.cpp index fa8bc60e91..168a11ce1e 100644 --- a/dom/indexedDB/FileInfo.cpp +++ b/dom/indexedDB/FileInfo.cpp @@ -76,7 +76,7 @@ private: NS_DECL_NSIRUNNABLE }; -} // anonymous namespace +} // namespace FileInfo::FileInfo(FileManager* aFileManager) : mFileManager(aFileManager) diff --git a/dom/indexedDB/IDBDatabase.cpp b/dom/indexedDB/IDBDatabase.cpp index 644920cc46..14001306b5 100644 --- a/dom/indexedDB/IDBDatabase.cpp +++ b/dom/indexedDB/IDBDatabase.cpp @@ -177,7 +177,7 @@ private: } }; -} // anonymous namespace +} // namespace class IDBDatabase::LogWarningRunnable final : public nsRunnable diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp index 9df07dab85..5a394b6e79 100644 --- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -52,7 +52,7 @@ namespace { const char kPrefIndexedDBEnabled[] = "dom.indexedDB.enabled"; -} // anonymous namespace +} // namespace class IDBFactory::BackgroundCreateCallback final : public nsIIPCBackgroundChildCreateCallback diff --git a/dom/indexedDB/IDBFileHandle.cpp b/dom/indexedDB/IDBFileHandle.cpp index a6c62a9f2a..80a8e0535b 100644 --- a/dom/indexedDB/IDBFileHandle.cpp +++ b/dom/indexedDB/IDBFileHandle.cpp @@ -24,7 +24,7 @@ namespace { NS_DEFINE_CID(kAppShellCID2, NS_APPSHELL_CID); -} // anonymous namespace +} // namespace IDBFileHandle::IDBFileHandle(FileMode aMode, RequestMode aRequestMode, diff --git a/dom/indexedDB/IDBIndex.cpp b/dom/indexedDB/IDBIndex.cpp index 58752739bf..40000148c1 100644 --- a/dom/indexedDB/IDBIndex.cpp +++ b/dom/indexedDB/IDBIndex.cpp @@ -44,7 +44,7 @@ GenerateRequest(IDBIndex* aIndex) return request.forget(); } -} // anonymous namespace +} // namespace IDBIndex::IDBIndex(IDBObjectStore* aObjectStore, const IndexMetadata* aMetadata) : mObjectStore(aObjectStore) diff --git a/dom/indexedDB/IDBKeyRange.cpp b/dom/indexedDB/IDBKeyRange.cpp index 9d32acea26..e49cd9ed28 100644 --- a/dom/indexedDB/IDBKeyRange.cpp +++ b/dom/indexedDB/IDBKeyRange.cpp @@ -37,7 +37,7 @@ GetKeyFromJSVal(JSContext* aCx, return NS_OK; } -} // anonymous namespace +} // namespace IDBKeyRange::IDBKeyRange(nsISupports* aGlobal, bool aLowerOpen, diff --git a/dom/indexedDB/IDBMutableFile.cpp b/dom/indexedDB/IDBMutableFile.cpp index 47795f8b2b..0d8dff5a55 100644 --- a/dom/indexedDB/IDBMutableFile.cpp +++ b/dom/indexedDB/IDBMutableFile.cpp @@ -89,7 +89,7 @@ GetFileFor(FileInfo* aFileInfo) return file.forget(); } -} // anonymous namespace +} // namespace IDBMutableFile::IDBMutableFile(IDBDatabase* aDatabase, const nsAString& aName, diff --git a/dom/indexedDB/IDBObjectStore.cpp b/dom/indexedDB/IDBObjectStore.cpp index 31e71a8111..53e44c393f 100644 --- a/dom/indexedDB/IDBObjectStore.cpp +++ b/dom/indexedDB/IDBObjectStore.cpp @@ -845,7 +845,7 @@ ClearStructuredCloneBuffer(JSAutoStructuredCloneBuffer& aBuffer) } } -} // anonymous namespace +} // namespace const JSClass IDBObjectStore::sDummyPropJSClass = { "IDBObjectStore Dummy", diff --git a/dom/indexedDB/IDBRequest.cpp b/dom/indexedDB/IDBRequest.cpp index 033a2618fc..40aed3368c 100644 --- a/dom/indexedDB/IDBRequest.cpp +++ b/dom/indexedDB/IDBRequest.cpp @@ -47,7 +47,7 @@ namespace { NS_DEFINE_IID(kIDBRequestIID, PRIVATE_IDBREQUEST_IID); -} // anonymous namespace +} // namespace IDBRequest::IDBRequest(IDBDatabase* aDatabase) : IDBWrapperCache(aDatabase) diff --git a/dom/indexedDB/IDBTransaction.cpp b/dom/indexedDB/IDBTransaction.cpp index 0da574d6c8..24f256c73c 100644 --- a/dom/indexedDB/IDBTransaction.cpp +++ b/dom/indexedDB/IDBTransaction.cpp @@ -65,7 +65,7 @@ RunBeforeNextEvent(IDBTransaction* aTransaction) return true; } -} // anonymous namespace +} // namespace class IDBTransaction::WorkerFeature final : public mozilla::dom::workers::WorkerFeature diff --git a/dom/indexedDB/IndexedDatabaseManager.cpp b/dom/indexedDB/IndexedDatabaseManager.cpp index b983f1934d..3082d68bf9 100644 --- a/dom/indexedDB/IndexedDatabaseManager.cpp +++ b/dom/indexedDB/IndexedDatabaseManager.cpp @@ -211,7 +211,7 @@ AtomicBoolPrefChangedCallback(const char* aPrefName, void* aClosure) *static_cast*>(aClosure) = Preferences::GetBool(aPrefName); } -} // anonymous namespace +} // namespace IndexedDatabaseManager::IndexedDatabaseManager() : mFileMutex("IndexedDatabaseManager.mFileMutex") diff --git a/dom/indexedDB/KeyPath.cpp b/dom/indexedDB/KeyPath.cpp index beb19f2f1b..a21a840716 100644 --- a/dom/indexedDB/KeyPath.cpp +++ b/dom/indexedDB/KeyPath.cpp @@ -215,7 +215,7 @@ GetJSValFromKeyPathString(JSContext* aCx, return rv; } -} // anonymous namespace +} // namespace // static nsresult diff --git a/dom/indexedDB/PermissionRequestBase.cpp b/dom/indexedDB/PermissionRequestBase.cpp index d7f9c0ebe7..a98f2d9178 100644 --- a/dom/indexedDB/PermissionRequestBase.cpp +++ b/dom/indexedDB/PermissionRequestBase.cpp @@ -44,7 +44,7 @@ AssertSanity() MOZ_ASSERT(NS_IsMainThread()); } -} // anonymous namespace +} // namespace PermissionRequestBase::PermissionRequestBase(nsPIDOMWindow* aWindow, nsIPrincipal* aPrincipal) diff --git a/dom/ipc/AppProcessChecker.cpp b/dom/ipc/AppProcessChecker.cpp index 3cdbc59d49..5e85997866 100644 --- a/dom/ipc/AppProcessChecker.cpp +++ b/dom/ipc/AppProcessChecker.cpp @@ -29,8 +29,8 @@ using namespace mozilla::services; namespace mozilla { namespace dom { class PContentParent; -} -} +} // namespace dom +} // namespace mozilla class nsIPrincipal; #endif diff --git a/dom/ipc/AppProcessChecker.h b/dom/ipc/AppProcessChecker.h index 2e019f561f..1d63fc398c 100644 --- a/dom/ipc/AppProcessChecker.h +++ b/dom/ipc/AppProcessChecker.h @@ -18,11 +18,11 @@ namespace dom { class TabContext; class PBrowserParent; class PContentParent; -} +} // namespace dom namespace hal_sandbox { class PHalParent; -} +} // namespace hal_sandbox enum AssertAppProcessType { ASSERT_APP_PROCESS_PERMISSION, diff --git a/dom/ipc/Blob.cpp b/dom/ipc/Blob.cpp index 1d14c881d4..d60a017cbb 100644 --- a/dom/ipc/Blob.cpp +++ b/dom/ipc/Blob.cpp @@ -1475,7 +1475,7 @@ RemoteInputStream::BlockAndGetInternalStream() return mStream; } -} // anonymous namespace +} // namespace StaticAutoPtr BlobParent::sIDTable; StaticAutoPtr BlobParent::sIDTableMutex; diff --git a/dom/ipc/ContentBridgeChild.h b/dom/ipc/ContentBridgeChild.h index ea0c2b9687..2c345f119a 100644 --- a/dom/ipc/ContentBridgeChild.h +++ b/dom/ipc/ContentBridgeChild.h @@ -77,7 +77,7 @@ protected: // members Transport* mTransport; // owned }; -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_ContentBridgeChild_h diff --git a/dom/ipc/ContentBridgeParent.h b/dom/ipc/ContentBridgeParent.h index 70a64c389e..2efe52b651 100644 --- a/dom/ipc/ContentBridgeParent.h +++ b/dom/ipc/ContentBridgeParent.h @@ -117,7 +117,7 @@ private: friend class ContentParent; }; -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_ContentBridgeParent_h diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index e413c7cfed..cd3fb9b2d0 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -52,8 +52,8 @@ class PStorageChild; class ClonedMessageData; class TabChild; -class ContentChild : public PContentChild - , public nsIContentChild +class ContentChild final : public PContentChild + , public nsIContentChild { typedef mozilla::dom::ClonedMessageData ClonedMessageData; typedef mozilla::ipc::OptionalURIParams OptionalURIParams; diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 88945d67ad..8183d2ed4d 100755 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -1454,7 +1454,7 @@ private: }; #endif // MOZ_NUWA_PROCESS -} // anonymous namespace +} // namespace void ContentParent::MaybeTakeCPUWakeLock(Element* aFrameElement) @@ -1756,7 +1756,7 @@ NestedBrowserLayerIds() static std::map > sNestedBrowserIds; return sNestedBrowserIds; } -} // anonymous namespace +} // namespace bool ContentParent::RecvAllocateLayerTreeId(uint64_t* aId) @@ -1811,7 +1811,7 @@ struct DelayedDeleteContentParentTask : public nsRunnable nsRefPtr mObj; }; -} +} // namespace void ContentParent::ActorDestroy(ActorDestroyReason why) diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 4aa8ff1e23..766771bdc2 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -49,7 +49,7 @@ class TestShellParent; namespace jsipc { class JavaScriptShared; class PJavaScriptParent; -} +} // namespace jsipc namespace layers { class PCompositorParent; diff --git a/dom/ipc/ContentProcess.h b/dom/ipc/ContentProcess.h index 9bb90d71fe..faaa617db4 100644 --- a/dom/ipc/ContentProcess.h +++ b/dom/ipc/ContentProcess.h @@ -42,7 +42,7 @@ private: DISALLOW_EVIL_CONSTRUCTORS(ContentProcess); }; -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla #endif // ifndef dom_tabs_ContentThread_h diff --git a/dom/ipc/ContentProcessManager.h b/dom/ipc/ContentProcessManager.h index 986530d120..2bb24620c9 100644 --- a/dom/ipc/ContentProcessManager.h +++ b/dom/ipc/ContentProcessManager.h @@ -145,4 +145,5 @@ private: } // namespace dom } // namespace mozilla + #endif diff --git a/dom/ipc/IdType.h b/dom/ipc/IdType.h index a5dcda8005..ef55880d2a 100644 --- a/dom/ipc/IdType.h +++ b/dom/ipc/IdType.h @@ -11,7 +11,7 @@ namespace IPC { template struct ParamTraits; -} +} // namespace IPC namespace mozilla { namespace dom { @@ -69,6 +69,6 @@ struct ParamTraits> } }; -} +} // namespace IPC #endif \ No newline at end of file diff --git a/dom/ipc/PreallocatedProcessManager.cpp b/dom/ipc/PreallocatedProcessManager.cpp index b05c217c89..631cc7c28b 100644 --- a/dom/ipc/PreallocatedProcessManager.cpp +++ b/dom/ipc/PreallocatedProcessManager.cpp @@ -417,7 +417,7 @@ inline PreallocatedProcessManagerImpl* GetPPMImpl() return PreallocatedProcessManagerImpl::Singleton(); } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/dom/ipc/PreallocatedProcessManager.h b/dom/ipc/PreallocatedProcessManager.h index 9caeaa032e..938865ddd5 100644 --- a/dom/ipc/PreallocatedProcessManager.h +++ b/dom/ipc/PreallocatedProcessManager.h @@ -16,7 +16,7 @@ class nsIRunnable; namespace mozilla { namespace dom { class ContentParent; -} +} // namespace dom /** * This class manages a ContentParent that it starts up ahead of any particular diff --git a/dom/ipc/ProcessHangMonitor.h b/dom/ipc/ProcessHangMonitor.h index 1a7f818dff..7c2461f854 100644 --- a/dom/ipc/ProcessHangMonitor.h +++ b/dom/ipc/ProcessHangMonitor.h @@ -17,13 +17,13 @@ class MessageLoop; namespace base { class Thread; -}; +} // namespace base namespace mozilla { namespace dom { class ContentParent; -} +} // namespace dom class PProcessHangMonitorParent; class PProcessHangMonitorChild; diff --git a/dom/ipc/ProcessHangMonitorIPC.h b/dom/ipc/ProcessHangMonitorIPC.h index 87c0e856bb..dbb9f9b768 100644 --- a/dom/ipc/ProcessHangMonitorIPC.h +++ b/dom/ipc/ProcessHangMonitorIPC.h @@ -18,7 +18,7 @@ namespace mozilla { namespace dom { class ContentParent; -} +} // namespace dom PProcessHangMonitorParent* CreateHangMonitorParent(mozilla::dom::ContentParent* aContentParent, diff --git a/dom/ipc/ProcessPriorityManager.cpp b/dom/ipc/ProcessPriorityManager.cpp index 53b412753a..f4b1a15ea8 100644 --- a/dom/ipc/ProcessPriorityManager.cpp +++ b/dom/ipc/ProcessPriorityManager.cpp @@ -1452,7 +1452,7 @@ BackgroundProcessLRUPool::AddIntoBackgroundLRUPool( LOG("Add ChildID(%llu) into LRU pool", aContentParent->ChildID()); } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/dom/ipc/ProcessPriorityManager.h b/dom/ipc/ProcessPriorityManager.h index afcec33fb5..f85f14bd0c 100644 --- a/dom/ipc/ProcessPriorityManager.h +++ b/dom/ipc/ProcessPriorityManager.h @@ -12,7 +12,7 @@ namespace mozilla { namespace dom { class ContentParent; -} +} // namespace dom /** * This class sets the priority of subprocesses in response to explicit diff --git a/dom/ipc/StructuredCloneUtils.cpp b/dom/ipc/StructuredCloneUtils.cpp index 724bf779fc..9bf8a8d7b7 100644 --- a/dom/ipc/StructuredCloneUtils.cpp +++ b/dom/ipc/StructuredCloneUtils.cpp @@ -111,7 +111,7 @@ const JSStructuredCloneCallbacks gCallbacks = { nullptr }; -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 1a84b79303..6bcfe948de 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -698,7 +698,7 @@ NestedTabChildMap() static std::map> sNestedTabChildMap; return sNestedTabChildMap; } -} // anonymous namespace +} // namespace already_AddRefed TabChild::FindTabChild(const TabId& aTabId) diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 431bc3ad87..fcc17cf864 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -630,7 +630,7 @@ private: DISALLOW_EVIL_CONSTRUCTORS(TabChild); }; -} -} +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_TabChild_h diff --git a/dom/ipc/TabMessageUtils.cpp b/dom/ipc/TabMessageUtils.cpp index 30f38f1d3a..77b6f7cd97 100644 --- a/dom/ipc/TabMessageUtils.cpp +++ b/dom/ipc/TabMessageUtils.cpp @@ -28,5 +28,5 @@ ReadRemoteEvent(const IPC::Message* aMsg, void** aIter, return aResult->mEvent->Deserialize(aMsg, aIter); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/ipc/TabMessageUtils.h b/dom/ipc/TabMessageUtils.h index 8605847b75..c20e697249 100644 --- a/dom/ipc/TabMessageUtils.h +++ b/dom/ipc/TabMessageUtils.h @@ -23,8 +23,8 @@ struct RemoteDOMEvent bool ReadRemoteEvent(const IPC::Message* aMsg, void** aIter, mozilla::dom::RemoteDOMEvent* aResult); -} -} +} // namespace dom +} // namespace mozilla namespace IPC { @@ -84,7 +84,7 @@ struct ParamTraits mozilla::dom::AUDIO_CHANNEL_STATE_LAST> { }; -} +} // namespace IPC #endif diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index 6fdbeef3cf..edb4595bcc 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -2855,5 +2855,5 @@ FakeChannel::OnAuthCancelled(nsISupports *aContext, bool userCancel) } -} // namespace tabs +} // namespace dom } // namespace mozilla diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index ba9bf58a7f..08f2213ae1 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -59,12 +59,12 @@ class nsIContentParent; class Element; struct StructuredCloneData; -class TabParent : public PBrowserParent - , public nsITabParent - , public nsIAuthPromptProvider - , public nsISecureBrowserUI - , public nsSupportsWeakReference - , public TabContext +class TabParent final : public PBrowserParent + , public nsITabParent + , public nsIAuthPromptProvider + , public nsISecureBrowserUI + , public nsSupportsWeakReference + , public TabContext { typedef mozilla::dom::ClonedMessageData ClonedMessageData; diff --git a/dom/ipc/nsICachedFileDescriptorListener.h b/dom/ipc/nsICachedFileDescriptorListener.h index d71cc36ba8..520c6497de 100644 --- a/dom/ipc/nsICachedFileDescriptorListener.h +++ b/dom/ipc/nsICachedFileDescriptorListener.h @@ -19,8 +19,8 @@ class nsAString; namespace mozilla { namespace ipc { class FileDescriptor; -} -} +} // namespace ipc +} // namespace mozilla class NS_NO_VTABLE nsICachedFileDescriptorListener : public nsISupports { diff --git a/dom/ipc/nsIContentChild.cpp b/dom/ipc/nsIContentChild.cpp index 929ea9490f..9de7466e47 100644 --- a/dom/ipc/nsIContentChild.cpp +++ b/dom/ipc/nsIContentChild.cpp @@ -123,5 +123,5 @@ nsIContentChild::RecvAsyncMessage(const nsString& aMsg, return true; } -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/ipc/nsIContentChild.h b/dom/ipc/nsIContentChild.h index 5d729a6f4b..997f9e8b3a 100644 --- a/dom/ipc/nsIContentChild.h +++ b/dom/ipc/nsIContentChild.h @@ -21,14 +21,14 @@ class nsString; namespace IPC { class Principal; -} // IPC +} // namespace IPC namespace mozilla { namespace jsipc { class PJavaScriptChild; class CpowEntry; -} // jsipc +} // namespace jsipc namespace dom { @@ -84,6 +84,7 @@ protected: NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentChild, NS_ICONTENTCHILD_IID) -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla + #endif /* mozilla_dom_nsIContentChild_h */ diff --git a/dom/media/AbstractMediaDecoder.h b/dom/media/AbstractMediaDecoder.h index 23297d77de..e4cf8baf02 100644 --- a/dom/media/AbstractMediaDecoder.h +++ b/dom/media/AbstractMediaDecoder.h @@ -19,7 +19,7 @@ namespace mozilla namespace layers { class ImageContainer; -} +} // namespace layers class MediaResource; class ReentrantMonitor; class VideoFrameContainer; @@ -241,7 +241,7 @@ private: nsRefPtr mDecoder; }; -} +} // namespace mozilla #endif diff --git a/dom/media/AudioBufferUtils.h b/dom/media/AudioBufferUtils.h index b332e03497..cbe305f11e 100644 --- a/dom/media/AudioBufferUtils.h +++ b/dom/media/AudioBufferUtils.h @@ -160,6 +160,6 @@ private: uint32_t mPosition; }; -} +} // namespace mozilla #endif // MOZILLA_SCRATCHBUFFER_H_ diff --git a/dom/media/AudioChannelFormat.cpp b/dom/media/AudioChannelFormat.cpp index 49a5f7c7dc..a447b1dd5d 100644 --- a/dom/media/AudioChannelFormat.cpp +++ b/dom/media/AudioChannelFormat.cpp @@ -198,4 +198,4 @@ AudioChannelsDownMix(const nsTArray& aChannelArray, } } -} +} // namespace mozilla diff --git a/dom/media/AudioMixer.h b/dom/media/AudioMixer.h index 9eeff82d27..c992942e25 100644 --- a/dom/media/AudioMixer.h +++ b/dom/media/AudioMixer.h @@ -145,6 +145,7 @@ private: /* Buffer containing the mixed audio data. */ nsTArray mMixedAudio; }; -} + +} // namespace mozilla #endif // MOZILLA_AUDIOMIXER_H_ diff --git a/dom/media/AudioSegment.cpp b/dom/media/AudioSegment.cpp index 9ba1ae326c..93af3aa031 100644 --- a/dom/media/AudioSegment.cpp +++ b/dom/media/AudioSegment.cpp @@ -212,4 +212,4 @@ AudioSegment::WriteTo(uint64_t aID, AudioMixer& aMixer, uint32_t aOutputChannels } } -} +} // namespace mozilla diff --git a/dom/media/AudioSegment.h b/dom/media/AudioSegment.h index 034ce86879..b69e031bdf 100644 --- a/dom/media/AudioSegment.h +++ b/dom/media/AudioSegment.h @@ -307,6 +307,6 @@ public: } }; -} +} // namespace mozilla #endif /* MOZILLA_AUDIOSEGMENT_H_ */ diff --git a/dom/media/AudioStream.cpp b/dom/media/AudioStream.cpp index 434e330462..5adfc8bb5b 100644 --- a/dom/media/AudioStream.cpp +++ b/dom/media/AudioStream.cpp @@ -1221,4 +1221,5 @@ bool AudioClock::GetPreservesPitch() const { return mPreservesPitch; } + } // namespace mozilla diff --git a/dom/media/AudioStreamTrack.cpp b/dom/media/AudioStreamTrack.cpp index 7afaf34245..0008411afa 100644 --- a/dom/media/AudioStreamTrack.cpp +++ b/dom/media/AudioStreamTrack.cpp @@ -16,5 +16,5 @@ AudioStreamTrack::WrapObject(JSContext* aCx, JS::Handle aGivenProto) return AudioStreamTrackBinding::Wrap(aCx, this, aGivenProto); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/AudioStreamTrack.h b/dom/media/AudioStreamTrack.h index 5071140784..b05ca84cc7 100644 --- a/dom/media/AudioStreamTrack.h +++ b/dom/media/AudioStreamTrack.h @@ -25,7 +25,7 @@ public: virtual void GetKind(nsAString& aKind) override { aKind.AssignLiteral("audio"); } }; -} -} +} // namespace dom +} // namespace mozilla #endif /* AUDIOSTREAMTRACK_H_ */ diff --git a/dom/media/BufferMediaResource.h b/dom/media/BufferMediaResource.h index 56d06eab58..6e81da8d6a 100644 --- a/dom/media/BufferMediaResource.h +++ b/dom/media/BufferMediaResource.h @@ -168,6 +168,6 @@ private: const nsAutoCString mContentType; }; -} +} // namespace mozilla #endif diff --git a/dom/media/CubebUtils.cpp b/dom/media/CubebUtils.cpp index 17ca663352..a724aefe5d 100644 --- a/dom/media/CubebUtils.cpp +++ b/dom/media/CubebUtils.cpp @@ -38,7 +38,7 @@ bool sCubebLatencyPrefSet; // visible on the querying thread/CPU. uint32_t sPreferredSampleRate; -} // anonymous namespace +} // namespace extern PRLogModuleInfo* gAudioStreamLog; diff --git a/dom/media/DOMMediaStream.h b/dom/media/DOMMediaStream.h index 5f64cd5d0e..f9db68423f 100644 --- a/dom/media/DOMMediaStream.h +++ b/dom/media/DOMMediaStream.h @@ -371,6 +371,6 @@ private: nsRefPtr mStreamNode; }; -} +} // namespace mozilla #endif /* NSDOMMEDIASTREAM_H_ */ diff --git a/dom/media/DecodedStream.h b/dom/media/DecodedStream.h index b31f32374c..0ccdb29280 100644 --- a/dom/media/DecodedStream.h +++ b/dom/media/DecodedStream.h @@ -25,7 +25,7 @@ class MediaStreamGraph; namespace layers { class Image; -} +} // namespace layers /* * All MediaStream-related data is protected by the decoder's monitor. diff --git a/dom/media/DecoderTraits.cpp b/dom/media/DecoderTraits.cpp index 3644a91831..6cb0e2b179 100644 --- a/dom/media/DecoderTraits.cpp +++ b/dom/media/DecoderTraits.cpp @@ -829,4 +829,4 @@ bool DecoderTraits::IsSupportedInVideoDocument(const nsACString& aType) false; } -} +} // namespace mozilla diff --git a/dom/media/DecoderTraits.h b/dom/media/DecoderTraits.h index 72f40d78e8..16b7c665d5 100644 --- a/dom/media/DecoderTraits.h +++ b/dom/media/DecoderTraits.h @@ -73,7 +73,7 @@ public: static bool IsMP4Type(const nsACString& aType); }; -} +} // namespace mozilla #endif diff --git a/dom/media/EncodedBufferCache.cpp b/dom/media/EncodedBufferCache.cpp index b6c3593fcc..a564ec4bb1 100644 --- a/dom/media/EncodedBufferCache.cpp +++ b/dom/media/EncodedBufferCache.cpp @@ -88,4 +88,4 @@ EncodedBufferCache::ExtractBlob(nsISupports* aParent, return blob.forget(); } -} //end namespace +} // namespace mozilla diff --git a/dom/media/GraphDriver.cpp b/dom/media/GraphDriver.cpp index 8eaceaff9b..b926a365f5 100644 --- a/dom/media/GraphDriver.cpp +++ b/dom/media/GraphDriver.cpp @@ -1103,4 +1103,4 @@ void AudioCallbackDriver::CompleteAudioContextOperations(AsyncCubebOperation aOp } -} // namepace mozilla +} // namespace mozilla diff --git a/dom/media/GraphDriver.h b/dom/media/GraphDriver.h index 5bc64866c2..34eb35f467 100644 --- a/dom/media/GraphDriver.h +++ b/dom/media/GraphDriver.h @@ -548,6 +548,6 @@ private: nsRefPtr mShutdownGrip; }; -} +} // namespace mozilla #endif // GRAPHDRIVER_H_ diff --git a/dom/media/Intervals.h b/dom/media/Intervals.h index b0f0f8165e..fd2f088dcc 100644 --- a/dom/media/Intervals.h +++ b/dom/media/Intervals.h @@ -16,8 +16,8 @@ namespace mozilla { namespace media { template class IntervalSet; -} -} +} // namespace media +} // namespace mozilla template struct nsTArray_CopyChooser> diff --git a/dom/media/MP3Demuxer.cpp b/dom/media/MP3Demuxer.cpp index 93f5e074bf..becc1cf4f0 100644 --- a/dom/media/MP3Demuxer.cpp +++ b/dom/media/MP3Demuxer.cpp @@ -604,7 +604,7 @@ static const int SYNC1 = 0; static const int SYNC2_VERSION_LAYER_PROTECTION = 1; static const int BITRATE_SAMPLERATE_PADDING_PRIVATE = 2; static const int CHANNELMODE_MODEEXT_COPY_ORIG_EMPH = 3; -} +} // namespace frame_header FrameParser::FrameParser() { @@ -1226,5 +1226,5 @@ ID3Parser::ID3Header::Update(uint8_t c) { return IsValid(mPos++); } -} // namespace mp3 -} // namespace mozilla +} // namespace mp3 +} // namespace mozilla diff --git a/dom/media/MP3Demuxer.h b/dom/media/MP3Demuxer.h index e7d19fe9e0..c9d4ae43f1 100644 --- a/dom/media/MP3Demuxer.h +++ b/dom/media/MP3Demuxer.h @@ -475,7 +475,7 @@ private: UniquePtr mInfo; }; -} // namespace mp3 -} // namespace mozilla +} // namespace mp3 +} // namespace mozilla #endif diff --git a/dom/media/MP3FrameParser.cpp b/dom/media/MP3FrameParser.cpp index 9ead1cb3be..a77d3ebe17 100644 --- a/dom/media/MP3FrameParser.cpp +++ b/dom/media/MP3FrameParser.cpp @@ -553,4 +553,4 @@ bool MP3FrameParser::NeedsData() return IsMP3() && !HasExactDuration(); } -} +} // namespace mozilla diff --git a/dom/media/MP3FrameParser.h b/dom/media/MP3FrameParser.h index 9113e53b42..fc24fa5ee3 100644 --- a/dom/media/MP3FrameParser.h +++ b/dom/media/MP3FrameParser.h @@ -211,6 +211,6 @@ private: }; -} +} // namespace mozilla #endif diff --git a/dom/media/MediaData.h b/dom/media/MediaData.h index 6191e7c52d..3e9b80e6e4 100644 --- a/dom/media/MediaData.h +++ b/dom/media/MediaData.h @@ -20,7 +20,7 @@ namespace mozilla { namespace layers { class Image; class ImageContainer; -} +} // namespace layers class MediaLargeByteBuffer; class MediaByteBuffer; @@ -137,7 +137,7 @@ protected: namespace layers { class TextureClient; class PlanarYCbCrImage; -} +} // namespace layers class VideoInfo; diff --git a/dom/media/MediaDecoderOwner.h b/dom/media/MediaDecoderOwner.h index 657851d3b5..a8ec57196c 100644 --- a/dom/media/MediaDecoderOwner.h +++ b/dom/media/MediaDecoderOwner.h @@ -13,7 +13,7 @@ class VideoFrameContainer; namespace dom { class HTMLMediaElement; -} +} // namespace dom class MediaDecoderOwner { @@ -131,7 +131,7 @@ public: virtual void ResetConnectionState() = 0; }; -} +} // namespace mozilla #endif diff --git a/dom/media/MediaDecoderStateMachine.h b/dom/media/MediaDecoderStateMachine.h index c2012943ce..9250310997 100644 --- a/dom/media/MediaDecoderStateMachine.h +++ b/dom/media/MediaDecoderStateMachine.h @@ -1288,5 +1288,6 @@ protected: DecodedStream mDecodedStream; }; -} // namespace mozilla; +} // namespace mozilla + #endif diff --git a/dom/media/MediaManager.h b/dom/media/MediaManager.h index 43e44b8790..ec80198479 100644 --- a/dom/media/MediaManager.h +++ b/dom/media/MediaManager.h @@ -48,7 +48,7 @@ struct MediaStreamConstraints; class NavigatorUserMediaSuccessCallback; class NavigatorUserMediaErrorCallback; struct MediaTrackConstraintSet; -} +} // namespace dom #ifdef PR_LOGGING extern PRLogModuleInfo* GetMediaManagerLog(); diff --git a/dom/media/MediaMetadataManager.h b/dom/media/MediaMetadataManager.h index 4a5a27cf0a..d11d98ae19 100644 --- a/dom/media/MediaMetadataManager.h +++ b/dom/media/MediaMetadataManager.h @@ -63,6 +63,6 @@ namespace mozilla { protected: LinkedList mMetadataQueue; }; -} +} // namespace mozilla #endif diff --git a/dom/media/MediaPermissionGonk.h b/dom/media/MediaPermissionGonk.h index 464557f3ad..2d2106d8c2 100644 --- a/dom/media/MediaPermissionGonk.h +++ b/dom/media/MediaPermissionGonk.h @@ -34,5 +34,6 @@ private: }; } // namespace mozilla + #endif // DOM_MEDIA_MEDIAPERMISSIONGONK_H diff --git a/dom/media/MediaRecorder.cpp b/dom/media/MediaRecorder.cpp index 30b5e46d20..9686aa0d3f 100644 --- a/dom/media/MediaRecorder.cpp +++ b/dom/media/MediaRecorder.cpp @@ -1206,5 +1206,5 @@ MediaRecorderReporter::~MediaRecorderReporter() UnregisterWeakMemoryReporter(this); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/MediaRecorder.h b/dom/media/MediaRecorder.h index bfa3bff802..15e51a9ec2 100644 --- a/dom/media/MediaRecorder.h +++ b/dom/media/MediaRecorder.h @@ -162,7 +162,7 @@ private: bool Check3gppPermission(); }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/MediaSegment.h b/dom/media/MediaSegment.h index 9c1f5353ce..a6821e5508 100644 --- a/dom/media/MediaSegment.h +++ b/dom/media/MediaSegment.h @@ -425,6 +425,6 @@ protected: #endif }; -} +} // namespace mozilla #endif /* MOZILLA_MEDIASEGMENT_H_ */ diff --git a/dom/media/MediaStreamError.h b/dom/media/MediaStreamError.h index d5f9639ee7..25977ec6cf 100644 --- a/dom/media/MediaStreamError.h +++ b/dom/media/MediaStreamError.h @@ -26,7 +26,7 @@ namespace dom { { 0x9d, 0xa9, 0xf2, 0xeb, 0x03, 0x91, 0x0b, 0xd1 } } class MediaStreamError; -} +} // namespace dom class BaseMediaMgrError { diff --git a/dom/media/MediaStreamGraph.cpp b/dom/media/MediaStreamGraph.cpp index 546dcfd849..54fbdc1345 100644 --- a/dom/media/MediaStreamGraph.cpp +++ b/dom/media/MediaStreamGraph.cpp @@ -587,7 +587,7 @@ namespace { const uint32_t NOT_VISITED = UINT32_MAX; // Value of mCycleMarker for ordered streams in muted cycles. const uint32_t IN_MUTED_CYCLE = 1; -} +} // namespace void MediaStreamGraphImpl::UpdateStreamOrder() @@ -1684,7 +1684,7 @@ public: NS_DECL_NSIOBSERVER }; -} +} // namespace void MediaStreamGraphImpl::RunInStableState(bool aSourceIsMSG) @@ -2982,7 +2982,7 @@ ForceShutdownEnumerator(const uint32_t& /* aAudioChannel */, return PL_DHASH_NEXT; } -} // anonymous namespace +} // namespace NS_IMETHODIMP MediaStreamGraphShutdownObserver::Observe(nsISupports *aSubject, @@ -3509,4 +3509,4 @@ ProcessedMediaStream::AddInput(MediaInputPort* aPort) GraphImpl()->SetStreamOrderDirty(); } -} +} // namespace mozilla diff --git a/dom/media/MediaStreamGraph.h b/dom/media/MediaStreamGraph.h index b10749170c..0078fa4bf8 100644 --- a/dom/media/MediaStreamGraph.h +++ b/dom/media/MediaStreamGraph.h @@ -1313,6 +1313,6 @@ protected: TrackRate mSampleRate; }; -} +} // namespace mozilla #endif /* MOZILLA_MEDIASTREAMGRAPH_H_ */ diff --git a/dom/media/MediaStreamGraphImpl.h b/dom/media/MediaStreamGraphImpl.h index 5e25740ca8..477664171a 100644 --- a/dom/media/MediaStreamGraphImpl.h +++ b/dom/media/MediaStreamGraphImpl.h @@ -747,6 +747,6 @@ private: uint32_t mAudioChannel; }; -} +} // namespace mozilla #endif /* MEDIASTREAMGRAPHIMPL_H_ */ diff --git a/dom/media/MediaStreamTrack.cpp b/dom/media/MediaStreamTrack.cpp index 13b0a06a77..b6da955bde 100644 --- a/dom/media/MediaStreamTrack.cpp +++ b/dom/media/MediaStreamTrack.cpp @@ -62,5 +62,5 @@ MediaStreamTrack::Stop() mStream->StopTrack(mTrackID); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/MediaStreamTrack.h b/dom/media/MediaStreamTrack.h index b96645f915..baaaf8bd44 100644 --- a/dom/media/MediaStreamTrack.h +++ b/dom/media/MediaStreamTrack.h @@ -67,7 +67,7 @@ protected: bool mEnabled; }; -} -} +} // namespace dom +} // namespace mozilla #endif /* MEDIASTREAMTRACK_H_ */ diff --git a/dom/media/SelfRef.h b/dom/media/SelfRef.h index 866b6de995..7c0327cb49 100644 --- a/dom/media/SelfRef.h +++ b/dom/media/SelfRef.h @@ -42,6 +42,7 @@ public: private: bool mHeld; }; -} // mozilla + +} // namespace mozilla #endif // SELF_REF_H diff --git a/dom/media/SharedBuffer.h b/dom/media/SharedBuffer.h index 7d9f83a56b..632098ecfb 100644 --- a/dom/media/SharedBuffer.h +++ b/dom/media/SharedBuffer.h @@ -72,6 +72,6 @@ private: SharedBuffer() {} }; -} +} // namespace mozilla #endif /* MOZILLA_SHAREDBUFFER_H_ */ diff --git a/dom/media/StreamBuffer.cpp b/dom/media/StreamBuffer.cpp index e625162c73..45b348fde9 100644 --- a/dom/media/StreamBuffer.cpp +++ b/dom/media/StreamBuffer.cpp @@ -101,4 +101,4 @@ StreamBuffer::ForgetUpTo(StreamTime aTime) } } -} +} // namespace mozilla diff --git a/dom/media/StreamBuffer.h b/dom/media/StreamBuffer.h index e8b9b089d9..2c1ae896a7 100644 --- a/dom/media/StreamBuffer.h +++ b/dom/media/StreamBuffer.h @@ -307,7 +307,7 @@ protected: #endif }; -} +} // namespace mozilla #endif /* MOZILLA_STREAMBUFFER_H_ */ diff --git a/dom/media/TimeUnits.h b/dom/media/TimeUnits.h index a080589cbb..ee3918fdd3 100644 --- a/dom/media/TimeUnits.h +++ b/dom/media/TimeUnits.h @@ -16,8 +16,8 @@ namespace mozilla { namespace media { class TimeIntervals; -} -} +} // namespace media +} // namespace mozilla // CopyChooser specalization for nsTArray template<> struct nsTArray_CopyChooser diff --git a/dom/media/TimeVarying.h b/dom/media/TimeVarying.h index 58d9ecc9a6..a319559a12 100644 --- a/dom/media/TimeVarying.h +++ b/dom/media/TimeVarying.h @@ -232,6 +232,6 @@ private: T mCurrent; }; -} +} // namespace mozilla #endif /* MOZILLA_TIMEVARYING_H_ */ diff --git a/dom/media/TrackUnionStream.cpp b/dom/media/TrackUnionStream.cpp index fddc04ad05..f17a71c821 100644 --- a/dom/media/TrackUnionStream.cpp +++ b/dom/media/TrackUnionStream.cpp @@ -295,4 +295,4 @@ TrackUnionStream::TrackUnionStream(DOMMediaStream* aWrapper) : outputTrack->GetSegment()->AppendFrom(segment); } } -} +} // namespace mozilla diff --git a/dom/media/TrackUnionStream.h b/dom/media/TrackUnionStream.h index 307e8b2b9e..683b2050b6 100644 --- a/dom/media/TrackUnionStream.h +++ b/dom/media/TrackUnionStream.h @@ -60,6 +60,6 @@ protected: nsTArray mTrackMap; }; -} +} // namespace mozilla #endif /* MOZILLA_MEDIASTREAMGRAPH_H_ */ diff --git a/dom/media/VideoFrameContainer.cpp b/dom/media/VideoFrameContainer.cpp index b312d07a29..20cb12de11 100644 --- a/dom/media/VideoFrameContainer.cpp +++ b/dom/media/VideoFrameContainer.cpp @@ -149,4 +149,4 @@ void VideoFrameContainer::InvalidateWithFlags(uint32_t aFlags) nsSVGEffects::InvalidateDirectRenderingObservers(mElement); } -} +} // namespace mozilla diff --git a/dom/media/VideoFrameContainer.h b/dom/media/VideoFrameContainer.h index a54ebdfa2e..eca09d0849 100644 --- a/dom/media/VideoFrameContainer.h +++ b/dom/media/VideoFrameContainer.h @@ -17,7 +17,7 @@ namespace mozilla { namespace dom { class HTMLMediaElement; -} +} // namespace dom namespace layers { class Image; @@ -99,6 +99,6 @@ protected: bool mImageSizeChanged; }; -} +} // namespace mozilla #endif /* VIDEOFRAMECONTAINER_H_ */ diff --git a/dom/media/VideoPlaybackQuality.h b/dom/media/VideoPlaybackQuality.h index 9c834994ba..5a67bd0113 100644 --- a/dom/media/VideoPlaybackQuality.h +++ b/dom/media/VideoPlaybackQuality.h @@ -61,4 +61,5 @@ private: } // namespace dom } // namespace mozilla + #endif /* mozilla_dom_VideoPlaybackQuality_h_ */ diff --git a/dom/media/VideoSegment.cpp b/dom/media/VideoSegment.cpp index 06ae8a3b3f..c00e28a05f 100644 --- a/dom/media/VideoSegment.cpp +++ b/dom/media/VideoSegment.cpp @@ -109,4 +109,4 @@ VideoSegment::VideoSegment() VideoSegment::~VideoSegment() {} -} +} // namespace mozilla diff --git a/dom/media/VideoSegment.h b/dom/media/VideoSegment.h index 0c917463dc..a22634b466 100644 --- a/dom/media/VideoSegment.h +++ b/dom/media/VideoSegment.h @@ -16,7 +16,7 @@ namespace mozilla { namespace layers { class Image; -} +} // namespace layers class VideoFrame { public: @@ -140,6 +140,6 @@ public: } }; -} +} // namespace mozilla #endif /* MOZILLA_VIDEOSEGMENT_H_ */ diff --git a/dom/media/VideoStreamTrack.cpp b/dom/media/VideoStreamTrack.cpp index 483de42ede..20b924fcf6 100644 --- a/dom/media/VideoStreamTrack.cpp +++ b/dom/media/VideoStreamTrack.cpp @@ -16,5 +16,5 @@ VideoStreamTrack::WrapObject(JSContext* aCx, JS::Handle aGivenProto) return VideoStreamTrackBinding::Wrap(aCx, this, aGivenProto); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/VideoStreamTrack.h b/dom/media/VideoStreamTrack.h index 339b1ac5bf..7a628a7921 100644 --- a/dom/media/VideoStreamTrack.h +++ b/dom/media/VideoStreamTrack.h @@ -25,7 +25,7 @@ public: virtual void GetKind(nsAString& aKind) override { aKind.AssignLiteral("video"); } }; -} -} +} // namespace dom +} // namespace mozilla #endif /* VIDEOSTREAMTRACK_H_ */ diff --git a/dom/media/apple/AppleDecoder.h b/dom/media/apple/AppleDecoder.h index 395f96fc11..53cf749ad0 100644 --- a/dom/media/apple/AppleDecoder.h +++ b/dom/media/apple/AppleDecoder.h @@ -19,6 +19,6 @@ public: }; -} +} // namespace mozilla #endif // __AppleDecoder_h__ diff --git a/dom/media/directshow/AudioSinkFilter.h b/dom/media/directshow/AudioSinkFilter.h index aa9eae97ff..85abdfccf7 100644 --- a/dom/media/directshow/AudioSinkFilter.h +++ b/dom/media/directshow/AudioSinkFilter.h @@ -91,4 +91,5 @@ private: }; } // namespace mozilla + #endif // AudioSinkFilter_h_ diff --git a/dom/media/directshow/AudioSinkInputPin.h b/dom/media/directshow/AudioSinkInputPin.h index aa565772cd..80503c641e 100644 --- a/dom/media/directshow/AudioSinkInputPin.h +++ b/dom/media/directshow/AudioSinkInputPin.h @@ -72,4 +72,5 @@ private: }; } // namespace mozilla + #endif // AudioSinkInputPin_h_ diff --git a/dom/media/directshow/SampleSink.h b/dom/media/directshow/SampleSink.h index 8a75bb6091..ccb6a8a4ce 100644 --- a/dom/media/directshow/SampleSink.h +++ b/dom/media/directshow/SampleSink.h @@ -64,4 +64,5 @@ private: }; } // namespace mozilla + #endif // SampleSink_h_ diff --git a/dom/media/encoder/ContainerWriter.h b/dom/media/encoder/ContainerWriter.h index 39c413acea..53d7bbff11 100644 --- a/dom/media/encoder/ContainerWriter.h +++ b/dom/media/encoder/ContainerWriter.h @@ -73,5 +73,7 @@ protected: bool mInitialized; bool mIsWritingComplete; }; -} + +} // namespace mozilla + #endif diff --git a/dom/media/encoder/EncodedFrameContainer.h b/dom/media/encoder/EncodedFrameContainer.h index 8ef6b6a8b0..6dd778d78a 100644 --- a/dom/media/encoder/EncodedFrameContainer.h +++ b/dom/media/encoder/EncodedFrameContainer.h @@ -103,5 +103,6 @@ private: FrameType mFrameType; }; -} +} // namespace mozilla + #endif diff --git a/dom/media/encoder/MediaEncoder.cpp b/dom/media/encoder/MediaEncoder.cpp index 025a5ae9bd..94684ee98d 100644 --- a/dom/media/encoder/MediaEncoder.cpp +++ b/dom/media/encoder/MediaEncoder.cpp @@ -367,4 +367,4 @@ MediaEncoder::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const return amount; } -} +} // namespace mozilla diff --git a/dom/media/encoder/MediaEncoder.h b/dom/media/encoder/MediaEncoder.h index 13faa838be..94a3d6dc62 100644 --- a/dom/media/encoder/MediaEncoder.h +++ b/dom/media/encoder/MediaEncoder.h @@ -176,5 +176,6 @@ private: } }; -} +} // namespace mozilla + #endif diff --git a/dom/media/encoder/OpusTrackEncoder.cpp b/dom/media/encoder/OpusTrackEncoder.cpp index 687b39e6c9..c26b855bb0 100644 --- a/dom/media/encoder/OpusTrackEncoder.cpp +++ b/dom/media/encoder/OpusTrackEncoder.cpp @@ -440,4 +440,4 @@ OpusTrackEncoder::GetEncodedTrack(EncodedFrameContainer& aData) return result >= 0 ? NS_OK : NS_ERROR_FAILURE; } -} +} // namespace mozilla diff --git a/dom/media/encoder/OpusTrackEncoder.h b/dom/media/encoder/OpusTrackEncoder.h index 9038b0a8f0..557065b454 100644 --- a/dom/media/encoder/OpusTrackEncoder.h +++ b/dom/media/encoder/OpusTrackEncoder.h @@ -82,5 +82,6 @@ private: nsTArray mResampledLeftover; }; -} +} // namespace mozilla + #endif diff --git a/dom/media/encoder/TrackEncoder.cpp b/dom/media/encoder/TrackEncoder.cpp index 59ef780424..1c9a4d7373 100644 --- a/dom/media/encoder/TrackEncoder.cpp +++ b/dom/media/encoder/TrackEncoder.cpp @@ -273,4 +273,4 @@ VideoTrackEncoder::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) cons return mRawSegment.SizeOfExcludingThis(aMallocSizeOf); } -} +} // namespace mozilla diff --git a/dom/media/encoder/TrackEncoder.h b/dom/media/encoder/TrackEncoder.h index c7f8b7a975..155419a3aa 100644 --- a/dom/media/encoder/TrackEncoder.h +++ b/dom/media/encoder/TrackEncoder.h @@ -330,5 +330,6 @@ protected: uint32_t mVideoBitrate; }; -} +} // namespace mozilla + #endif diff --git a/dom/media/encoder/TrackMetadataBase.h b/dom/media/encoder/TrackMetadataBase.h index 2d782df263..9baf96e917 100644 --- a/dom/media/encoder/TrackMetadataBase.h +++ b/dom/media/encoder/TrackMetadataBase.h @@ -70,5 +70,6 @@ public: virtual uint32_t GetVideoFrameRate() = 0; }; -} +} // namespace mozilla + #endif diff --git a/dom/media/encoder/VorbisTrackEncoder.h b/dom/media/encoder/VorbisTrackEncoder.h index 3b0a54a645..c15355edc0 100644 --- a/dom/media/encoder/VorbisTrackEncoder.h +++ b/dom/media/encoder/VorbisTrackEncoder.h @@ -50,5 +50,6 @@ private: vorbis_block mVorbisBlock; }; -} +} // namespace mozilla + #endif diff --git a/dom/media/encoder/fmp4_muxer/ISOMediaWriter.cpp b/dom/media/encoder/fmp4_muxer/ISOMediaWriter.cpp index f944e685e3..55451ca249 100644 --- a/dom/media/encoder/fmp4_muxer/ISOMediaWriter.cpp +++ b/dom/media/encoder/fmp4_muxer/ISOMediaWriter.cpp @@ -228,4 +228,4 @@ ISOMediaWriter::SetMetadata(TrackMetadataBase* aMetadata) return NS_ERROR_FAILURE; } -} // namespace mozilla +} // namespace mozilla diff --git a/dom/media/encoder/fmp4_muxer/ISOMediaWriter.h b/dom/media/encoder/fmp4_muxer/ISOMediaWriter.h index bcb047b9a1..5c6e8fb55e 100644 --- a/dom/media/encoder/fmp4_muxer/ISOMediaWriter.h +++ b/dom/media/encoder/fmp4_muxer/ISOMediaWriter.h @@ -100,4 +100,5 @@ private: }; } // namespace mozilla + #endif // ISOMediaWriter_h_ diff --git a/dom/media/fmp4/MP4Demuxer.h b/dom/media/fmp4/MP4Demuxer.h index 4403233e20..5fd9b34ccb 100644 --- a/dom/media/fmp4/MP4Demuxer.h +++ b/dom/media/fmp4/MP4Demuxer.h @@ -16,7 +16,7 @@ namespace mp4_demuxer { class MP4Metadata; class ResourceStream; class SampleIterator; -} +} // namespace mp4_demuxer namespace mozilla { diff --git a/dom/media/fmp4/MP4Stream.cpp b/dom/media/fmp4/MP4Stream.cpp index 11d5654d4d..108c0f8835 100644 --- a/dom/media/fmp4/MP4Stream.cpp +++ b/dom/media/fmp4/MP4Stream.cpp @@ -103,4 +103,5 @@ MP4Stream::Length(int64_t* aSize) *aSize = mResource->GetLength(); return true; } -} + +} // namespace mozilla diff --git a/dom/media/fmp4/MP4Stream.h b/dom/media/fmp4/MP4Stream.h index 62f702f55d..d0b2bfb825 100644 --- a/dom/media/fmp4/MP4Stream.h +++ b/dom/media/fmp4/MP4Stream.h @@ -92,6 +92,6 @@ private: nsTArray mCache; }; -} +} // namespace mozilla #endif diff --git a/dom/media/gmp-plugin/gmp-test-output-protection.h b/dom/media/gmp-plugin/gmp-test-output-protection.h index 85e9bfc4e9..4a56f6bd71 100644 --- a/dom/media/gmp-plugin/gmp-test-output-protection.h +++ b/dom/media/gmp-plugin/gmp-test-output-protection.h @@ -126,5 +126,5 @@ TestOuputProtectionAPIs() return; } -} // gmptest -} // mozilla +} // namespace gmptest +} // namespace mozilla diff --git a/dom/media/gmp/GMPDecryptorProxy.h b/dom/media/gmp/GMPDecryptorProxy.h index bcc9fb2c4c..7fdb4cc133 100644 --- a/dom/media/gmp/GMPDecryptorProxy.h +++ b/dom/media/gmp/GMPDecryptorProxy.h @@ -12,7 +12,7 @@ namespace mozilla { class CryptoSample; -} +} // namespace mozilla class GMPDecryptorProxyCallback : public GMPCallbackBase { public: diff --git a/dom/media/gmp/GMPLoader.cpp b/dom/media/gmp/GMPLoader.cpp index 67e5c602ca..f9e033bd13 100644 --- a/dom/media/gmp/GMPLoader.cpp +++ b/dom/media/gmp/GMPLoader.cpp @@ -55,7 +55,7 @@ struct ScopedActCtxHandleTraits }; typedef mozilla::Scoped ScopedActCtxHandle; -} // anonymous namespace +} // namespace #endif namespace mozilla { diff --git a/dom/media/gmp/GMPSharedMemManager.cpp b/dom/media/gmp/GMPSharedMemManager.cpp index d24a75fe75..06e4fd241c 100644 --- a/dom/media/gmp/GMPSharedMemManager.cpp +++ b/dom/media/gmp/GMPSharedMemManager.cpp @@ -94,5 +94,5 @@ GMPSharedMemManager::NumInUse(GMPSharedMem::GMPMemoryClasses aClass) return mData->mGmpAllocated[aClass] - GetGmpFreelist(aClass).Length(); } -} -} +} // namespace gmp +} // namespace mozilla diff --git a/dom/media/gtest/MockMediaResource.cpp b/dom/media/gtest/MockMediaResource.cpp index 1934d44daa..4ac1866ce3 100644 --- a/dom/media/gtest/MockMediaResource.cpp +++ b/dom/media/gtest/MockMediaResource.cpp @@ -113,4 +113,5 @@ MockMediaResource::GetCachedRanges(nsTArray& aRanges) aRanges.AppendElements(mRanges); return NS_OK; } -} + +} // namespace mozilla diff --git a/dom/media/gtest/MockMediaResource.h b/dom/media/gtest/MockMediaResource.h index a61b95f767..5803c383fd 100644 --- a/dom/media/gtest/MockMediaResource.h +++ b/dom/media/gtest/MockMediaResource.h @@ -87,6 +87,7 @@ private: Atomic mEntry; nsCString mContentType; }; -} + +} // namespace mozilla #endif diff --git a/dom/media/gtest/TestVideoSegment.cpp b/dom/media/gtest/TestVideoSegment.cpp index 412d71e8e9..d9f2bdead6 100644 --- a/dom/media/gtest/TestVideoSegment.cpp +++ b/dom/media/gtest/TestVideoSegment.cpp @@ -10,8 +10,8 @@ using namespace mozilla; namespace mozilla { namespace layer { class Image; - } -} + } // namespace layer +} // namespace mozilla TEST(VideoSegment, TestAppendFrameForceBlack) { diff --git a/dom/media/imagecapture/CaptureTask.h b/dom/media/imagecapture/CaptureTask.h index 5bb7007c5b..44cb472bd5 100644 --- a/dom/media/imagecapture/CaptureTask.h +++ b/dom/media/imagecapture/CaptureTask.h @@ -15,7 +15,7 @@ namespace mozilla { namespace dom { class File; class ImageCapture; -} +} // namespace dom /** * CaptureTask retrieves image from MediaStream and encodes the image to jpeg in diff --git a/dom/media/mediasource/AsyncEventRunner.h b/dom/media/mediasource/AsyncEventRunner.h index e563e7cf8c..d24e8015d9 100644 --- a/dom/media/mediasource/AsyncEventRunner.h +++ b/dom/media/mediasource/AsyncEventRunner.h @@ -32,4 +32,5 @@ private: }; } // namespace mozilla + #endif /* MOZILLA_ASYNCEVENTRUNNER_H_ */ diff --git a/dom/media/mediasource/ContainerParser.h b/dom/media/mediasource/ContainerParser.h index 5b395a9e49..9077081216 100644 --- a/dom/media/mediasource/ContainerParser.h +++ b/dom/media/mediasource/ContainerParser.h @@ -75,4 +75,5 @@ protected: }; } // namespace mozilla + #endif /* MOZILLA_CONTAINERPARSER_H_ */ diff --git a/dom/media/mediasource/MediaSource.h b/dom/media/mediasource/MediaSource.h index 524dadeac9..2adbffcc43 100644 --- a/dom/media/mediasource/MediaSource.h +++ b/dom/media/mediasource/MediaSource.h @@ -181,4 +181,5 @@ NS_DEFINE_STATIC_IID_ACCESSOR(MediaSource, MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATIO } // namespace dom } // namespace mozilla + #endif /* mozilla_dom_MediaSource_h_ */ diff --git a/dom/media/mediasource/ResourceQueue.h b/dom/media/mediasource/ResourceQueue.h index e0704c1a9c..237bac1b2d 100644 --- a/dom/media/mediasource/ResourceQueue.h +++ b/dom/media/mediasource/ResourceQueue.h @@ -228,4 +228,5 @@ private: #undef SBR_DEBUGV } // namespace mozilla + #endif /* MOZILLA_RESOURCEQUEUE_H_ */ diff --git a/dom/media/mediasource/SourceBuffer.h b/dom/media/mediasource/SourceBuffer.h index 634ff60840..cf95c74085 100644 --- a/dom/media/mediasource/SourceBuffer.h +++ b/dom/media/mediasource/SourceBuffer.h @@ -285,4 +285,5 @@ private: } // namespace dom } // namespace mozilla + #endif /* mozilla_dom_SourceBuffer_h_ */ diff --git a/dom/media/mediasource/SourceBufferContentManager.cpp b/dom/media/mediasource/SourceBufferContentManager.cpp index 4ee4f7f9ed..6f8325e01b 100644 --- a/dom/media/mediasource/SourceBufferContentManager.cpp +++ b/dom/media/mediasource/SourceBufferContentManager.cpp @@ -26,4 +26,4 @@ SourceBufferContentManager::CreateManager(dom::SourceBufferAttributes* aAttribut return manager.forget(); } -} +} // namespace mozilla diff --git a/dom/media/mediasource/SourceBufferContentManager.h b/dom/media/mediasource/SourceBufferContentManager.h index f7ac18594c..938351ee55 100644 --- a/dom/media/mediasource/SourceBufferContentManager.h +++ b/dom/media/mediasource/SourceBufferContentManager.h @@ -112,4 +112,5 @@ protected: }; } // namespace mozilla + #endif /* MOZILLA_SOURCEBUFFERCONTENTMANAGER_H_ */ diff --git a/dom/media/mediasource/SourceBufferList.h b/dom/media/mediasource/SourceBufferList.h index 8f4a99e3b0..4a07e828fe 100644 --- a/dom/media/mediasource/SourceBufferList.h +++ b/dom/media/mediasource/SourceBufferList.h @@ -107,4 +107,5 @@ private: } // namespace dom } // namespace mozilla + #endif /* mozilla_dom_SourceBufferList_h_ */ diff --git a/dom/media/mediasource/SourceBufferResource.h b/dom/media/mediasource/SourceBufferResource.h index 80d0073d82..2d19635b6c 100644 --- a/dom/media/mediasource/SourceBufferResource.h +++ b/dom/media/mediasource/SourceBufferResource.h @@ -33,7 +33,7 @@ namespace dom { class SourceBuffer; -} // namespace dom +} // namespace dom class SourceBufferResource final : public MediaResource { diff --git a/dom/media/mediasource/TrackBuffer.h b/dom/media/mediasource/TrackBuffer.h index 7d39bd6ad2..a4e9bfab8c 100644 --- a/dom/media/mediasource/TrackBuffer.h +++ b/dom/media/mediasource/TrackBuffer.h @@ -220,4 +220,5 @@ private: }; } // namespace mozilla + #endif /* MOZILLA_TRACKBUFFER_H_ */ diff --git a/dom/media/mediasource/TrackBuffersManager.cpp b/dom/media/mediasource/TrackBuffersManager.cpp index 793489ed1d..5df57233c9 100644 --- a/dom/media/mediasource/TrackBuffersManager.cpp +++ b/dom/media/mediasource/TrackBuffersManager.cpp @@ -1910,6 +1910,6 @@ TrackBuffersManager::GetNextRandomAccessPoint(TrackInfo::TrackType aTrack) return media::TimeUnit::FromInfinity(); } -} +} // namespace mozilla #undef MSE_DEBUG #undef MSE_DEBUGV diff --git a/dom/media/ogg/OggWriter.cpp b/dom/media/ogg/OggWriter.cpp index 1845c0638c..f6389fa523 100644 --- a/dom/media/ogg/OggWriter.cpp +++ b/dom/media/ogg/OggWriter.cpp @@ -208,4 +208,4 @@ OggWriter::SetMetadata(TrackMetadataBase* aMetadata) return NS_OK; } -} +} // namespace mozilla diff --git a/dom/media/ogg/OggWriter.h b/dom/media/ogg/OggWriter.h index 2f2059aa3d..95ce0c5974 100644 --- a/dom/media/ogg/OggWriter.h +++ b/dom/media/ogg/OggWriter.h @@ -46,5 +46,7 @@ private: ogg_page mOggPage; ogg_packet mPacket; }; -} + +} // namespace mozilla + #endif diff --git a/dom/media/omx/MediaStreamSource.cpp b/dom/media/omx/MediaStreamSource.cpp index c97cfcdc33..c9d4cbd67d 100644 --- a/dom/media/omx/MediaStreamSource.cpp +++ b/dom/media/omx/MediaStreamSource.cpp @@ -61,4 +61,4 @@ status_t MediaStreamSource::getSize(off64_t *size) return OK; } -} // namespace android +} // namespace android diff --git a/dom/media/omx/OMXCodecProxy.cpp b/dom/media/omx/OMXCodecProxy.cpp index 9d0d238410..7b8e6968b5 100644 --- a/dom/media/omx/OMXCodecProxy.cpp +++ b/dom/media/omx/OMXCodecProxy.cpp @@ -253,4 +253,4 @@ status_t OMXCodecProxy::pause() return mOMXCodec->pause(); } -} // namespace android +} // namespace android diff --git a/dom/media/omx/OMXCodecProxy.h b/dom/media/omx/OMXCodecProxy.h index 166ea6b4d5..a583acc05b 100644 --- a/dom/media/omx/OMXCodecProxy.h +++ b/dom/media/omx/OMXCodecProxy.h @@ -95,6 +95,6 @@ private: wp mEventListener; }; -} // namespace android +} // namespace android #endif // OMX_CODEC_PROXY_DECODER_H_ diff --git a/dom/media/omx/OMXCodecWrapper.h b/dom/media/omx/OMXCodecWrapper.h index 0ee2e95484..72e35e7208 100644 --- a/dom/media/omx/OMXCodecWrapper.h +++ b/dom/media/omx/OMXCodecWrapper.h @@ -355,4 +355,5 @@ private: }; } // namespace android + #endif // OMXCodecWrapper_h_ diff --git a/dom/media/platforms/PlatformDecoderModule.h b/dom/media/platforms/PlatformDecoderModule.h index 69fdbee9b4..8ee6899aef 100644 --- a/dom/media/platforms/PlatformDecoderModule.h +++ b/dom/media/platforms/PlatformDecoderModule.h @@ -24,7 +24,7 @@ class MediaByteBuffer; namespace layers { class ImageContainer; -} +} // namespace layers class MediaDataDecoder; class MediaDataDecoderCallback; diff --git a/dom/media/platforms/SharedDecoderManager.cpp b/dom/media/platforms/SharedDecoderManager.cpp index 509bde6a4d..819d62e637 100644 --- a/dom/media/platforms/SharedDecoderManager.cpp +++ b/dom/media/platforms/SharedDecoderManager.cpp @@ -263,4 +263,4 @@ SharedDecoderProxy::IsHardwareAccelerated() const return mManager->mDecoder->IsHardwareAccelerated(); } -} +} // namespace mozilla diff --git a/dom/media/platforms/SharedDecoderManager.h b/dom/media/platforms/SharedDecoderManager.h index 8564d3bf72..d8c569d5af 100644 --- a/dom/media/platforms/SharedDecoderManager.h +++ b/dom/media/platforms/SharedDecoderManager.h @@ -83,6 +83,7 @@ private: nsRefPtr mManager; MediaDataDecoderCallback* mCallback; }; -} + +} // namespace mozilla #endif diff --git a/dom/media/platforms/apple/AppleATDecoder.cpp b/dom/media/platforms/apple/AppleATDecoder.cpp index bd8db77ab7..37f6855712 100644 --- a/dom/media/platforms/apple/AppleATDecoder.cpp +++ b/dom/media/platforms/apple/AppleATDecoder.cpp @@ -511,4 +511,5 @@ AppleATDecoder::GetImplicitAACMagicCookie(const MediaRawData* aSample) return (mFileStreamError || status) ? NS_ERROR_FAILURE : NS_OK; } + } // namespace mozilla diff --git a/dom/media/platforms/apple/AppleVDADecoder.h b/dom/media/platforms/apple/AppleVDADecoder.h index b31a0bad1a..7820d55d3d 100644 --- a/dom/media/platforms/apple/AppleVDADecoder.h +++ b/dom/media/platforms/apple/AppleVDADecoder.h @@ -22,7 +22,7 @@ class FlushableMediaTaskQueue; class MediaDataDecoderCallback; namespace layers { class ImageContainer; -} +} // namespace layers class AppleVDADecoder : public MediaDataDecoder { public: diff --git a/dom/media/platforms/gonk/GonkAudioDecoderManager.cpp b/dom/media/platforms/gonk/GonkAudioDecoderManager.cpp index c02ce27cb9..71cc833df9 100644 --- a/dom/media/platforms/gonk/GonkAudioDecoderManager.cpp +++ b/dom/media/platforms/gonk/GonkAudioDecoderManager.cpp @@ -264,4 +264,5 @@ GonkAudioDecoderManager::Flush() } return NS_OK; } + } // namespace mozilla diff --git a/dom/media/wave/WaveReader.cpp b/dom/media/wave/WaveReader.cpp index c1c0343016..1b65ec94f3 100644 --- a/dom/media/wave/WaveReader.cpp +++ b/dom/media/wave/WaveReader.cpp @@ -108,7 +108,7 @@ namespace { *aBuffer += sizeof(uint8_t); return result; } -} +} // namespace WaveReader::WaveReader(AbstractMediaDecoder* aDecoder) : MediaDecoderReader(aDecoder) diff --git a/dom/media/webaudio/AnalyserNode.cpp b/dom/media/webaudio/AnalyserNode.cpp index d6adbcfcf8..663d5ba797 100644 --- a/dom/media/webaudio/AnalyserNode.cpp +++ b/dom/media/webaudio/AnalyserNode.cpp @@ -350,6 +350,6 @@ AnalyserNode::AppendChunk(const AudioChunk& aChunk) } } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AnalyserNode.h b/dom/media/webaudio/AnalyserNode.h index af29bd14ed..e73865bf89 100644 --- a/dom/media/webaudio/AnalyserNode.h +++ b/dom/media/webaudio/AnalyserNode.h @@ -81,8 +81,8 @@ private: FallibleTArray mOutputBuffer; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioBuffer.cpp b/dom/media/webaudio/AudioBuffer.cpp index 28bd022c3f..0ad4d55fce 100644 --- a/dom/media/webaudio/AudioBuffer.cpp +++ b/dom/media/webaudio/AudioBuffer.cpp @@ -267,5 +267,5 @@ AudioBuffer::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const return amount; } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioBuffer.h b/dom/media/webaudio/AudioBuffer.h index ba4ed9c3b2..92a52149ef 100644 --- a/dom/media/webaudio/AudioBuffer.h +++ b/dom/media/webaudio/AudioBuffer.h @@ -116,8 +116,8 @@ protected: float mSampleRate; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioBufferSourceNode.cpp b/dom/media/webaudio/AudioBufferSourceNode.cpp index 065af4fca9..75412a5f5a 100644 --- a/dom/media/webaudio/AudioBufferSourceNode.cpp +++ b/dom/media/webaudio/AudioBufferSourceNode.cpp @@ -771,5 +771,5 @@ AudioBufferSourceNode::SendLoopParametersToStream() } } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioBufferSourceNode.h b/dom/media/webaudio/AudioBufferSourceNode.h index 66ea845109..159e617724 100644 --- a/dom/media/webaudio/AudioBufferSourceNode.h +++ b/dom/media/webaudio/AudioBufferSourceNode.h @@ -143,8 +143,8 @@ private: bool mStopped; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioContext.cpp b/dom/media/webaudio/AudioContext.cpp index 854eef3461..592ab2c98e 100644 --- a/dom/media/webaudio/AudioContext.cpp +++ b/dom/media/webaudio/AudioContext.cpp @@ -257,7 +257,7 @@ bool IsValidBufferSize(uint32_t aBufferSize) { } } -} +} // namespace already_AddRefed AudioContext::CreateMediaStreamDestination(ErrorResult& aRv) @@ -1020,5 +1020,5 @@ AudioContext::ExtraCurrentTime() const return mDestination->ExtraCurrentTime(); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioContext.h b/dom/media/webaudio/AudioContext.h index 20e7f5b648..192957aa7a 100644 --- a/dom/media/webaudio/AudioContext.h +++ b/dom/media/webaudio/AudioContext.h @@ -351,8 +351,8 @@ private: static const dom::AudioContext::AudioContextId NO_AUDIO_CONTEXT = 0; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioDestinationNode.cpp b/dom/media/webaudio/AudioDestinationNode.cpp index 172bbd7c85..5c2360abcc 100644 --- a/dom/media/webaudio/AudioDestinationNode.cpp +++ b/dom/media/webaudio/AudioDestinationNode.cpp @@ -772,5 +772,5 @@ AudioDestinationNode::InputMuted(bool aMuted) CanPlayChanged(state); } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioDestinationNode.h b/dom/media/webaudio/AudioDestinationNode.h index 230d636d28..8200855aba 100644 --- a/dom/media/webaudio/AudioDestinationNode.h +++ b/dom/media/webaudio/AudioDestinationNode.h @@ -118,8 +118,8 @@ private: bool mExtraCurrentTimeUpdatedSinceLastStableState; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioEventTimeline.h b/dom/media/webaudio/AudioEventTimeline.h index 2a8903c790..b94fb5851b 100644 --- a/dom/media/webaudio/AudioEventTimeline.h +++ b/dom/media/webaudio/AudioEventTimeline.h @@ -575,8 +575,8 @@ private: float mLastComputedValue; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioListener.cpp b/dom/media/webaudio/AudioListener.cpp index 5a55d9b97f..6b08531e46 100644 --- a/dom/media/webaudio/AudioListener.cpp +++ b/dom/media/webaudio/AudioListener.cpp @@ -126,6 +126,6 @@ AudioListener::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const return amount; } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioListener.h b/dom/media/webaudio/AudioListener.h index c432d8fb66..86626045b2 100644 --- a/dom/media/webaudio/AudioListener.h +++ b/dom/media/webaudio/AudioListener.h @@ -127,8 +127,8 @@ private: nsTArray > mPanners; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioNode.cpp b/dom/media/webaudio/AudioNode.cpp index 622c4aa9f9..9d62606629 100644 --- a/dom/media/webaudio/AudioNode.cpp +++ b/dom/media/webaudio/AudioNode.cpp @@ -427,5 +427,5 @@ AudioNode::SetPassThrough(bool aPassThrough) ns->SetPassThrough(mPassThrough); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioNode.h b/dom/media/webaudio/AudioNode.h index 9fd85f62eb..0ac4a6c737 100644 --- a/dom/media/webaudio/AudioNode.h +++ b/dom/media/webaudio/AudioNode.h @@ -246,7 +246,7 @@ private: bool mPassThrough; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioNodeEngine.cpp b/dom/media/webaudio/AudioNodeEngine.cpp index 82a969a965..57a9f71d98 100644 --- a/dom/media/webaudio/AudioNodeEngine.cpp +++ b/dom/media/webaudio/AudioNodeEngine.cpp @@ -273,4 +273,4 @@ AudioBufferSumOfSquares(const float* aInput, uint32_t aLength) return sum; } -} +} // namespace mozilla diff --git a/dom/media/webaudio/AudioNodeEngine.h b/dom/media/webaudio/AudioNodeEngine.h index a750e555dc..1105b10b38 100644 --- a/dom/media/webaudio/AudioNodeEngine.h +++ b/dom/media/webaudio/AudioNodeEngine.h @@ -17,7 +17,7 @@ namespace dom { struct ThreeDPoint; class AudioParamTimeline; class DelayNodeEngine; -} +} // namespace dom class AudioNodeStream; @@ -399,6 +399,6 @@ private: const uint16_t mOutputCount; }; -} +} // namespace mozilla #endif /* MOZILLA_AUDIONODEENGINE_H_ */ diff --git a/dom/media/webaudio/AudioNodeExternalInputStream.cpp b/dom/media/webaudio/AudioNodeExternalInputStream.cpp index b165af71d0..84fdecbaea 100644 --- a/dom/media/webaudio/AudioNodeExternalInputStream.cpp +++ b/dom/media/webaudio/AudioNodeExternalInputStream.cpp @@ -195,4 +195,4 @@ AudioNodeExternalInputStream::IsEnabled() return ((MediaStreamAudioSourceNodeEngine*)Engine())->IsEnabled(); } -} +} // namespace mozilla diff --git a/dom/media/webaudio/AudioNodeExternalInputStream.h b/dom/media/webaudio/AudioNodeExternalInputStream.h index d2248a8232..12df5a39a7 100644 --- a/dom/media/webaudio/AudioNodeExternalInputStream.h +++ b/dom/media/webaudio/AudioNodeExternalInputStream.h @@ -36,6 +36,6 @@ private: bool IsEnabled(); }; -} +} // namespace mozilla #endif /* MOZILLA_AUDIONODESTREAM_H_ */ diff --git a/dom/media/webaudio/AudioNodeStream.cpp b/dom/media/webaudio/AudioNodeStream.cpp index 8e23ec1608..2268d26ebf 100644 --- a/dom/media/webaudio/AudioNodeStream.cpp +++ b/dom/media/webaudio/AudioNodeStream.cpp @@ -644,4 +644,4 @@ AudioNodeStream::DestinationTimeFromTicks(AudioNodeStream* aDestination, return StreamTimeToSeconds(destinationTime); } -} +} // namespace mozilla diff --git a/dom/media/webaudio/AudioNodeStream.h b/dom/media/webaudio/AudioNodeStream.h index 52711abefb..af2b2efd35 100644 --- a/dom/media/webaudio/AudioNodeStream.h +++ b/dom/media/webaudio/AudioNodeStream.h @@ -16,7 +16,7 @@ namespace dom { struct ThreeDPoint; class AudioParamTimeline; class AudioContext; -} +} // namespace dom class ThreadSharedFloatArrayBufferList; class AudioNodeEngine; @@ -188,6 +188,6 @@ protected: bool mPassThrough; }; -} +} // namespace mozilla #endif /* MOZILLA_AUDIONODESTREAM_H_ */ diff --git a/dom/media/webaudio/AudioParam.cpp b/dom/media/webaudio/AudioParam.cpp index 8aea904029..ae13d82648 100644 --- a/dom/media/webaudio/AudioParam.cpp +++ b/dom/media/webaudio/AudioParam.cpp @@ -143,6 +143,6 @@ AudioParamTimeline::AudioNodeInputValue(size_t aCounter) const return audioNodeInputValue; } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioParam.h b/dom/media/webaudio/AudioParam.h index 2e5b6f5c1d..82f0490cff 100644 --- a/dom/media/webaudio/AudioParam.h +++ b/dom/media/webaudio/AudioParam.h @@ -187,8 +187,8 @@ private: nsRefPtr mNodeStreamPort; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioParamTimeline.h b/dom/media/webaudio/AudioParamTimeline.h index ec4bb40c52..caeef11518 100644 --- a/dom/media/webaudio/AudioParamTimeline.h +++ b/dom/media/webaudio/AudioParamTimeline.h @@ -93,8 +93,8 @@ AudioParamTimeline::GetValueAtTime(int64_t aTime, size_t aCounter) (mStream ? AudioNodeInputValue(aCounter) : 0.0f); } -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/AudioProcessingEvent.cpp b/dom/media/webaudio/AudioProcessingEvent.cpp index 671ec86132..a17be051f2 100644 --- a/dom/media/webaudio/AudioProcessingEvent.cpp +++ b/dom/media/webaudio/AudioProcessingEvent.cpp @@ -59,6 +59,6 @@ AudioProcessingEvent::LazilyCreateBuffer(uint32_t aNumberOfChannels, return buffer.forget(); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/AudioProcessingEvent.h b/dom/media/webaudio/AudioProcessingEvent.h index 260633bd82..17dce9031c 100644 --- a/dom/media/webaudio/AudioProcessingEvent.h +++ b/dom/media/webaudio/AudioProcessingEvent.h @@ -78,8 +78,8 @@ private: uint32_t mNumberOfInputChannels; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/BiquadFilterNode.cpp b/dom/media/webaudio/BiquadFilterNode.cpp index 3e6341a9d7..855e8a5847 100644 --- a/dom/media/webaudio/BiquadFilterNode.cpp +++ b/dom/media/webaudio/BiquadFilterNode.cpp @@ -366,5 +366,5 @@ BiquadFilterNode::SendGainToStream(AudioNode* aNode) SendTimelineParameterToStream(This, BiquadFilterNodeEngine::GAIN, *This->mGain); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/BiquadFilterNode.h b/dom/media/webaudio/BiquadFilterNode.h index 28f5937a62..43a82807c1 100644 --- a/dom/media/webaudio/BiquadFilterNode.h +++ b/dom/media/webaudio/BiquadFilterNode.h @@ -81,8 +81,8 @@ private: nsRefPtr mGain; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/ChannelMergerNode.cpp b/dom/media/webaudio/ChannelMergerNode.cpp index de910c5d4c..9c641e453c 100644 --- a/dom/media/webaudio/ChannelMergerNode.cpp +++ b/dom/media/webaudio/ChannelMergerNode.cpp @@ -87,6 +87,6 @@ ChannelMergerNode::WrapObject(JSContext* aCx, JS::Handle aGivenProto) return ChannelMergerNodeBinding::Wrap(aCx, this, aGivenProto); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/ChannelMergerNode.h b/dom/media/webaudio/ChannelMergerNode.h index 8188c1bb35..ebf13cd442 100644 --- a/dom/media/webaudio/ChannelMergerNode.h +++ b/dom/media/webaudio/ChannelMergerNode.h @@ -43,8 +43,8 @@ private: const uint16_t mInputCount; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/ChannelSplitterNode.cpp b/dom/media/webaudio/ChannelSplitterNode.cpp index a967e47bdd..4644e38390 100644 --- a/dom/media/webaudio/ChannelSplitterNode.cpp +++ b/dom/media/webaudio/ChannelSplitterNode.cpp @@ -74,6 +74,6 @@ ChannelSplitterNode::WrapObject(JSContext* aCx, JS::Handle aGivenProt return ChannelSplitterNodeBinding::Wrap(aCx, this, aGivenProto); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/ChannelSplitterNode.h b/dom/media/webaudio/ChannelSplitterNode.h index ad8df549c4..ba3bd557e8 100644 --- a/dom/media/webaudio/ChannelSplitterNode.h +++ b/dom/media/webaudio/ChannelSplitterNode.h @@ -43,8 +43,8 @@ private: const uint16_t mOutputCount; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/ConvolverNode.cpp b/dom/media/webaudio/ConvolverNode.cpp index 68403d9652..594af577a7 100644 --- a/dom/media/webaudio/ConvolverNode.cpp +++ b/dom/media/webaudio/ConvolverNode.cpp @@ -278,6 +278,6 @@ ConvolverNode::SetNormalize(bool aNormalize) SendInt32ParameterToStream(ConvolverNodeEngine::NORMALIZE, aNormalize); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/DelayBuffer.cpp b/dom/media/webaudio/DelayBuffer.cpp index 857ed24d1d..2da0db73f3 100644 --- a/dom/media/webaudio/DelayBuffer.cpp +++ b/dom/media/webaudio/DelayBuffer.cpp @@ -264,4 +264,4 @@ DelayBuffer::UpdateUpmixChannels(int aNewReadChunk, uint32_t aChannelCount, } } -} // mozilla +} // namespace mozilla diff --git a/dom/media/webaudio/DelayBuffer.h b/dom/media/webaudio/DelayBuffer.h index 400208b8c9..ebefd7c5bf 100644 --- a/dom/media/webaudio/DelayBuffer.h +++ b/dom/media/webaudio/DelayBuffer.h @@ -109,6 +109,6 @@ private: #endif }; -} // mozilla +} // namespace mozilla #endif // DelayBuffer_h_ diff --git a/dom/media/webaudio/DelayNode.cpp b/dom/media/webaudio/DelayNode.cpp index 76b71203e3..035f6d2212 100644 --- a/dom/media/webaudio/DelayNode.cpp +++ b/dom/media/webaudio/DelayNode.cpp @@ -230,5 +230,5 @@ DelayNode::SendDelayToStream(AudioNode* aNode) SendTimelineParameterToStream(This, DelayNodeEngine::DELAY, *This->mDelay); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/DelayNode.h b/dom/media/webaudio/DelayNode.h index eb3d65c2d4..dcfea67be6 100644 --- a/dom/media/webaudio/DelayNode.h +++ b/dom/media/webaudio/DelayNode.h @@ -49,8 +49,8 @@ private: nsRefPtr mDelay; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/DynamicsCompressorNode.cpp b/dom/media/webaudio/DynamicsCompressorNode.cpp index 57a2be51d6..ca35f4993b 100644 --- a/dom/media/webaudio/DynamicsCompressorNode.cpp +++ b/dom/media/webaudio/DynamicsCompressorNode.cpp @@ -279,5 +279,5 @@ DynamicsCompressorNode::SendReleaseToStream(AudioNode* aNode) SendTimelineParameterToStream(This, DynamicsCompressorNodeEngine::RELEASE, *This->mRelease); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/DynamicsCompressorNode.h b/dom/media/webaudio/DynamicsCompressorNode.h index c58ca841c4..10df51ebee 100644 --- a/dom/media/webaudio/DynamicsCompressorNode.h +++ b/dom/media/webaudio/DynamicsCompressorNode.h @@ -83,8 +83,8 @@ private: nsRefPtr mRelease; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/GainNode.cpp b/dom/media/webaudio/GainNode.cpp index 729f9619f9..830d1a4708 100644 --- a/dom/media/webaudio/GainNode.cpp +++ b/dom/media/webaudio/GainNode.cpp @@ -163,5 +163,5 @@ GainNode::SendGainToStream(AudioNode* aNode) SendTimelineParameterToStream(This, GainNodeEngine::GAIN, *This->mGain); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/GainNode.h b/dom/media/webaudio/GainNode.h index b13c2087cc..46a21bb002 100644 --- a/dom/media/webaudio/GainNode.h +++ b/dom/media/webaudio/GainNode.h @@ -48,8 +48,8 @@ private: nsRefPtr mGain; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/MediaBufferDecoder.cpp b/dom/media/webaudio/MediaBufferDecoder.cpp index 66f4d4e329..39e68e9257 100644 --- a/dom/media/webaudio/MediaBufferDecoder.cpp +++ b/dom/media/webaudio/MediaBufferDecoder.cpp @@ -629,5 +629,5 @@ WebAudioDecodeJob::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf); } -} +} // namespace mozilla diff --git a/dom/media/webaudio/MediaBufferDecoder.h b/dom/media/webaudio/MediaBufferDecoder.h index 5cdcd48632..32e1c922d0 100644 --- a/dom/media/webaudio/MediaBufferDecoder.h +++ b/dom/media/webaudio/MediaBufferDecoder.h @@ -22,7 +22,7 @@ class AudioContext; class DecodeErrorCallback; class DecodeSuccessCallback; class Promise; -} +} // namespace dom struct WebAudioDecodeJob final { @@ -72,7 +72,7 @@ private: void AsyncDecodeWebAudio(const char* aContentType, uint8_t* aBuffer, uint32_t aLength, WebAudioDecodeJob& aDecodeJob); -} +} // namespace mozilla #endif diff --git a/dom/media/webaudio/MediaElementAudioSourceNode.cpp b/dom/media/webaudio/MediaElementAudioSourceNode.cpp index 8568124bd2..db3dc68546 100644 --- a/dom/media/webaudio/MediaElementAudioSourceNode.cpp +++ b/dom/media/webaudio/MediaElementAudioSourceNode.cpp @@ -36,5 +36,5 @@ MediaElementAudioSourceNode::WrapObject(JSContext* aCx, JS::Handle aG return MediaElementAudioSourceNodeBinding::Wrap(aCx, this, aGivenProto); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/MediaElementAudioSourceNode.h b/dom/media/webaudio/MediaElementAudioSourceNode.h index 076bfe8945..8a131f6a6b 100644 --- a/dom/media/webaudio/MediaElementAudioSourceNode.h +++ b/dom/media/webaudio/MediaElementAudioSourceNode.h @@ -33,7 +33,7 @@ private: explicit MediaElementAudioSourceNode(AudioContext* aContext); }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/MediaStreamAudioDestinationNode.cpp b/dom/media/webaudio/MediaStreamAudioDestinationNode.cpp index b88972c003..f471711843 100644 --- a/dom/media/webaudio/MediaStreamAudioDestinationNode.cpp +++ b/dom/media/webaudio/MediaStreamAudioDestinationNode.cpp @@ -81,5 +81,5 @@ MediaStreamAudioDestinationNode::WrapObject(JSContext* aCx, JS::Handle mPort; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/MediaStreamAudioSourceNode.cpp b/dom/media/webaudio/MediaStreamAudioSourceNode.cpp index 615c79da45..19e043bf3e 100644 --- a/dom/media/webaudio/MediaStreamAudioSourceNode.cpp +++ b/dom/media/webaudio/MediaStreamAudioSourceNode.cpp @@ -149,5 +149,5 @@ MediaStreamAudioSourceNode::WrapObject(JSContext* aCx, JS::Handle aGi return MediaStreamAudioSourceNodeBinding::Wrap(aCx, this, aGivenProto); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/MediaStreamAudioSourceNode.h b/dom/media/webaudio/MediaStreamAudioSourceNode.h index b888289304..e013239a93 100644 --- a/dom/media/webaudio/MediaStreamAudioSourceNode.h +++ b/dom/media/webaudio/MediaStreamAudioSourceNode.h @@ -76,7 +76,7 @@ private: nsRefPtr mInputStream; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/OfflineAudioCompletionEvent.cpp b/dom/media/webaudio/OfflineAudioCompletionEvent.cpp index b745952f03..30a5717193 100644 --- a/dom/media/webaudio/OfflineAudioCompletionEvent.cpp +++ b/dom/media/webaudio/OfflineAudioCompletionEvent.cpp @@ -37,6 +37,6 @@ OfflineAudioCompletionEvent::WrapObjectInternal(JSContext* aCx, JS::Handle mRenderedBuffer; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/OscillatorNode.cpp b/dom/media/webaudio/OscillatorNode.cpp index e3fb0ea721..f1a0c7e653 100644 --- a/dom/media/webaudio/OscillatorNode.cpp +++ b/dom/media/webaudio/OscillatorNode.cpp @@ -546,5 +546,5 @@ OscillatorNode::NotifyMainThreadStateChanged() } } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/OscillatorNode.h b/dom/media/webaudio/OscillatorNode.h index d758d46da7..99bcabde24 100644 --- a/dom/media/webaudio/OscillatorNode.h +++ b/dom/media/webaudio/OscillatorNode.h @@ -106,8 +106,8 @@ private: bool mStopped; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/PannerNode.cpp b/dom/media/webaudio/PannerNode.cpp index 74da8d26d4..a9526144a0 100644 --- a/dom/media/webaudio/PannerNode.cpp +++ b/dom/media/webaudio/PannerNode.cpp @@ -561,6 +561,6 @@ PannerNode::SendDopplerToSourcesIfNeeded() } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/PannerNode.h b/dom/media/webaudio/PannerNode.h index 2beac63a66..bc997a7a3f 100644 --- a/dom/media/webaudio/PannerNode.h +++ b/dom/media/webaudio/PannerNode.h @@ -247,8 +247,8 @@ private: nsTArray mSources; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/PanningUtils.h b/dom/media/webaudio/PanningUtils.h index 3a7df06d34..126bc89828 100644 --- a/dom/media/webaudio/PanningUtils.h +++ b/dom/media/webaudio/PanningUtils.h @@ -59,7 +59,7 @@ void ApplyStereoPanning(const AudioChunk& aInput, AudioChunk* aOutput, } } -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla #endif // PANNING_UTILS_H diff --git a/dom/media/webaudio/PeriodicWave.h b/dom/media/webaudio/PeriodicWave.h index a27646d504..0b51951c78 100644 --- a/dom/media/webaudio/PeriodicWave.h +++ b/dom/media/webaudio/PeriodicWave.h @@ -58,7 +58,7 @@ private: uint32_t mLength; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/PlayingRefChangeHandler.h b/dom/media/webaudio/PlayingRefChangeHandler.h index f494d3ca34..27b29b7551 100644 --- a/dom/media/webaudio/PlayingRefChangeHandler.h +++ b/dom/media/webaudio/PlayingRefChangeHandler.h @@ -49,8 +49,8 @@ private: ChangeType mChange; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/ScriptProcessorNode.cpp b/dom/media/webaudio/ScriptProcessorNode.cpp index 8158a734d0..a3ad900afe 100644 --- a/dom/media/webaudio/ScriptProcessorNode.cpp +++ b/dom/media/webaudio/ScriptProcessorNode.cpp @@ -517,6 +517,6 @@ ScriptProcessorNode::WrapObject(JSContext* aCx, JS::Handle aGivenProt return ScriptProcessorNodeBinding::Wrap(aCx, this, aGivenProto); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/ScriptProcessorNode.h b/dom/media/webaudio/ScriptProcessorNode.h index c6028ab940..b4a971b8f1 100644 --- a/dom/media/webaudio/ScriptProcessorNode.h +++ b/dom/media/webaudio/ScriptProcessorNode.h @@ -106,8 +106,8 @@ private: const uint32_t mNumberOfOutputChannels; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/StereoPannerNode.cpp b/dom/media/webaudio/StereoPannerNode.cpp index 3b00d41b0c..a3b713d4b2 100644 --- a/dom/media/webaudio/StereoPannerNode.cpp +++ b/dom/media/webaudio/StereoPannerNode.cpp @@ -215,5 +215,5 @@ StereoPannerNode::SendPanToStream(AudioNode* aNode) SendTimelineParameterToStream(This, StereoPannerNodeEngine::PAN, *This->mPan); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/StereoPannerNode.h b/dom/media/webaudio/StereoPannerNode.h index e0b01dbaed..66674c79e3 100644 --- a/dom/media/webaudio/StereoPannerNode.h +++ b/dom/media/webaudio/StereoPannerNode.h @@ -64,8 +64,8 @@ private: nsRefPtr mPan; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/ThreeDPoint.cpp b/dom/media/webaudio/ThreeDPoint.cpp index 422c36078a..ad816eb89d 100644 --- a/dom/media/webaudio/ThreeDPoint.cpp +++ b/dom/media/webaudio/ThreeDPoint.cpp @@ -45,5 +45,5 @@ bool operator==(const ThreeDPoint& lhs, const ThreeDPoint& rhs) lhs.z == rhs.z; } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/ThreeDPoint.h b/dom/media/webaudio/ThreeDPoint.h index 24a6a32e0d..27b9e05533 100644 --- a/dom/media/webaudio/ThreeDPoint.h +++ b/dom/media/webaudio/ThreeDPoint.h @@ -81,8 +81,8 @@ ThreeDPoint operator*(const ThreeDPoint& lhs, const ThreeDPoint& rhs); ThreeDPoint operator*(const ThreeDPoint& lhs, const double rhs); bool operator==(const ThreeDPoint& lhs, const ThreeDPoint& rhs); -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/WaveShaperNode.cpp b/dom/media/webaudio/WaveShaperNode.cpp index 15726c07c4..c5d2f9cbb8 100644 --- a/dom/media/webaudio/WaveShaperNode.cpp +++ b/dom/media/webaudio/WaveShaperNode.cpp @@ -336,5 +336,5 @@ WaveShaperNode::SetOversample(OverSampleType aType) SendInt32ParameterToStream(WaveShaperNodeEngine::TYPE, static_cast(aType)); } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/WaveShaperNode.h b/dom/media/webaudio/WaveShaperNode.h index ea9670d78c..7c0d50eb38 100644 --- a/dom/media/webaudio/WaveShaperNode.h +++ b/dom/media/webaudio/WaveShaperNode.h @@ -69,7 +69,7 @@ private: OverSampleType mType; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/WebAudioUtils.cpp b/dom/media/webaudio/WebAudioUtils.cpp index b0a20cf286..6c11460872 100644 --- a/dom/media/webaudio/WebAudioUtils.cpp +++ b/dom/media/webaudio/WebAudioUtils.cpp @@ -105,5 +105,5 @@ WebAudioUtils::SpeexResamplerProcess(SpeexResamplerState* aResampler, #endif } -} -} +} // namespace dom +} // namespace mozilla diff --git a/dom/media/webaudio/WebAudioUtils.h b/dom/media/webaudio/WebAudioUtils.h index baaa373535..060072d940 100644 --- a/dom/media/webaudio/WebAudioUtils.h +++ b/dom/media/webaudio/WebAudioUtils.h @@ -222,10 +222,10 @@ namespace WebAudioUtils { uint32_t aChannel, const int16_t* aIn, uint32_t* aInLen, int16_t* aOut, uint32_t* aOutLen); - } + } // namespace WebAudioUtils -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/media/webaudio/blink/DenormalDisabler.h b/dom/media/webaudio/blink/DenormalDisabler.h index d0ce4eae09..34a56069ab 100644 --- a/dom/media/webaudio/blink/DenormalDisabler.h +++ b/dom/media/webaudio/blink/DenormalDisabler.h @@ -119,7 +119,7 @@ public: #endif -} // WebCore +} // namespace WebCore #undef HAVE_DENORMAL #endif // DenormalDisabler_h diff --git a/dom/media/webaudio/blink/DynamicsCompressor.h b/dom/media/webaudio/blink/DynamicsCompressor.h index 17b6d24b06..be492bd771 100644 --- a/dom/media/webaudio/blink/DynamicsCompressor.h +++ b/dom/media/webaudio/blink/DynamicsCompressor.h @@ -38,7 +38,7 @@ namespace mozilla { struct AudioChunk; -} +} // namespace mozilla namespace WebCore { diff --git a/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp b/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp index 1ef34036d9..6e47e1b1cf 100644 --- a/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp +++ b/dom/media/webaudio/blink/HRTFDatabaseLoader.cpp @@ -225,4 +225,5 @@ void HRTFDatabaseLoader::shutdown() delete loaderMap; } } + } // namespace WebCore diff --git a/dom/media/webaudio/blink/HRTFKernel.h b/dom/media/webaudio/blink/HRTFKernel.h index 5533dc4df1..940e69b139 100644 --- a/dom/media/webaudio/blink/HRTFKernel.h +++ b/dom/media/webaudio/blink/HRTFKernel.h @@ -115,4 +115,5 @@ inline nsReturnRef HRTFKernel::create(nsAutoPtr fftFrame, } } // namespace WebCore + #endif // HRTFKernel_h diff --git a/dom/media/webaudio/blink/HRTFPanner.h b/dom/media/webaudio/blink/HRTFPanner.h index 61ca369cd9..3587375510 100644 --- a/dom/media/webaudio/blink/HRTFPanner.h +++ b/dom/media/webaudio/blink/HRTFPanner.h @@ -31,7 +31,7 @@ namespace mozilla { struct AudioChunk; -} +} // namespace mozilla namespace WebCore { diff --git a/dom/media/webaudio/blink/Reverb.h b/dom/media/webaudio/blink/Reverb.h index 97fa311cdb..54aeb546a2 100644 --- a/dom/media/webaudio/blink/Reverb.h +++ b/dom/media/webaudio/blink/Reverb.h @@ -37,7 +37,7 @@ namespace mozilla { class ThreadSharedFloatArrayBufferList; -} +} // namespace mozilla namespace WebCore { diff --git a/dom/media/webaudio/compiledtest/TestAudioEventTimeline.cpp b/dom/media/webaudio/compiledtest/TestAudioEventTimeline.cpp index cc08ec4292..dd69075a89 100644 --- a/dom/media/webaudio/compiledtest/TestAudioEventTimeline.cpp +++ b/dom/media/webaudio/compiledtest/TestAudioEventTimeline.cpp @@ -33,7 +33,7 @@ operator<<(basic_ostream >& os, nsresult rv) return os; } -} +} // namespace std template void is(const T& a, const U& b, const char* msg) diff --git a/dom/media/webm/EbmlComposer.cpp b/dom/media/webm/EbmlComposer.cpp index 257e2ca606..186078e960 100644 --- a/dom/media/webm/EbmlComposer.cpp +++ b/dom/media/webm/EbmlComposer.cpp @@ -212,4 +212,4 @@ EbmlComposer::EbmlComposer() , mChannels(0) {} -} +} // namespace mozilla diff --git a/dom/media/webm/EbmlComposer.h b/dom/media/webm/EbmlComposer.h index ac7446e123..86d84d518e 100644 --- a/dom/media/webm/EbmlComposer.h +++ b/dom/media/webm/EbmlComposer.h @@ -84,5 +84,6 @@ private: int mChannels; }; -} +} // namespace mozilla + #endif diff --git a/dom/media/webm/WebMWriter.cpp b/dom/media/webm/WebMWriter.cpp index 4a6c2368fb..cdafa74f97 100644 --- a/dom/media/webm/WebMWriter.cpp +++ b/dom/media/webm/WebMWriter.cpp @@ -75,4 +75,4 @@ WebMWriter::SetMetadata(TrackMetadataBase* aMetadata) return NS_OK; } -} // mozilla namespace +} // namespace mozilla diff --git a/dom/media/webm/WebMWriter.h b/dom/media/webm/WebMWriter.h index 8ea58c1b3e..89ef0006cd 100644 --- a/dom/media/webm/WebMWriter.h +++ b/dom/media/webm/WebMWriter.h @@ -70,5 +70,6 @@ private: uint8_t mMetadataRequiredFlag; }; -} +} // namespace mozilla + #endif diff --git a/dom/media/webrtc/MediaEngine.h b/dom/media/webrtc/MediaEngine.h index e805de018f..19b2c1e9e0 100644 --- a/dom/media/webrtc/MediaEngine.h +++ b/dom/media/webrtc/MediaEngine.h @@ -254,6 +254,6 @@ protected: }; -} +} // namespace mozilla #endif /* MEDIAENGINE_H_ */ diff --git a/dom/media/webrtc/MediaEngineCameraVideoSource.h b/dom/media/webrtc/MediaEngineCameraVideoSource.h index c67311f580..58285856ad 100644 --- a/dom/media/webrtc/MediaEngineCameraVideoSource.h +++ b/dom/media/webrtc/MediaEngineCameraVideoSource.h @@ -120,4 +120,5 @@ protected: } // namespace mozilla + #endif // MediaEngineCameraVideoSource_h diff --git a/dom/media/webrtc/MediaEngineDefault.h b/dom/media/webrtc/MediaEngineDefault.h index 89cc998a3c..130623d54d 100644 --- a/dom/media/webrtc/MediaEngineDefault.h +++ b/dom/media/webrtc/MediaEngineDefault.h @@ -176,6 +176,6 @@ private: nsTArray > mASources; }; -} +} // namespace mozilla #endif /* NSMEDIAENGINEDEFAULT_H_ */ diff --git a/dom/media/webrtc/MediaTrackConstraints.h b/dom/media/webrtc/MediaTrackConstraints.h index 1d95fc7678..57efbaa84e 100644 --- a/dom/media/webrtc/MediaTrackConstraints.h +++ b/dom/media/webrtc/MediaTrackConstraints.h @@ -82,6 +82,6 @@ struct FlattenedConstraints : public NormalizedConstraintSet explicit FlattenedConstraints(const dom::MediaTrackConstraints& aOther); }; -} +} // namespace mozilla #endif /* MEDIATRACKCONSTRAINTS_H_ */ diff --git a/dom/media/webspeech/recognition/SpeechGrammarList.cpp b/dom/media/webspeech/recognition/SpeechGrammarList.cpp index 490a1378e7..bf394ca7ce 100644 --- a/dom/media/webspeech/recognition/SpeechGrammarList.cpp +++ b/dom/media/webspeech/recognition/SpeechGrammarList.cpp @@ -99,5 +99,6 @@ SpeechGrammarList::IndexedGetter(uint32_t aIndex, bool& aPresent, aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); return nullptr; } + } // namespace dom } // namespace mozilla diff --git a/dom/media/webspeech/recognition/SpeechRecognition.h b/dom/media/webspeech/recognition/SpeechRecognition.h index 4fed82e438..baadfe37a5 100644 --- a/dom/media/webspeech/recognition/SpeechRecognition.h +++ b/dom/media/webspeech/recognition/SpeechRecognition.h @@ -297,6 +297,7 @@ ToSupports(dom::SpeechRecognition* aRec) { return ToSupports(static_cast(aRec)); } + } // namespace mozilla #endif diff --git a/dom/media/webspeech/recognition/SpeechRecognitionAlternative.cpp b/dom/media/webspeech/recognition/SpeechRecognitionAlternative.cpp index 9d19774fb4..fc7eb93449 100644 --- a/dom/media/webspeech/recognition/SpeechRecognitionAlternative.cpp +++ b/dom/media/webspeech/recognition/SpeechRecognitionAlternative.cpp @@ -55,5 +55,6 @@ SpeechRecognitionAlternative::Confidence() const { return mConfidence; } + } // namespace dom } // namespace mozilla diff --git a/dom/media/webspeech/recognition/SpeechRecognitionResult.cpp b/dom/media/webspeech/recognition/SpeechRecognitionResult.cpp index 215978d218..ac8231e9cf 100644 --- a/dom/media/webspeech/recognition/SpeechRecognitionResult.cpp +++ b/dom/media/webspeech/recognition/SpeechRecognitionResult.cpp @@ -71,5 +71,6 @@ SpeechRecognitionResult::Final() const { return true; // TODO } + } // namespace dom } // namespace mozilla diff --git a/dom/media/webspeech/recognition/SpeechRecognitionResultList.cpp b/dom/media/webspeech/recognition/SpeechRecognitionResultList.cpp index 2c64dfad6f..89536b6d65 100644 --- a/dom/media/webspeech/recognition/SpeechRecognitionResultList.cpp +++ b/dom/media/webspeech/recognition/SpeechRecognitionResultList.cpp @@ -66,5 +66,6 @@ SpeechRecognitionResultList::Item(uint32_t aIndex) nsRefPtr result = mItems.ElementAt(aIndex); return result.forget(); } + } // namespace dom } // namespace mozilla diff --git a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp index f71169e140..204aaef544 100644 --- a/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp +++ b/dom/media/webspeech/synth/nsSynthVoiceRegistry.cpp @@ -60,7 +60,8 @@ GetAllSpeechSynthActors(InfallibleTArray& } } } -} + +} // namespace namespace mozilla { namespace dom { diff --git a/dom/mobilemessage/MobileMessageCallback.cpp b/dom/mobilemessage/MobileMessageCallback.cpp index c6c62acd5d..44c299cf71 100644 --- a/dom/mobilemessage/MobileMessageCallback.cpp +++ b/dom/mobilemessage/MobileMessageCallback.cpp @@ -280,6 +280,6 @@ MobileMessageCallback::NotifyGetSmscAddressFailed(int32_t aError) return NotifyError(aError); } -} // namesapce mobilemessage +} // namespace mobilemessage } // namespace dom } // namespace mozilla diff --git a/dom/mobilemessage/ipc/SmsChild.cpp b/dom/mobilemessage/ipc/SmsChild.cpp index 54672e7251..f3b4ce6667 100644 --- a/dom/mobilemessage/ipc/SmsChild.cpp +++ b/dom/mobilemessage/ipc/SmsChild.cpp @@ -51,7 +51,7 @@ NotifyObserversWithMobileMessage(const char* aEventName, obs->NotifyObservers(msg, aEventName, nullptr); } -} // anonymous namespace +} // namespace namespace mozilla { namespace dom { diff --git a/dom/mobilemessage/ipc/SmsIPCService.cpp b/dom/mobilemessage/ipc/SmsIPCService.cpp index 89515b15e7..fdc575bae6 100644 --- a/dom/mobilemessage/ipc/SmsIPCService.cpp +++ b/dom/mobilemessage/ipc/SmsIPCService.cpp @@ -94,7 +94,7 @@ getDefaultServiceId(const char* aPrefKey) return id; } -} // anonymous namespace +} // namespace NS_IMPL_ISUPPORTS(SmsIPCService, nsISmsService, diff --git a/dom/network/TCPSocketParent.cpp b/dom/network/TCPSocketParent.cpp index 1ddd767598..653763b541 100644 --- a/dom/network/TCPSocketParent.cpp +++ b/dom/network/TCPSocketParent.cpp @@ -25,7 +25,7 @@ DeserializeArrayBuffer(JS::Handle aObj, const InfallibleTArray& aBuffer, JS::MutableHandle aVal); -} +} // namespace IPC namespace mozilla { namespace dom { diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index f4248beb62..f3afce6491 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -117,7 +117,7 @@ NPObjectIsOutOfProcessProxy(NPObject *obj) obj->_class == PluginAsyncSurrogate::GetClass(); } -} // anonymous namespace +} // namespace // Helper class that reports any JS exceptions that were thrown while // the plugin executed JS. @@ -480,9 +480,9 @@ GetJSContext(NPP npp) return scx->GetNativeContext(); } -} -} -} +} // namespace parent +} // namespace plugins +} // namespace mozilla static NPP LookupNPP(NPObject *npobj); diff --git a/dom/plugins/base/nsPluginHost.cpp b/dom/plugins/base/nsPluginHost.cpp index 19dece6529..198333b258 100644 --- a/dom/plugins/base/nsPluginHost.cpp +++ b/dom/plugins/base/nsPluginHost.cpp @@ -1794,7 +1794,7 @@ struct CompareFilesByTime } }; -} // anonymous namespace +} // namespace void nsPluginHost::AddPluginTag(nsPluginTag* aPluginTag) diff --git a/dom/plugins/base/nsPluginHost.h b/dom/plugins/base/nsPluginHost.h index 6b598ac4a5..e49c6cc793 100644 --- a/dom/plugins/base/nsPluginHost.h +++ b/dom/plugins/base/nsPluginHost.h @@ -37,8 +37,8 @@ namespace mozilla { namespace plugins { class PluginAsyncSurrogate; class PluginTag; -} // namespace mozilla } // namespace plugins +} // namespace mozilla class nsNPAPIPlugin; class nsIComponentManager; diff --git a/dom/plugins/base/nsPluginInstanceOwner.h b/dom/plugins/base/nsPluginInstanceOwner.h index 5b5d97e0f8..4ff9bfc58d 100644 --- a/dom/plugins/base/nsPluginInstanceOwner.h +++ b/dom/plugins/base/nsPluginInstanceOwner.h @@ -32,11 +32,11 @@ class nsDisplayListBuilder; namespace mozilla { namespace dom { struct MozPluginParameter; -} +} // namespace dom namespace widget { class PuppetWidget; -} -} +} // namespace widget +} // namespace mozilla using mozilla::widget::PuppetWidget; diff --git a/dom/plugins/ipc/PluginBridge.h b/dom/plugins/ipc/PluginBridge.h index b2b4bcf6a8..e81b97f886 100644 --- a/dom/plugins/ipc/PluginBridge.h +++ b/dom/plugins/ipc/PluginBridge.h @@ -11,7 +11,7 @@ namespace mozilla { namespace dom { class ContentParent; -} +} // namespace dom namespace plugins { diff --git a/dom/plugins/ipc/PluginHangUIParent.cpp b/dom/plugins/ipc/PluginHangUIParent.cpp index 5376e71f60..811997eb9f 100644 --- a/dom/plugins/ipc/PluginHangUIParent.cpp +++ b/dom/plugins/ipc/PluginHangUIParent.cpp @@ -64,7 +64,7 @@ private: uint32_t mResponseTimeMs; uint32_t mTimeoutMs; }; -} // anonymous namespace +} // namespace namespace mozilla { namespace plugins { diff --git a/dom/plugins/ipc/PluginInstanceParent.cpp b/dom/plugins/ipc/PluginInstanceParent.cpp index 4508d68989..c1a53a5cf2 100644 --- a/dom/plugins/ipc/PluginInstanceParent.cpp +++ b/dom/plugins/ipc/PluginInstanceParent.cpp @@ -1474,7 +1474,7 @@ ActorSearch(NPObject* aKey, return PL_DHASH_NEXT; } -} // anonymous namespace +} // namespace #endif // DEBUG bool diff --git a/dom/plugins/ipc/PluginInterposeOSX.h b/dom/plugins/ipc/PluginInterposeOSX.h index c9bb023318..2a742b8aa2 100644 --- a/dom/plugins/ipc/PluginInterposeOSX.h +++ b/dom/plugins/ipc/PluginInterposeOSX.h @@ -124,14 +124,14 @@ void OnShowCursor(bool show); void OnPushCursor(const NSCursorInfo& cursorInfo); void OnPopCursor(); -} +} // namespace parent namespace child { void SetUpCocoaInterposing(); -} +} // namespace child -} +} // namespace mac_plugin_interposing #endif /* DOM_PLUGINS_IPC_PLUGININTERPOSEOSX_H */ diff --git a/dom/plugins/ipc/PluginInterposeOSX.mm b/dom/plugins/ipc/PluginInterposeOSX.mm index 3721f1198a..89c9c0c20b 100644 --- a/dom/plugins/ipc/PluginInterposeOSX.mm +++ b/dom/plugins/ipc/PluginInterposeOSX.mm @@ -664,7 +664,7 @@ void OnPopCursor() [NSCursor pop]; } -} // parent +} // namespace parent } // namespace mac_plugin_interposing namespace mac_plugin_interposing { @@ -819,7 +819,7 @@ static BOOL OnPopCursor() return NO; } -} // child +} // namespace child } // namespace mac_plugin_interposing using namespace mac_plugin_interposing::child; diff --git a/dom/plugins/ipc/PluginLibrary.h b/dom/plugins/ipc/PluginLibrary.h index b7435b3926..98d1b9ab46 100644 --- a/dom/plugins/ipc/PluginLibrary.h +++ b/dom/plugins/ipc/PluginLibrary.h @@ -25,8 +25,8 @@ namespace mozilla { namespace layers { class Image; class ImageContainer; -} -} +} // namespace layers +} // namespace mozilla namespace mozilla { diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp index 36f9d4382e..b09d9c3988 100644 --- a/dom/plugins/ipc/PluginMessageUtils.cpp +++ b/dom/plugins/ipc/PluginMessageUtils.cpp @@ -43,7 +43,7 @@ DeferNPObjectReleaseRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace namespace mozilla { namespace plugins { diff --git a/dom/plugins/ipc/PluginModuleParent.cpp b/dom/plugins/ipc/PluginModuleParent.cpp index 8d6fa3443b..bc7c56eaac 100755 --- a/dom/plugins/ipc/PluginModuleParent.cpp +++ b/dom/plugins/ipc/PluginModuleParent.cpp @@ -736,7 +736,7 @@ GetProcessCpuUsage(const InfallibleTArray& processHandles, return true; } -} // anonymous namespace +} // namespace #endif // #ifdef XP_WIN diff --git a/dom/plugins/ipc/PluginProcessChild.h b/dom/plugins/ipc/PluginProcessChild.h index e9c96cfb39..dcae523839 100644 --- a/dom/plugins/ipc/PluginProcessChild.h +++ b/dom/plugins/ipc/PluginProcessChild.h @@ -40,7 +40,7 @@ private: DISALLOW_EVIL_CONSTRUCTORS(PluginProcessChild); }; -} // namespace plugins -} // namespace mozilla +} // namespace plugins +} // namespace mozilla #endif // ifndef dom_plugins_PluginProcessChild_h diff --git a/dom/plugins/ipc/PluginScriptableObjectParent.cpp b/dom/plugins/ipc/PluginScriptableObjectParent.cpp index 16387b9982..464f8d9d9a 100644 --- a/dom/plugins/ipc/PluginScriptableObjectParent.cpp +++ b/dom/plugins/ipc/PluginScriptableObjectParent.cpp @@ -118,7 +118,7 @@ ReleaseVariant(NPVariant& aVariant, } } -} // anonymous namespace +} // namespace // static NPObject* diff --git a/dom/plugins/ipc/PluginUtilsOSX.mm b/dom/plugins/ipc/PluginUtilsOSX.mm index 1410cc9a42..7a5947f300 100644 --- a/dom/plugins/ipc/PluginUtilsOSX.mm +++ b/dom/plugins/ipc/PluginUtilsOSX.mm @@ -266,9 +266,9 @@ namespace plugins { namespace PluginUtilsOSX { static void *sApplicationASN = NULL; static void *sApplicationInfoItem = NULL; -} -} -} +} // namespace PluginUtilsOSX +} // namespace plugins +} // namespace mozilla bool mozilla::plugins::PluginUtilsOSX::SetProcessName(const char* aProcessName) { NS_OBJC_BEGIN_TRY_ABORT_BLOCK; @@ -511,7 +511,7 @@ void nsDoubleBufferCARenderer::ClearBackSurface() { } } -} //PluginUtilsOSX -} //plugins -} //mozilla +} // namespace PluginUtilsOSX +} // namespace plugins +} // namespace mozilla diff --git a/dom/plugins/ipc/PluginWidgetChild.h b/dom/plugins/ipc/PluginWidgetChild.h index 7c3a53e0ff..cfb5a4327c 100644 --- a/dom/plugins/ipc/PluginWidgetChild.h +++ b/dom/plugins/ipc/PluginWidgetChild.h @@ -10,7 +10,7 @@ namespace mozilla { namespace widget { class PluginWidgetProxy; -} +} // namespace widget namespace plugins { class PluginWidgetChild : public PPluginWidgetChild diff --git a/dom/plugins/ipc/PluginWidgetParent.h b/dom/plugins/ipc/PluginWidgetParent.h index 1f6833e539..21adc56cb7 100644 --- a/dom/plugins/ipc/PluginWidgetParent.h +++ b/dom/plugins/ipc/PluginWidgetParent.h @@ -17,7 +17,7 @@ namespace mozilla { namespace dom { class TabParent; -} +} // namespace dom namespace plugins { diff --git a/dom/power/PowerManager.cpp b/dom/power/PowerManager.cpp index d6b708396f..3fdca5a81d 100644 --- a/dom/power/PowerManager.cpp +++ b/dom/power/PowerManager.cpp @@ -205,5 +205,5 @@ PowerManager::CreateInstance(nsPIDOMWindow* aWindow) return powerManager.forget(); } -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/power/PowerManagerService.cpp b/dom/power/PowerManagerService.cpp index e647b72c7b..9fdd0c5d48 100644 --- a/dom/power/PowerManagerService.cpp +++ b/dom/power/PowerManagerService.cpp @@ -245,6 +245,6 @@ PowerManagerService::NewWakeLockOnBehalfOfProcess(const nsAString& aTopic, return wakelock.forget(); } -} // power -} // dom -} // mozilla +} // namespace power +} // namespace dom +} // namespace mozilla diff --git a/dom/power/WakeLock.cpp b/dom/power/WakeLock.cpp index 0440bb5f6c..a2033f100e 100644 --- a/dom/power/WakeLock.cpp +++ b/dom/power/WakeLock.cpp @@ -281,5 +281,5 @@ WakeLock::GetParentObject() const return window; } -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/promise/Promise.cpp b/dom/promise/Promise.cpp index 4674ee2b92..b29cd370cb 100644 --- a/dom/promise/Promise.cpp +++ b/dom/promise/Promise.cpp @@ -148,7 +148,7 @@ GetPromise(JSContext* aCx, JS::Handle aFunc) UNWRAP_OBJECT(Promise, &promiseVal.toObject(), promise); return promise; } -}; +} // namespace // Main thread runnable to resolve thenables. // Equivalent to the specification's ResolvePromiseViaThenableTask. diff --git a/dom/promise/PromiseWorkerProxy.h b/dom/promise/PromiseWorkerProxy.h index c3d08d92c5..d033e52f38 100644 --- a/dom/promise/PromiseWorkerProxy.h +++ b/dom/promise/PromiseWorkerProxy.h @@ -18,7 +18,7 @@ class Promise; namespace workers { class WorkerPrivate; -} +} // namespace workers // A proxy to catch the resolved/rejected Promise's result from the main thread // and resolve/reject that on the worker thread eventually. diff --git a/dom/quota/QuotaManager.cpp b/dom/quota/QuotaManager.cpp index 1183cf443d..8e43d0e9e0 100644 --- a/dom/quota/QuotaManager.cpp +++ b/dom/quota/QuotaManager.cpp @@ -127,7 +127,7 @@ enum AppId { kUnknownAppId = nsIScriptSecurityManager::UNKNOWN_APP_ID }; -} // anonymous namespace +} // namespace BEGIN_QUOTA_NAMESPACE @@ -1257,7 +1257,7 @@ GetTemporaryStorageLimit(nsIFile* aDirectory, uint64_t aCurrentUsage, return NS_OK; } -} // anonymous namespace +} // namespace QuotaManager::QuotaManager() : mCurrentWindowIndex(BAD_TLS_INDEX), diff --git a/dom/requestsync/RequestSyncWifiService.cpp b/dom/requestsync/RequestSyncWifiService.cpp index 0b7c9968a7..30f13937f2 100644 --- a/dom/requestsync/RequestSyncWifiService.cpp +++ b/dom/requestsync/RequestSyncWifiService.cpp @@ -21,7 +21,7 @@ namespace { StaticRefPtr sService; -} // anonymous namespace +} // namespace /* static */ void RequestSyncWifiService::Init() @@ -63,5 +63,5 @@ RequestSyncWifiService::Notify(const hal::NetworkInformation& aNetworkInfo) } } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/requestsync/RequestSyncWifiService.h b/dom/requestsync/RequestSyncWifiService.h index 3b93f9f45d..84fe484120 100644 --- a/dom/requestsync/RequestSyncWifiService.h +++ b/dom/requestsync/RequestSyncWifiService.h @@ -37,7 +37,7 @@ private: bool mIsWifi; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_RequestSyncWifiService_h diff --git a/dom/smil/nsISMILAttr.h b/dom/smil/nsISMILAttr.h index 3d7bed6b4a..dbc7d3ea49 100644 --- a/dom/smil/nsISMILAttr.h +++ b/dom/smil/nsISMILAttr.h @@ -16,8 +16,8 @@ class nsAString; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla //////////////////////////////////////////////////////////////////////// // nsISMILAttr: A variable targeted by SMIL for animation and can therefore have diff --git a/dom/smil/nsSMILAnimationController.h b/dom/smil/nsSMILAnimationController.h index f533843bd4..bda1a76e48 100644 --- a/dom/smil/nsSMILAnimationController.h +++ b/dom/smil/nsSMILAnimationController.h @@ -25,8 +25,8 @@ namespace mozilla { class RestyleTracker; namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla //---------------------------------------------------------------------- // nsSMILAnimationController diff --git a/dom/smil/nsSMILAnimationFunction.h b/dom/smil/nsSMILAnimationFunction.h index e3a334b4d2..4435bad48b 100644 --- a/dom/smil/nsSMILAnimationFunction.h +++ b/dom/smil/nsSMILAnimationFunction.h @@ -21,8 +21,8 @@ namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla //---------------------------------------------------------------------- // nsSMILAnimationFunction diff --git a/dom/smil/nsSMILParserUtils.cpp b/dom/smil/nsSMILParserUtils.cpp index 2a1573af2d..c2ac94aaa1 100644 --- a/dom/smil/nsSMILParserUtils.cpp +++ b/dom/smil/nsSMILParserUtils.cpp @@ -477,7 +477,7 @@ ParseElementBaseTimeValueSpec(const nsAString& aSpec, return true; } -} // end anonymous namespace block +} // namespace //------------------------------------------------------------------------------ // Implementation diff --git a/dom/smil/nsSMILParserUtils.h b/dom/smil/nsSMILParserUtils.h index c69d95a530..6d95b6f35e 100644 --- a/dom/smil/nsSMILParserUtils.h +++ b/dom/smil/nsSMILParserUtils.h @@ -19,8 +19,8 @@ class nsSMILTimeValueSpecParams; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla /** * Common parsing utilities for the SMIL module. There is little re-use here; it diff --git a/dom/smil/nsSMILTimedElement.cpp b/dom/smil/nsSMILTimedElement.cpp index 826d80f6e4..07d02a9c57 100644 --- a/dom/smil/nsSMILTimedElement.cpp +++ b/dom/smil/nsSMILTimedElement.cpp @@ -107,7 +107,7 @@ namespace return EventDispatcher::Dispatch(mTarget, context, &event); } }; -} +} // namespace //---------------------------------------------------------------------- // Helper class: AutoIntervalUpdateBatcher @@ -491,7 +491,7 @@ namespace private: const nsSMILTimeValueSpec* mCreator; }; -} +} // namespace void nsSMILTimedElement::RemoveInstanceTimesForCreator( @@ -775,7 +775,7 @@ namespace "Dynamic instance time should be unlinked from its creator"); return !aInstanceTime->IsDynamic() && !aInstanceTime->ShouldPreserve(); } -} +} // namespace void nsSMILTimedElement::Rewind() @@ -817,7 +817,7 @@ namespace { return true; } -} +} // namespace bool nsSMILTimedElement::SetIsDisabled(bool aIsDisabled) @@ -842,7 +842,7 @@ namespace { return !aInstanceTime->FromDOM() && !aInstanceTime->ShouldPreserve(); } -} +} // namespace bool nsSMILTimedElement::SetAttr(nsIAtom* aAttribute, const nsAString& aValue, @@ -1348,7 +1348,7 @@ namespace private: nsSMILTimedElement::RemovalTestFunction mFunction; }; -} +} // namespace void nsSMILTimedElement::ClearSpecs(TimeValueSpecList& aSpecs, @@ -1434,7 +1434,7 @@ namespace private: const nsSMILInstanceTime* mCurrentIntervalBegin; }; -} +} // namespace void nsSMILTimedElement::Reset() @@ -1647,7 +1647,7 @@ namespace uint32_t mThreshold; nsTArray& mTimesToKeep; }; -} +} // namespace void nsSMILTimedElement::FilterInstanceTimes(InstanceTimeList& aList) diff --git a/dom/smil/nsSMILTimedElement.h b/dom/smil/nsSMILTimedElement.h index 812995a1a6..b09a36d39f 100644 --- a/dom/smil/nsSMILTimedElement.h +++ b/dom/smil/nsSMILTimedElement.h @@ -27,8 +27,8 @@ class nsIAtom; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla //---------------------------------------------------------------------- // nsSMILTimedElement diff --git a/dom/storage/DOMStorage.cpp b/dom/storage/DOMStorage.cpp index a1f3f543ac..5c4bbc853f 100644 --- a/dom/storage/DOMStorage.cpp +++ b/dom/storage/DOMStorage.cpp @@ -200,7 +200,7 @@ StorageNotifierRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace void DOMStorage::BroadcastChangeNotification(const nsSubstring& aKey, @@ -351,5 +351,5 @@ DOMStorage::GetSupportedNames(unsigned, nsTArray& aKeys) mCache->GetKeys(this, aKeys); } -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/storage/DOMStorage.h b/dom/storage/DOMStorage.h index c9b118e343..82f23410dc 100644 --- a/dom/storage/DOMStorage.h +++ b/dom/storage/DOMStorage.h @@ -159,7 +159,7 @@ private: const nsSubstring& aNewValue); }; -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla #endif /* nsDOMStorage_h___ */ diff --git a/dom/storage/DOMStorageCache.cpp b/dom/storage/DOMStorageCache.cpp index d4f549970d..b78ac3c6f4 100644 --- a/dom/storage/DOMStorageCache.cpp +++ b/dom/storage/DOMStorageCache.cpp @@ -25,7 +25,7 @@ namespace dom { DOMStorageDBBridge* DOMStorageCache::sDatabase = nullptr; bool DOMStorageCache::sDatabaseDown = false; -namespace { // anon +namespace { const uint32_t kDefaultSet = 0; const uint32_t kPrivateSet = 1; @@ -51,7 +51,7 @@ GetDataSetIndex(const DOMStorage* aStorage) return GetDataSetIndex(aStorage->IsPrivate(), aStorage->IsSessionOnly()); } -} // anon +} // namespace // DOMStorageCacheBridge @@ -150,7 +150,7 @@ DOMStorageCache::Persist(const DOMStorage* aStorage) const !aStorage->IsPrivate(); } -namespace { // anon +namespace { PLDHashOperator CloneSetData(const nsAString& aKey, const nsString aValue, void* aArg) @@ -161,7 +161,7 @@ CloneSetData(const nsAString& aKey, const nsString aValue, void* aArg) return PL_DHASH_NEXT; } -} // anon +} // namespace DOMStorageCache::Data& DOMStorageCache::DataSet(const DOMStorage* aStorage) @@ -236,7 +236,7 @@ DOMStorageCache::Preload() sDatabase->AsyncPreload(this); } -namespace { // anon +namespace { // This class is passed to timer as a tick observer. It refers the cache // and keeps it alive for a time. @@ -261,7 +261,7 @@ public: NS_IMPL_ISUPPORTS(DOMStorageCacheHolder, nsITimerCallback) -} // anon +} // namespace void DOMStorageCache::KeepAlive() @@ -293,7 +293,7 @@ DOMStorageCache::KeepAlive() mKeepAliveTimer.swap(timer); } -namespace { // anon +namespace { // The AutoTimer provided by telemetry headers is only using static, // i.e. compile time known ID, but here we know the ID only at run time. @@ -310,7 +310,7 @@ private: const TimeStamp start; }; -} // anon +} // namespace void DOMStorageCache::WaitForPreload(Telemetry::ID aTelemetryID) @@ -362,7 +362,7 @@ DOMStorageCache::GetLength(const DOMStorage* aStorage, uint32_t* aRetval) return NS_OK; } -namespace { // anon +namespace { class IndexFinderData { @@ -390,7 +390,7 @@ FindKeyOrder(const nsAString& aKey, const nsString aValue, void* aArg) return PL_DHASH_STOP; } -} // anon +} // namespace nsresult DOMStorageCache::GetKey(const DOMStorage* aStorage, uint32_t aIndex, nsAString& aRetval) @@ -411,7 +411,7 @@ DOMStorageCache::GetKey(const DOMStorage* aStorage, uint32_t aIndex, nsAString& return NS_OK; } -namespace { // anon +namespace { static PLDHashOperator KeysArrayBuilder(const nsAString& aKey, const nsString aValue, void* aArg) @@ -422,7 +422,7 @@ KeysArrayBuilder(const nsAString& aKey, const nsString aValue, void* aArg) return PL_DHASH_NEXT; } -} // anon +} // namespace void DOMStorageCache::GetKeys(const DOMStorage* aStorage, nsTArray& aKeys) @@ -699,7 +699,7 @@ DOMStorageUsage::DOMStorageUsage(const nsACString& aScope) mUsage[kDefaultSet] = mUsage[kPrivateSet] = mUsage[kSessionSet] = 0LL; } -namespace { // anon +namespace { class LoadUsageRunnable : public nsRunnable { @@ -716,7 +716,7 @@ private: NS_IMETHOD Run() { *mTarget = mDelta; return NS_OK; } }; -} // anon +} // namespace void DOMStorageUsage::LoadUsage(const int64_t aUsage) @@ -813,5 +813,5 @@ DOMStorageCache::StopDatabase() return rv; } -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/storage/DOMStorageCache.h b/dom/storage/DOMStorageCache.h index ed072ab6ff..753fd84bd6 100644 --- a/dom/storage/DOMStorageCache.h +++ b/dom/storage/DOMStorageCache.h @@ -263,7 +263,7 @@ private: int64_t mUsage[DOMStorageCache::kDataSetCount]; }; -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/storage/DOMStorageDBThread.cpp b/dom/storage/DOMStorageDBThread.cpp index a4b6a3f33a..a94c9c177c 100644 --- a/dom/storage/DOMStorageDBThread.cpp +++ b/dom/storage/DOMStorageDBThread.cpp @@ -169,7 +169,7 @@ DOMStorageDBThread::ShouldPreloadScope(const nsACString& aScope) return mScopesHavingData.Contains(aScope); } -namespace { // anon +namespace { PLDHashOperator GetScopesHavingDataEnum(nsCStringHashKey* aKey, void* aArg) @@ -180,7 +180,7 @@ GetScopesHavingDataEnum(nsCStringHashKey* aKey, void* aArg) return PL_DHASH_NEXT; } -} // anon +} // namespace void DOMStorageDBThread::GetScopesHavingData(InfallibleTArray* aScopes) @@ -390,7 +390,7 @@ DOMStorageDBThread::ThreadObserver::AfterProcessNextEvent(nsIThreadInternal *thr extern void ReverseString(const nsCSubstring& aSource, nsCSubstring& aResult); -namespace { // anon +namespace { class nsReverseStringSQLFunction final : public mozIStorageFunction { @@ -427,7 +427,7 @@ nsReverseStringSQLFunction::OnFunctionCall( return NS_OK; } -} // anon +} // namespace nsresult DOMStorageDBThread::OpenDatabaseConnection() @@ -1078,7 +1078,7 @@ DOMStorageDBThread::PendingOperations::HasTasks() return !!mUpdates.Count() || !!mClears.Count(); } -namespace { // anon +namespace { PLDHashOperator ForgetUpdatesForScope(const nsACString& aMapping, @@ -1100,7 +1100,7 @@ ForgetUpdatesForScope(const nsACString& aMapping, return PL_DHASH_REMOVE; } -} // anon +} // namespace bool DOMStorageDBThread::PendingOperations::CheckForCoalesceOpportunity(DBOperation* aNewOp, @@ -1187,7 +1187,7 @@ DOMStorageDBThread::PendingOperations::Add(DOMStorageDBThread::DBOperation* aOpe } } -namespace { // anon +namespace { PLDHashOperator CollectTasks(const nsACString& aMapping, nsAutoPtr& aOperation, void* aArg) @@ -1199,7 +1199,7 @@ CollectTasks(const nsACString& aMapping, nsAutoPtr mParent; }; -} // anon +} // namespace DOMStorageDBParent::DOMStorageDBParent() : mIPCOpen(false) @@ -410,7 +410,7 @@ DOMStorageDBParent::RecvAsyncGetUsage(const nsCString& aScope) return true; } -namespace { // anon +namespace { // We need another implementation of DOMStorageCacheBridge to do // synchronous IPC preload. This class just receives Load* notifications @@ -485,7 +485,7 @@ private: uint32_t mLoadedCount; }; -} // anon +} // namespace bool DOMStorageDBParent::RecvPreload(const nsCString& aScope, @@ -608,7 +608,7 @@ DOMStorageDBParent::Observe(const char* aTopic, return NS_OK; } -namespace { // anon +namespace { // Results must be sent back on the main thread class LoadRunnable : public nsRunnable @@ -669,7 +669,7 @@ private: } }; -} // anon +} // namespace // DOMStorageDBParent::CacheParentBridge @@ -712,7 +712,7 @@ DOMStorageDBParent::CacheParentBridge::LoadWait() // DOMStorageDBParent::UsageParentBridge -namespace { // anon +namespace { class UsageRunnable : public nsRunnable { @@ -739,7 +739,7 @@ private: int64_t mUsage; }; -} // anon +} // namespace void DOMStorageDBParent::UsageParentBridge::LoadUsage(const int64_t aUsage) @@ -748,5 +748,5 @@ DOMStorageDBParent::UsageParentBridge::LoadUsage(const int64_t aUsage) NS_DispatchToMainThread(r); } -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/storage/DOMStorageIPC.h b/dom/storage/DOMStorageIPC.h index ad17e80201..c17086d777 100644 --- a/dom/storage/DOMStorageIPC.h +++ b/dom/storage/DOMStorageIPC.h @@ -198,7 +198,7 @@ private: bool mIPCOpen; }; -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/storage/DOMStorageManager.cpp b/dom/storage/DOMStorageManager.cpp index 319c0f4e05..29ed0f45d4 100644 --- a/dom/storage/DOMStorageManager.cpp +++ b/dom/storage/DOMStorageManager.cpp @@ -26,11 +26,11 @@ namespace mozilla { namespace dom { -namespace { // anon +namespace { int32_t gQuotaLimit = DEFAULT_QUOTA_LIMIT; -} // anon +} // namespace DOMLocalStorageManager* DOMLocalStorageManager::sSelf = nullptr; @@ -118,7 +118,7 @@ DOMStorageManager::~DOMStorageManager() } } -namespace { // anon +namespace { nsresult CreateScopeKey(nsIPrincipal* aPrincipal, @@ -249,7 +249,7 @@ CreateQuotaDBKey(nsIPrincipal* aPrincipal, return NS_OK; } -} // anon +} // namespace DOMStorageCache* DOMStorageManager::GetCache(const nsACString& aScope) const @@ -489,7 +489,7 @@ DOMStorageManager::GetLocalStorageForPrincipal(nsIPrincipal* aPrincipal, return CreateStorage(nullptr, aPrincipal, aDocumentURI, aPrivate, aRetval); } -namespace { // anon +namespace { class ClearCacheEnumeratorData { @@ -502,7 +502,7 @@ public: nsCString mKeyPrefix; }; -} // anon +} // namespace PLDHashOperator DOMStorageManager::ClearCacheEnumerator(DOMStorageCacheHashKey* aEntry, void* aClosure) @@ -659,5 +659,5 @@ DOMSessionStorageManager::DOMSessionStorageManager() } } -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/storage/DOMStorageManager.h b/dom/storage/DOMStorageManager.h index 2e5f395ea1..e82466163d 100644 --- a/dom/storage/DOMStorageManager.h +++ b/dom/storage/DOMStorageManager.h @@ -135,7 +135,7 @@ public: DOMSessionStorageManager(); }; -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla #endif /* nsDOMStorageManager_h__ */ diff --git a/dom/storage/DOMStorageObserver.cpp b/dom/storage/DOMStorageObserver.cpp index dc7e151718..7809be00ef 100644 --- a/dom/storage/DOMStorageObserver.cpp +++ b/dom/storage/DOMStorageObserver.cpp @@ -341,5 +341,5 @@ DOMStorageObserver::Observe(nsISupports* aSubject, return NS_ERROR_UNEXPECTED; } -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla diff --git a/dom/storage/DOMStorageObserver.h b/dom/storage/DOMStorageObserver.h index 92790ee07a..31c11abaee 100644 --- a/dom/storage/DOMStorageObserver.h +++ b/dom/storage/DOMStorageObserver.h @@ -56,7 +56,7 @@ private: nsCOMPtr mDBThreadStartDelayTimer; }; -} // ::dom -} // ::mozilla +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/svg/DOMSVGPoint.cpp b/dom/svg/DOMSVGPoint.cpp index adf377e795..2b5e36f1cd 100644 --- a/dom/svg/DOMSVGPoint.cpp +++ b/dom/svg/DOMSVGPoint.cpp @@ -50,7 +50,7 @@ private: MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER }; -} +} // namespace mozilla float DOMSVGPoint::X() diff --git a/dom/svg/DOMSVGPoint.h b/dom/svg/DOMSVGPoint.h index ce801843d4..1fc9508d70 100644 --- a/dom/svg/DOMSVGPoint.h +++ b/dom/svg/DOMSVGPoint.h @@ -21,7 +21,7 @@ namespace mozilla { namespace dom { class SVGMatrix; -} +} // namespace dom /** * Class DOMSVGPoint diff --git a/dom/svg/DOMSVGTransformList.cpp b/dom/svg/DOMSVGTransformList.cpp index 8eda77ece7..2769f15252 100644 --- a/dom/svg/DOMSVGTransformList.cpp +++ b/dom/svg/DOMSVGTransformList.cpp @@ -28,7 +28,7 @@ void UpdateListIndicesFromIndex( } } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/dom/svg/DOMSVGTransformList.h b/dom/svg/DOMSVGTransformList.h index 8ffa7b6403..5a95845873 100644 --- a/dom/svg/DOMSVGTransformList.h +++ b/dom/svg/DOMSVGTransformList.h @@ -23,7 +23,7 @@ namespace mozilla { namespace dom { class SVGMatrix; class SVGTransform; -} +} // namespace dom /** * Class DOMSVGTransformList diff --git a/dom/svg/SVGAnimateElement.cpp b/dom/svg/SVGAnimateElement.cpp index 48f55f4371..29b87a3c86 100644 --- a/dom/svg/SVGAnimateElement.cpp +++ b/dom/svg/SVGAnimateElement.cpp @@ -38,6 +38,6 @@ SVGAnimateElement::AnimationFunction() return mAnimationFunction; } -} // namespace mozilla } // namespace dom +} // namespace mozilla diff --git a/dom/svg/SVGAnimatedLengthList.h b/dom/svg/SVGAnimatedLengthList.h index 3ac14a02bf..5bc6e8cd93 100644 --- a/dom/svg/SVGAnimatedLengthList.h +++ b/dom/svg/SVGAnimatedLengthList.h @@ -18,7 +18,7 @@ namespace mozilla { namespace dom { class SVGAnimationElement; -} +} // namespace dom /** * Class SVGAnimatedLengthList diff --git a/dom/svg/SVGAnimatedNumberList.h b/dom/svg/SVGAnimatedNumberList.h index 56bf09cc4d..8668a3c9d2 100644 --- a/dom/svg/SVGAnimatedNumberList.h +++ b/dom/svg/SVGAnimatedNumberList.h @@ -18,7 +18,7 @@ namespace mozilla { namespace dom { class SVGAnimationElement; -} +} // namespace dom /** * Class SVGAnimatedNumberList diff --git a/dom/svg/SVGAnimatedPathSegList.h b/dom/svg/SVGAnimatedPathSegList.h index fc9dc777db..cd7f5a4a12 100644 --- a/dom/svg/SVGAnimatedPathSegList.h +++ b/dom/svg/SVGAnimatedPathSegList.h @@ -19,7 +19,7 @@ namespace mozilla { namespace dom { class SVGAnimationElement; -} +} // namespace dom /** * Class SVGAnimatedPathSegList diff --git a/dom/svg/SVGAnimatedPointList.h b/dom/svg/SVGAnimatedPointList.h index 8767ea5b1f..736cb79e9c 100644 --- a/dom/svg/SVGAnimatedPointList.h +++ b/dom/svg/SVGAnimatedPointList.h @@ -18,7 +18,7 @@ namespace mozilla { namespace dom { class SVGAnimationElement; -} +} // namespace dom /** * Class SVGAnimatedPointList diff --git a/dom/svg/SVGAnimatedPreserveAspectRatio.h b/dom/svg/SVGAnimatedPreserveAspectRatio.h index b096d7fb3d..6e0d1447d3 100644 --- a/dom/svg/SVGAnimatedPreserveAspectRatio.h +++ b/dom/svg/SVGAnimatedPreserveAspectRatio.h @@ -20,7 +20,7 @@ namespace mozilla { namespace dom { class DOMSVGAnimatedPreserveAspectRatio; class SVGAnimationElement; -} +} // namespace dom class SVGAnimatedPreserveAspectRatio final { diff --git a/dom/svg/SVGAnimationElement.h b/dom/svg/SVGAnimationElement.h index b8d8352904..5ae3e77bae 100644 --- a/dom/svg/SVGAnimationElement.h +++ b/dom/svg/SVGAnimationElement.h @@ -116,7 +116,7 @@ public: nsSMILTimedElement mTimedElement; }; -} // namespace mozilla } // namespace dom +} // namespace mozilla #endif // mozilla_dom_SVGAnimationElement_h diff --git a/dom/svg/SVGAttrValueWrapper.h b/dom/svg/SVGAttrValueWrapper.h index 8c02b73a5b..d8ead2c12e 100644 --- a/dom/svg/SVGAttrValueWrapper.h +++ b/dom/svg/SVGAttrValueWrapper.h @@ -28,7 +28,7 @@ class SVGPointList; class SVGAnimatedPreserveAspectRatio; class SVGStringList; class SVGTransformList; -} +} // namespace mozilla namespace mozilla { diff --git a/dom/svg/SVGFEColorMatrixElement.h b/dom/svg/SVGFEColorMatrixElement.h index 184319139c..104fe68850 100644 --- a/dom/svg/SVGFEColorMatrixElement.h +++ b/dom/svg/SVGFEColorMatrixElement.h @@ -66,7 +66,7 @@ public: static NumberListInfo sNumberListInfo[1]; }; -} // namespace mozilla } // namespace dom +} // namespace mozilla #endif // mozilla_dom_SVGFEColorMatrixElement_h diff --git a/dom/svg/SVGFEComponentTransferElement.h b/dom/svg/SVGFEComponentTransferElement.h index 9483f69a35..b1f78861f8 100644 --- a/dom/svg/SVGFEComponentTransferElement.h +++ b/dom/svg/SVGFEComponentTransferElement.h @@ -52,7 +52,7 @@ protected: static StringInfo sStringInfo[2]; }; -} // namespace mozilla } // namespace dom +} // namespace mozilla #endif // mozilla_dom_SVGFEComponentTransferElement_h diff --git a/dom/svg/SVGFEImageElement.h b/dom/svg/SVGFEImageElement.h index f0682625f7..e5a8ed63ba 100644 --- a/dom/svg/SVGFEImageElement.h +++ b/dom/svg/SVGFEImageElement.h @@ -19,8 +19,8 @@ namespace dom { typedef nsSVGFE SVGFEImageElementBase; -class SVGFEImageElement : public SVGFEImageElementBase, - public nsImageLoadingContent +class SVGFEImageElement final : public SVGFEImageElementBase, + public nsImageLoadingContent { friend class ::SVGFEImageFrame; diff --git a/dom/svg/SVGFragmentIdentifier.h b/dom/svg/SVGFragmentIdentifier.h index fedaf13162..f0dec30f04 100644 --- a/dom/svg/SVGFragmentIdentifier.h +++ b/dom/svg/SVGFragmentIdentifier.h @@ -15,7 +15,7 @@ namespace mozilla { namespace dom { class SVGSVGElement; -} +} // namespace dom /** * Implements support for parsing SVG fragment identifiers diff --git a/dom/svg/SVGMotionSMILAnimationFunction.h b/dom/svg/SVGMotionSMILAnimationFunction.h index ed5eca727b..b167bac53e 100644 --- a/dom/svg/SVGMotionSMILAnimationFunction.h +++ b/dom/svg/SVGMotionSMILAnimationFunction.h @@ -23,7 +23,7 @@ namespace mozilla { namespace dom { class SVGMPathElement; -} +} // namespace dom //---------------------------------------------------------------------- // SVGMotionSMILAnimationFunction diff --git a/dom/svg/SVGMotionSMILAttr.h b/dom/svg/SVGMotionSMILAttr.h index df79bd5d14..8e0c3acbf8 100644 --- a/dom/svg/SVGMotionSMILAttr.h +++ b/dom/svg/SVGMotionSMILAttr.h @@ -19,7 +19,7 @@ namespace mozilla { namespace dom { class SVGAnimationElement; -} +} // namespace dom /** * SVGMotionSMILAttr: Implements the nsISMILAttr interface for SMIL animations diff --git a/dom/svg/SVGMotionSMILType.h b/dom/svg/SVGMotionSMILType.h index b237a3979d..8485c038ff 100644 --- a/dom/svg/SVGMotionSMILType.h +++ b/dom/svg/SVGMotionSMILType.h @@ -18,7 +18,7 @@ namespace mozilla { namespace gfx { class Matrix; -} +} // namespace gfx /** * MotionRotateType: Enum to indicate the type of our "rotate" attribute. diff --git a/dom/svg/SVGPolylineElement.h b/dom/svg/SVGPolylineElement.h index 46e9be9514..1b665bb4b4 100644 --- a/dom/svg/SVGPolylineElement.h +++ b/dom/svg/SVGPolylineElement.h @@ -32,7 +32,7 @@ public: virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override; }; -} // namespace mozilla } // namespace dom +} // namespace mozilla #endif // mozilla_dom_SVGPolylineElement_h diff --git a/dom/svg/SVGTransform.cpp b/dom/svg/SVGTransform.cpp index 8c90d13ffd..69bb365f3c 100644 --- a/dom/svg/SVGTransform.cpp +++ b/dom/svg/SVGTransform.cpp @@ -17,7 +17,7 @@ namespace { const double kRadPerDegree = 2.0 * M_PI / 360.0; -} +} // namespace namespace mozilla { namespace dom { diff --git a/dom/svg/SVGTransformList.h b/dom/svg/SVGTransformList.h index 9522e2e640..56f47c36c2 100644 --- a/dom/svg/SVGTransformList.h +++ b/dom/svg/SVGTransformList.h @@ -16,7 +16,7 @@ namespace mozilla { namespace dom { class SVGTransform; -} +} // namespace dom /** * ATTENTION! WARNING! WATCH OUT!! diff --git a/dom/svg/nsISVGPoint.h b/dom/svg/nsISVGPoint.h index 3d7e8a2ac6..d585bfaa04 100644 --- a/dom/svg/nsISVGPoint.h +++ b/dom/svg/nsISVGPoint.h @@ -24,7 +24,7 @@ namespace mozilla { namespace dom { class SVGMatrix; -} +} // namespace dom /** * Class nsISVGPoint diff --git a/dom/svg/nsSVGAngle.h b/dom/svg/nsSVGAngle.h index c288e381f9..fef6fd037f 100644 --- a/dom/svg/nsSVGAngle.h +++ b/dom/svg/nsSVGAngle.h @@ -29,8 +29,8 @@ class nsSVGOrientType; class SVGAngle; class SVGAnimatedAngle; class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla class nsSVGAngle { diff --git a/dom/svg/nsSVGAnimatedTransformList.h b/dom/svg/nsSVGAnimatedTransformList.h index 537ee703bc..c46a62a6a7 100644 --- a/dom/svg/nsSVGAnimatedTransformList.h +++ b/dom/svg/nsSVGAnimatedTransformList.h @@ -21,7 +21,7 @@ namespace mozilla { namespace dom { class SVGAnimationElement; class SVGTransform; -} +} // namespace dom /** * Class nsSVGAnimatedTransformList diff --git a/dom/svg/nsSVGBoolean.h b/dom/svg/nsSVGBoolean.h index 4dfac49dcc..7e61f35c73 100644 --- a/dom/svg/nsSVGBoolean.h +++ b/dom/svg/nsSVGBoolean.h @@ -20,8 +20,8 @@ namespace mozilla { namespace dom { class SVGAnimationElement; class SVGAnimatedBoolean; -} -} +} // namespace dom +} // namespace mozilla class nsSVGBoolean { diff --git a/dom/svg/nsSVGClass.h b/dom/svg/nsSVGClass.h index 7db784ec71..82762248d6 100644 --- a/dom/svg/nsSVGClass.h +++ b/dom/svg/nsSVGClass.h @@ -18,8 +18,8 @@ class nsSVGElement; namespace mozilla { namespace dom { class SVGAnimatedString; -} -} +} // namespace dom +} // namespace mozilla class nsSVGClass { diff --git a/dom/svg/nsSVGElement.cpp b/dom/svg/nsSVGElement.cpp index 01a034b6f3..c161927f95 100644 --- a/dom/svg/nsSVGElement.cpp +++ b/dom/svg/nsSVGElement.cpp @@ -1216,7 +1216,7 @@ MappedAttrParser::CreateStyleRule() return rule.forget(); } -} // anonymous namespace +} // namespace //---------------------------------------------------------------------- // Implementation Helpers: diff --git a/dom/svg/nsSVGElement.h b/dom/svg/nsSVGElement.h index 82af504ba1..6596c136ed 100644 --- a/dom/svg/nsSVGElement.h +++ b/dom/svg/nsSVGElement.h @@ -46,7 +46,7 @@ static const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0; static const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1; static const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; -} +} // namespace dom class SVGAnimatedNumberList; class SVGNumberList; @@ -61,9 +61,9 @@ class DOMSVGStringList; namespace gfx { class Matrix; -} +} // namespace gfx -} +} // namespace mozilla class gfxMatrix; struct nsSVGEnumMapping; diff --git a/dom/svg/nsSVGEnum.h b/dom/svg/nsSVGEnum.h index eb0404e5ec..fecfe39f62 100644 --- a/dom/svg/nsSVGEnum.h +++ b/dom/svg/nsSVGEnum.h @@ -20,8 +20,8 @@ class nsSMILValue; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla typedef uint8_t nsSVGEnumValue; diff --git a/dom/svg/nsSVGFilters.h b/dom/svg/nsSVGFilters.h index 011e208f66..7fb687d5b1 100644 --- a/dom/svg/nsSVGFilters.h +++ b/dom/svg/nsSVGFilters.h @@ -236,7 +236,7 @@ public: ComputeLightAttributes(nsSVGFilterInstance* aInstance) = 0; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/dom/svg/nsSVGInteger.h b/dom/svg/nsSVGInteger.h index 759e82eab6..accbc81864 100644 --- a/dom/svg/nsSVGInteger.h +++ b/dom/svg/nsSVGInteger.h @@ -19,8 +19,8 @@ class nsSMILValue; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla class nsSVGInteger { diff --git a/dom/svg/nsSVGIntegerPair.h b/dom/svg/nsSVGIntegerPair.h index e4e04a504b..a3ec16bccb 100644 --- a/dom/svg/nsSVGIntegerPair.h +++ b/dom/svg/nsSVGIntegerPair.h @@ -19,8 +19,8 @@ class nsSMILValue; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla class nsSVGIntegerPair { diff --git a/dom/svg/nsSVGLength2.h b/dom/svg/nsSVGLength2.h index c13d968900..309dd1b07b 100644 --- a/dom/svg/nsSVGLength2.h +++ b/dom/svg/nsSVGLength2.h @@ -27,8 +27,8 @@ namespace dom { class SVGAnimatedLength; class SVGAnimationElement; class SVGSVGElement; -} -} +} // namespace dom +} // namespace mozilla namespace mozilla { namespace dom { @@ -80,8 +80,8 @@ private: nsIFrame* mFrame; }; -} -} +} // namespace dom +} // namespace mozilla class nsSVGLength2 { diff --git a/dom/svg/nsSVGNumber2.h b/dom/svg/nsSVGNumber2.h index 5b685a80d0..149bf4051a 100644 --- a/dom/svg/nsSVGNumber2.h +++ b/dom/svg/nsSVGNumber2.h @@ -21,8 +21,8 @@ class nsSMILValue; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla class nsSVGNumber2 { diff --git a/dom/svg/nsSVGNumberPair.h b/dom/svg/nsSVGNumberPair.h index 33030db01d..5698901704 100644 --- a/dom/svg/nsSVGNumberPair.h +++ b/dom/svg/nsSVGNumberPair.h @@ -22,8 +22,8 @@ class nsSMILValue; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla class nsSVGNumberPair { diff --git a/dom/svg/nsSVGPathDataParser.h b/dom/svg/nsSVGPathDataParser.h index f4e842b4ad..7dc74b0c00 100644 --- a/dom/svg/nsSVGPathDataParser.h +++ b/dom/svg/nsSVGPathDataParser.h @@ -12,7 +12,7 @@ namespace mozilla { class SVGPathData; -} +} // namespace mozilla //////////////////////////////////////////////////////////////////////// // nsSVGPathDataParser: a simple recursive descent parser that builds diff --git a/dom/svg/nsSVGPolyElement.h b/dom/svg/nsSVGPolyElement.h index d66b3b6dd1..0ce056f65a 100644 --- a/dom/svg/nsSVGPolyElement.h +++ b/dom/svg/nsSVGPolyElement.h @@ -14,7 +14,7 @@ typedef nsSVGPathGeometryElement nsSVGPolyElementBase; namespace mozilla { class DOMSVGPointList; -} +} // namespace mozilla class nsSVGPolyElement : public nsSVGPolyElementBase { diff --git a/dom/svg/nsSVGTransform.cpp b/dom/svg/nsSVGTransform.cpp index 1b5a5c54b6..efcc3beee8 100644 --- a/dom/svg/nsSVGTransform.cpp +++ b/dom/svg/nsSVGTransform.cpp @@ -11,7 +11,7 @@ namespace { const double kRadPerDegree = 2.0 * M_PI / 360.0; -} +} // namespace namespace mozilla { diff --git a/dom/svg/nsSVGViewBox.h b/dom/svg/nsSVGViewBox.h index 1a1b357560..707e2d82ac 100644 --- a/dom/svg/nsSVGViewBox.h +++ b/dom/svg/nsSVGViewBox.h @@ -21,8 +21,8 @@ class nsSMILValue; namespace mozilla { namespace dom { class SVGAnimationElement; -} -} +} // namespace dom +} // namespace mozilla struct nsSVGViewBoxRect { diff --git a/dom/system/OSFileConstants.cpp b/dom/system/OSFileConstants.cpp index 3b21739f3b..043479e3aa 100644 --- a/dom/system/OSFileConstants.cpp +++ b/dom/system/OSFileConstants.cpp @@ -178,7 +178,7 @@ Paths* gPaths = nullptr; * on the main thread. */ uint32_t gUserUmask = 0; -} +} // namespace /** * Return the path to one of the special directories. diff --git a/dom/system/OSFileConstants.h b/dom/system/OSFileConstants.h index 7061626d30..58a14a4cdb 100644 --- a/dom/system/OSFileConstants.h +++ b/dom/system/OSFileConstants.h @@ -53,6 +53,6 @@ private: ~OSFileConstantsService(); }; -} +} // namespace mozilla #endif // mozilla_osfileconstants_h__ diff --git a/dom/system/gonk/AutoMounterSetting.cpp b/dom/system/gonk/AutoMounterSetting.cpp index 24fec9d6ed..1fd78c51fc 100644 --- a/dom/system/gonk/AutoMounterSetting.cpp +++ b/dom/system/gonk/AutoMounterSetting.cpp @@ -273,5 +273,5 @@ AutoMounterSetting::Observe(nsISupports* aSubject, return NS_OK; } -} // namespace system -} // namespace mozilla +} // namespace system +} // namespace mozilla diff --git a/dom/system/gonk/AutoMounterSetting.h b/dom/system/gonk/AutoMounterSetting.h index 0e84982195..9f08df3a3b 100644 --- a/dom/system/gonk/AutoMounterSetting.h +++ b/dom/system/gonk/AutoMounterSetting.h @@ -31,8 +31,8 @@ private: int32_t mStatus; }; -} // namespace system -} // namespace mozilla +} // namespace system +} // namespace mozilla #endif // mozilla_system_automountersetting_h__ diff --git a/dom/system/gonk/GonkGPSGeolocationProvider.cpp b/dom/system/gonk/GonkGPSGeolocationProvider.cpp index e5a63db528..276bc85219 100644 --- a/dom/system/gonk/GonkGPSGeolocationProvider.cpp +++ b/dom/system/gonk/GonkGPSGeolocationProvider.cpp @@ -986,7 +986,7 @@ ConvertToGpsNetworkType(int aNetworkInterfaceType) return -1; } } -} // anonymous namespace +} // namespace NS_IMETHODIMP GonkGPSGeolocationProvider::Observe(nsISupports* aSubject, diff --git a/dom/system/gonk/SystemWorkerManager.cpp b/dom/system/gonk/SystemWorkerManager.cpp index edf8fb6dad..14e9a062d4 100644 --- a/dom/system/gonk/SystemWorkerManager.cpp +++ b/dom/system/gonk/SystemWorkerManager.cpp @@ -52,7 +52,7 @@ NS_DEFINE_CID(kWifiWorkerCID, NS_WIFIWORKER_CID); // Doesn't carry a reference, we're owned by services. SystemWorkerManager *gInstance = nullptr; -} // anonymous namespace +} // namespace SystemWorkerManager::SystemWorkerManager() : mShutdown(false) diff --git a/dom/system/gonk/TimeZoneSettingObserver.cpp b/dom/system/gonk/TimeZoneSettingObserver.cpp index d53d3f3cd9..3941bd3233 100644 --- a/dom/system/gonk/TimeZoneSettingObserver.cpp +++ b/dom/system/gonk/TimeZoneSettingObserver.cpp @@ -218,7 +218,7 @@ TimeZoneSettingObserver::Observe(nsISupports *aSubject, return SetTimeZone(setting.mValue, cx); } -} // anonymous namespace +} // namespace static mozilla::StaticRefPtr sTimeZoneSettingObserver; namespace mozilla { diff --git a/dom/system/nsDeviceSensors.h b/dom/system/nsDeviceSensors.h index 1af4869c42..3d67aca80f 100644 --- a/dom/system/nsDeviceSensors.h +++ b/dom/system/nsDeviceSensors.h @@ -20,8 +20,8 @@ class nsIDOMWindow; namespace mozilla { namespace dom { class EventTarget; -} -} +} // namespace dom +} // namespace mozilla class nsDeviceSensors : public nsIDeviceSensors, public mozilla::hal::ISensorObserver { diff --git a/dom/telephony/ipc/TelephonyIPCService.cpp b/dom/telephony/ipc/TelephonyIPCService.cpp index c32e957982..0a845f4cd6 100644 --- a/dom/telephony/ipc/TelephonyIPCService.cpp +++ b/dom/telephony/ipc/TelephonyIPCService.cpp @@ -36,7 +36,7 @@ getDefaultServiceId() return id; } -} // Anonymous namespace +} // namespace NS_IMPL_ISUPPORTS(TelephonyIPCService, nsITelephonyService, diff --git a/dom/workers/ChromeWorkerScope.cpp b/dom/workers/ChromeWorkerScope.cpp index 9cb25652e5..58c877eda7 100644 --- a/dom/workers/ChromeWorkerScope.cpp +++ b/dom/workers/ChromeWorkerScope.cpp @@ -43,7 +43,7 @@ UnicodeToNative(JSContext* aCx, const char16_t* aSource, size_t aSourceLen) #endif // BUILD_CTYPES -} // anonymous namespace +} // namespace BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/FileReaderSync.h b/dom/workers/FileReaderSync.h index dccc06c972..8d6a8e42f3 100644 --- a/dom/workers/FileReaderSync.h +++ b/dom/workers/FileReaderSync.h @@ -19,8 +19,8 @@ namespace dom { class File; class GlobalObject; template class Optional; -} -} +} // namespace dom +} // namespace mozilla BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/MessagePort.cpp b/dom/workers/MessagePort.cpp index 4a693ea926..083dd20b78 100644 --- a/dom/workers/MessagePort.cpp +++ b/dom/workers/MessagePort.cpp @@ -70,7 +70,7 @@ public: WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate); }; -} // anonymous namespace +} // namespace BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/Navigator.cpp b/dom/workers/Navigator.cpp index 2abff1be85..f241a8db46 100644 --- a/dom/workers/Navigator.cpp +++ b/dom/workers/Navigator.cpp @@ -380,7 +380,7 @@ public: } }; -} // anonymous namespace +} // namespace void WorkerNavigator::GetUserAgent(nsString& aUserAgent) const diff --git a/dom/workers/Navigator.h b/dom/workers/Navigator.h index 093d0546a2..5b0f2c0e76 100644 --- a/dom/workers/Navigator.h +++ b/dom/workers/Navigator.h @@ -18,8 +18,8 @@ namespace mozilla { namespace dom { class Promise; -} -} +} // namespace dom +} // namespace mozilla BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/ServiceWorkerClient.cpp b/dom/workers/ServiceWorkerClient.cpp index 419d877798..1cfaa7db02 100644 --- a/dom/workers/ServiceWorkerClient.cpp +++ b/dom/workers/ServiceWorkerClient.cpp @@ -148,7 +148,7 @@ private: } }; -} // anonymous namespace +} // namespace void ServiceWorkerClient::PostMessage(JSContext* aCx, JS::Handle aMessage, diff --git a/dom/workers/ServiceWorkerClients.cpp b/dom/workers/ServiceWorkerClients.cpp index 398142e017..5608c47a7c 100644 --- a/dom/workers/ServiceWorkerClients.cpp +++ b/dom/workers/ServiceWorkerClients.cpp @@ -241,7 +241,7 @@ public: } }; -} // anonymous namespace +} // namespace already_AddRefed ServiceWorkerClients::MatchAll(const ClientQueryOptions& aOptions, diff --git a/dom/workers/ServiceWorkerCommon.h b/dom/workers/ServiceWorkerCommon.h index 1f0e806826..1c272c125c 100644 --- a/dom/workers/ServiceWorkerCommon.h +++ b/dom/workers/ServiceWorkerCommon.h @@ -19,7 +19,7 @@ enum class WhichServiceWorker { }; MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(WhichServiceWorker) -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_ServiceWorkerCommon_h diff --git a/dom/workers/ServiceWorkerContainer.h b/dom/workers/ServiceWorkerContainer.h index 90b60b4a02..9ac31e78ad 100644 --- a/dom/workers/ServiceWorkerContainer.h +++ b/dom/workers/ServiceWorkerContainer.h @@ -19,7 +19,7 @@ struct RegistrationOptions; namespace workers { class ServiceWorker; -} +} // namespace workers // Lightweight serviceWorker APIs collection. class ServiceWorkerContainer final : public DOMEventTargetHelper diff --git a/dom/workers/ServiceWorkerEvents.cpp b/dom/workers/ServiceWorkerEvents.cpp index 8503bd818f..c3f498ba87 100644 --- a/dom/workers/ServiceWorkerEvents.cpp +++ b/dom/workers/ServiceWorkerEvents.cpp @@ -279,7 +279,7 @@ RespondWithHandler::CancelRequest() NS_DispatchToMainThread(runnable); } -} // anonymous namespace +} // namespace void FetchEvent::RespondWith(Promise& aPromise, ErrorResult& aRv) diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index fb6804b627..a18b24946d 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -2894,7 +2894,7 @@ FireControllerChangeOnMatchingDocument(nsISupports* aKey, return PL_DHASH_NEXT; } -} // anonymous namespace +} // namespace void ServiceWorkerManager::GetAllClients(const nsCString& aScope, diff --git a/dom/workers/ServiceWorkerRegistrar.cpp b/dom/workers/ServiceWorkerRegistrar.cpp index 41778f03eb..6507ea9adb 100644 --- a/dom/workers/ServiceWorkerRegistrar.cpp +++ b/dom/workers/ServiceWorkerRegistrar.cpp @@ -36,7 +36,7 @@ namespace { StaticRefPtr gServiceWorkerRegistrar; -} // anonymous namespace +} // namespace NS_IMPL_ISUPPORTS(ServiceWorkerRegistrar, nsIObserver) @@ -680,5 +680,5 @@ ServiceWorkerRegistrar::Observe(nsISupports* aSubject, const char* aTopic, return NS_ERROR_UNEXPECTED; } -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla diff --git a/dom/workers/ServiceWorkerRegistrar.h b/dom/workers/ServiceWorkerRegistrar.h index 5c99d3a3fa..a91eee3bbe 100644 --- a/dom/workers/ServiceWorkerRegistrar.h +++ b/dom/workers/ServiceWorkerRegistrar.h @@ -86,7 +86,7 @@ protected: nsCOMPtr mProfileDir; }; -} // dom namespace -} // mozilla namespace +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_workers_ServiceWorkerRegistrar_h diff --git a/dom/workers/ServiceWorkerScriptCache.cpp b/dom/workers/ServiceWorkerScriptCache.cpp index 97bf4950c6..f37ab09329 100644 --- a/dom/workers/ServiceWorkerScriptCache.cpp +++ b/dom/workers/ServiceWorkerScriptCache.cpp @@ -602,7 +602,7 @@ CompareCache::ManageValueResult(JSContext* aCx, JS::Handle aValue) } } -} // anonymous namespace +} // namespace nsresult PurgeCache(nsIPrincipal* aPrincipal, const nsAString& aCacheName) @@ -673,6 +673,6 @@ Compare(nsIPrincipal* aPrincipal, const nsAString& aCacheName, return NS_OK; } -} // serviceWorkerScriptCache namespace +} // namespace serviceWorkerScriptCache END_WORKERS_NAMESPACE diff --git a/dom/workers/ServiceWorkerScriptCache.h b/dom/workers/ServiceWorkerScriptCache.h index 9ba0cbf65e..4e9309c3be 100644 --- a/dom/workers/ServiceWorkerScriptCache.h +++ b/dom/workers/ServiceWorkerScriptCache.h @@ -34,10 +34,10 @@ nsresult Compare(nsIPrincipal* aPrincipal, const nsAString& aCacheName, const nsAString& aURL, CompareCallback* aCallback); -} // serviceWorkerScriptCache namespace +} // namespace serviceWorkerScriptCache -} // workers namespace -} // dom namespace -} // mozilla namespace +} // namespace workers +} // namespace dom +} // namespace mozilla #endif // mozilla_dom_workers_ServiceWorkerScriptCache_h diff --git a/dom/workers/URL.h b/dom/workers/URL.h index 1a437cf657..e96b5d4d13 100644 --- a/dom/workers/URL.h +++ b/dom/workers/URL.h @@ -19,8 +19,8 @@ namespace mozilla { namespace dom { class File; struct objectURLOptions; -} -} +} // namespace dom +} // namespace mozilla BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/WorkerPrivate.h b/dom/workers/WorkerPrivate.h index acf7d87edf..a3e6be5dd6 100644 --- a/dom/workers/WorkerPrivate.h +++ b/dom/workers/WorkerPrivate.h @@ -43,16 +43,16 @@ class nsIURI; namespace JS { struct RuntimeStats; -} +} // namespace JS namespace mozilla { namespace dom { class Function; -} +} // namespace dom namespace ipc { class PrincipalInfo; -} -} +} // namespace ipc +} // namespace mozilla struct PRThread; diff --git a/dom/workers/WorkerRunnable.cpp b/dom/workers/WorkerRunnable.cpp index da20badd2f..22198cb32d 100644 --- a/dom/workers/WorkerRunnable.cpp +++ b/dom/workers/WorkerRunnable.cpp @@ -38,7 +38,7 @@ MaybeReportMainThreadException(JSContext* aCx, bool aResult) } } -} // anonymous namespace +} // namespace #ifdef DEBUG WorkerRunnable::WorkerRunnable(WorkerPrivate* aWorkerPrivate, diff --git a/dom/workers/WorkerThread.cpp b/dom/workers/WorkerThread.cpp index c3fe2a4f83..37d3258166 100644 --- a/dom/workers/WorkerThread.cpp +++ b/dom/workers/WorkerThread.cpp @@ -28,7 +28,7 @@ namespace { // consistency. const uint32_t kWorkerStackSize = 256 * sizeof(size_t) * 1024; -} // anonymous namespace +} // namespace WorkerThreadFriendKey::WorkerThreadFriendKey() { diff --git a/dom/workers/Workers.h b/dom/workers/Workers.h index 316af15179..d984c2dc41 100644 --- a/dom/workers/Workers.h +++ b/dom/workers/Workers.h @@ -42,7 +42,7 @@ class nsIURI; namespace mozilla { namespace ipc { class PrincipalInfo; -} +} // namespace ipc namespace dom { // If you change this, the corresponding list in nsIWorkerDebugger.idl needs to @@ -53,8 +53,9 @@ enum WorkerType WorkerTypeShared, WorkerTypeService }; -} -} + +} // namespace dom +} // namespace mozilla BEGIN_WORKERS_NAMESPACE diff --git a/dom/workers/XMLHttpRequest.cpp b/dom/workers/XMLHttpRequest.cpp index fc847a9743..6663ebc8b7 100644 --- a/dom/workers/XMLHttpRequest.cpp +++ b/dom/workers/XMLHttpRequest.cpp @@ -888,7 +888,7 @@ public: } }; -} // anonymous namespace +} // namespace bool Proxy::Init() diff --git a/dom/xbl/XBLChildrenElement.cpp b/dom/xbl/XBLChildrenElement.cpp index 684ac8c3b1..28a74e0ef8 100644 --- a/dom/xbl/XBLChildrenElement.cpp +++ b/dom/xbl/XBLChildrenElement.cpp @@ -57,8 +57,8 @@ XBLChildrenElement::ParseAttribute(int32_t aNamespaceID, return false; } -} // namespace mozilla } // namespace dom +} // namespace mozilla using namespace mozilla::dom; diff --git a/dom/xbl/nsXBLPrototypeHandler.h b/dom/xbl/nsXBLPrototypeHandler.h index c154568185..d792565766 100644 --- a/dom/xbl/nsXBLPrototypeHandler.h +++ b/dom/xbl/nsXBLPrototypeHandler.h @@ -29,8 +29,8 @@ namespace mozilla { namespace dom { class AutoJSAPI; class EventTarget; -} -} +} // namespace dom +} // namespace mozilla #define NS_HANDLER_TYPE_XBL_JS (1 << 0) #define NS_HANDLER_TYPE_XBL_COMMAND (1 << 1) diff --git a/dom/xbl/nsXBLService.h b/dom/xbl/nsXBLService.h index d244981fdd..9014bc5501 100644 --- a/dom/xbl/nsXBLService.h +++ b/dom/xbl/nsXBLService.h @@ -25,8 +25,8 @@ class nsIPrincipal; namespace mozilla { namespace dom { class EventTarget; -} -} +} // namespace dom +} // namespace mozilla class nsXBLService final : public nsSupportsWeakReference { diff --git a/dom/xbl/nsXBLWindowKeyHandler.h b/dom/xbl/nsXBLWindowKeyHandler.h index 55ed5ac668..8fa1a41a5b 100644 --- a/dom/xbl/nsXBLWindowKeyHandler.h +++ b/dom/xbl/nsXBLWindowKeyHandler.h @@ -20,8 +20,8 @@ namespace dom { class Element; class EventTarget; struct IgnoreModifierState; -} -} +} // namespace dom +} // namespace mozilla class nsXBLWindowKeyHandler : public nsIDOMEventListener { diff --git a/dom/xml/CDATASection.cpp b/dom/xml/CDATASection.cpp index de1103d0a3..b92e99b392 100644 --- a/dom/xml/CDATASection.cpp +++ b/dom/xml/CDATASection.cpp @@ -64,5 +64,5 @@ CDATASection::DumpContent(FILE* out, int32_t aIndent, } #endif -} // namespace mozilla } // namespace dom +} // namespace mozilla diff --git a/dom/xml/nsXMLContentSink.h b/dom/xml/nsXMLContentSink.h index 6b42c9ff18..f94f1bfea8 100644 --- a/dom/xml/nsXMLContentSink.h +++ b/dom/xml/nsXMLContentSink.h @@ -27,8 +27,8 @@ class nsViewManager; namespace mozilla { namespace dom { class NodeInfo; -} -} +} // namespace dom +} // namespace mozilla typedef enum { eXMLContentSinkState_InProlog, diff --git a/dom/xslt/xslt/txMozillaXSLTProcessor.h b/dom/xslt/xslt/txMozillaXSLTProcessor.h index 11ab8b2c3d..33fd35abc1 100644 --- a/dom/xslt/xslt/txMozillaXSLTProcessor.h +++ b/dom/xslt/xslt/txMozillaXSLTProcessor.h @@ -34,8 +34,8 @@ class Document; class DocumentFragment; class GlobalObject; -} -} +} // namespace dom +} // namespace mozilla /* bacd8ad0-552f-11d3-a9f7-000064657374 */ #define TRANSFORMIIX_XSLT_PROCESSOR_CID \ diff --git a/dom/xul/nsXULElement.h b/dom/xul/nsXULElement.h index 66b3a3849b..a8b482f8a1 100644 --- a/dom/xul/nsXULElement.h +++ b/dom/xul/nsXULElement.h @@ -52,15 +52,15 @@ class EventChainPreVisitor; class EventListenerManager; namespace css { class StyleRule; -} +} // namespace css namespace dom { class BoxObject; -} -} +} // namespace dom +} // namespace mozilla namespace JS { class SourceBufferHolder; -} +} // namespace JS //////////////////////////////////////////////////////////////////////// diff --git a/dom/xul/templates/nsXMLBinding.h b/dom/xul/templates/nsXMLBinding.h index 41414e3178..79d479ab3f 100644 --- a/dom/xul/templates/nsXMLBinding.h +++ b/dom/xul/templates/nsXMLBinding.h @@ -17,8 +17,8 @@ class nsXMLBindingValues; namespace mozilla { namespace dom { class XPathResult; -} -} +} // namespace dom +} // namespace mozilla /** * Classes related to storing bindings for XML handling. diff --git a/editor/libeditor/ChangeAttributeTxn.h b/editor/libeditor/ChangeAttributeTxn.h index 2ca55eb445..80138b7954 100644 --- a/editor/libeditor/ChangeAttributeTxn.h +++ b/editor/libeditor/ChangeAttributeTxn.h @@ -63,7 +63,7 @@ private: nsString mUndoValue; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/ChangeStyleTxn.h b/editor/libeditor/ChangeStyleTxn.h index c6e90e685a..130a44e667 100644 --- a/editor/libeditor/ChangeStyleTxn.h +++ b/editor/libeditor/ChangeStyleTxn.h @@ -106,7 +106,7 @@ private: bool mRedoAttributeWasSet; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/CreateElementTxn.h b/editor/libeditor/CreateElementTxn.h index 1b3b4dad73..8108bf0b9f 100644 --- a/editor/libeditor/CreateElementTxn.h +++ b/editor/libeditor/CreateElementTxn.h @@ -70,7 +70,7 @@ protected: nsCOMPtr mRefNode; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/DeleteTextTxn.h b/editor/libeditor/DeleteTextTxn.h index e3bcb33160..1cfb9bc925 100644 --- a/editor/libeditor/DeleteTextTxn.h +++ b/editor/libeditor/DeleteTextTxn.h @@ -70,7 +70,7 @@ protected: nsRangeUpdater* mRangeUpdater; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/IMETextTxn.h b/editor/libeditor/IMETextTxn.h index 0e025b3a06..bb8c1d7c8c 100644 --- a/editor/libeditor/IMETextTxn.h +++ b/editor/libeditor/IMETextTxn.h @@ -81,7 +81,7 @@ private: NS_DEFINE_STATIC_IID_ACCESSOR(IMETextTxn, NS_IMETEXTTXN_IID) -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/InsertNodeTxn.h b/editor/libeditor/InsertNodeTxn.h index d38df18a23..9dcdee213a 100644 --- a/editor/libeditor/InsertNodeTxn.h +++ b/editor/libeditor/InsertNodeTxn.h @@ -52,7 +52,7 @@ protected: nsEditor& mEditor; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/InsertTextTxn.h b/editor/libeditor/InsertTextTxn.h index 73c6314ead..facecf646e 100644 --- a/editor/libeditor/InsertTextTxn.h +++ b/editor/libeditor/InsertTextTxn.h @@ -73,7 +73,7 @@ private: NS_DEFINE_STATIC_IID_ACCESSOR(InsertTextTxn, NS_INSERTTEXTTXN_IID) -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/JoinNodeTxn.h b/editor/libeditor/JoinNodeTxn.h index af070b7795..2298771927 100644 --- a/editor/libeditor/JoinNodeTxn.h +++ b/editor/libeditor/JoinNodeTxn.h @@ -60,7 +60,7 @@ protected: nsCOMPtr mParent; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/PlaceholderTxn.h b/editor/libeditor/PlaceholderTxn.h index ad0f4b0f1a..93f24c3d01 100644 --- a/editor/libeditor/PlaceholderTxn.h +++ b/editor/libeditor/PlaceholderTxn.h @@ -20,8 +20,8 @@ class nsHTMLEditor; namespace mozilla { namespace dom { class IMETextTxn; -} -} +} // namespace dom +} // namespace mozilla /** * An aggregate transaction that knows how to absorb all subsequent diff --git a/editor/libeditor/SplitNodeTxn.h b/editor/libeditor/SplitNodeTxn.h index d596220aa0..c2e83026bc 100644 --- a/editor/libeditor/SplitNodeTxn.h +++ b/editor/libeditor/SplitNodeTxn.h @@ -64,7 +64,7 @@ protected: nsCOMPtr mParent; }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/editor/libeditor/TypeInState.h b/editor/libeditor/TypeInState.h index 7b09a999aa..db325d319e 100644 --- a/editor/libeditor/TypeInState.h +++ b/editor/libeditor/TypeInState.h @@ -19,8 +19,8 @@ class nsIDOMNode; namespace mozilla { namespace dom { class Selection; -} -} +} // namespace dom +} // namespace mozilla struct PropItem { diff --git a/editor/libeditor/nsEditRules.h b/editor/libeditor/nsEditRules.h index 618ce58dc0..e069e75bc5 100644 --- a/editor/libeditor/nsEditRules.h +++ b/editor/libeditor/nsEditRules.h @@ -16,8 +16,8 @@ class nsPlaintextEditor; namespace mozilla { namespace dom { class Selection; -} -} +} // namespace dom +} // namespace mozilla /*************************************************************************** * base for an object to encapsulate any additional info needed to be passed diff --git a/editor/libeditor/nsEditor.h b/editor/libeditor/nsEditor.h index 42964fcd6a..393f7914cb 100644 --- a/editor/libeditor/nsEditor.h +++ b/editor/libeditor/nsEditor.h @@ -76,8 +76,8 @@ class JoinNodeTxn; class Selection; class SplitNodeTxn; class Text; -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla namespace mozilla { namespace widget { diff --git a/editor/libeditor/nsEditorUtils.h b/editor/libeditor/nsEditorUtils.h index 868572d923..51da8f1f3a 100644 --- a/editor/libeditor/nsEditorUtils.h +++ b/editor/libeditor/nsEditorUtils.h @@ -23,8 +23,8 @@ template class nsCOMArray; namespace mozilla { namespace dom { class Selection; -} -} +} // namespace dom +} // namespace mozilla /*************************************************************************** * stack based helper class for batching a collection of txns inside a diff --git a/editor/libeditor/nsHTMLCSSUtils.h b/editor/libeditor/nsHTMLCSSUtils.h index 55d10f2472..be2b94b2d4 100644 --- a/editor/libeditor/nsHTMLCSSUtils.h +++ b/editor/libeditor/nsHTMLCSSUtils.h @@ -22,8 +22,8 @@ class nsString; namespace mozilla { namespace dom { class Element; -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla class nsHTMLEditor; class nsIDOMWindow; diff --git a/editor/libeditor/nsHTMLEditRules.h b/editor/libeditor/nsHTMLEditRules.h index 020ecd4577..eb468a1195 100644 --- a/editor/libeditor/nsHTMLEditRules.h +++ b/editor/libeditor/nsHTMLEditRules.h @@ -34,8 +34,8 @@ namespace mozilla { namespace dom { class Element; class Selection; -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla struct DOMPoint; template class nsCOMArray; diff --git a/editor/libeditor/nsPlaintextEditor.h b/editor/libeditor/nsPlaintextEditor.h index 597b879221..741a582b6c 100644 --- a/editor/libeditor/nsPlaintextEditor.h +++ b/editor/libeditor/nsPlaintextEditor.h @@ -32,8 +32,8 @@ class nsITransferable; namespace mozilla { namespace dom { class Selection; -} -} +} // namespace dom +} // namespace mozilla /** * The text editor implementation. diff --git a/editor/libeditor/nsSelectionState.h b/editor/libeditor/nsSelectionState.h index de9b85b14c..f7190ac62f 100644 --- a/editor/libeditor/nsSelectionState.h +++ b/editor/libeditor/nsSelectionState.h @@ -19,8 +19,8 @@ namespace mozilla { namespace dom { class Selection; class Text; -} -} +} // namespace dom +} // namespace mozilla /*************************************************************************** * class for recording selection info. stores selection as collection of @@ -215,8 +215,9 @@ class MOZ_STACK_CLASS AutoReplaceContainerSelNotify mRU.DidReplaceContainer(mOriginalElement, mNewElement); } }; -} -} + +} // namespace dom +} // namespace mozilla /*************************************************************************** diff --git a/editor/libeditor/nsTextEditRules.h b/editor/libeditor/nsTextEditRules.h index 9ee5feaa02..e446233937 100644 --- a/editor/libeditor/nsTextEditRules.h +++ b/editor/libeditor/nsTextEditRules.h @@ -22,8 +22,8 @@ class nsIDOMNode; namespace mozilla { namespace dom { class Selection; -} // namespace dom -} // namespace mozilla +} // namespace dom +} // namespace mozilla /** Object that encapsulates HTML text-specific editing rules. * diff --git a/embedding/browser/nsDocShellTreeOwner.h b/embedding/browser/nsDocShellTreeOwner.h index fc87bd8e92..be3a249e89 100644 --- a/embedding/browser/nsDocShellTreeOwner.h +++ b/embedding/browser/nsDocShellTreeOwner.h @@ -34,8 +34,8 @@ namespace mozilla { namespace dom { class EventTarget; -} -} +} // namespace dom +} // namespace mozilla class nsWebBrowser; class ChromeTooltipListener; diff --git a/embedding/components/commandhandler/nsControllerCommandTable.h b/embedding/components/commandhandler/nsControllerCommandTable.h index 54cbcb2ee9..04b3e58a8a 100644 --- a/embedding/components/commandhandler/nsControllerCommandTable.h +++ b/embedding/components/commandhandler/nsControllerCommandTable.h @@ -13,8 +13,8 @@ class nsIControllerCommand; -class nsControllerCommandTable : public nsIControllerCommandTable, - public nsSupportsWeakReference +class nsControllerCommandTable final : public nsIControllerCommandTable, + public nsSupportsWeakReference { public: diff --git a/embedding/components/printingui/ipc/PrintingParent.h b/embedding/components/printingui/ipc/PrintingParent.h index 5c779d5e6e..4646a2e8af 100644 --- a/embedding/components/printingui/ipc/PrintingParent.h +++ b/embedding/components/printingui/ipc/PrintingParent.h @@ -47,6 +47,7 @@ private: nsIDOMWindow* DOMWindowFromBrowserParent(PBrowserParent* parent); }; + } // namespace embedding } // namespace mozilla diff --git a/extensions/cookie/nsPermissionManager.cpp b/extensions/cookie/nsPermissionManager.cpp index 83f9fffcd7..e48283ceb4 100644 --- a/extensions/cookie/nsPermissionManager.cpp +++ b/extensions/cookie/nsPermissionManager.cpp @@ -226,7 +226,7 @@ IsExpandedPrincipal(nsIPrincipal* aPrincipal) return !!ep; } -} // anonymous namespace +} // namespace //////////////////////////////////////////////////////////////////////////////// diff --git a/extensions/spellcheck/src/mozSpellChecker.h b/extensions/spellcheck/src/mozSpellChecker.h index bb252300eb..d60b5ac26d 100644 --- a/extensions/spellcheck/src/mozSpellChecker.h +++ b/extensions/spellcheck/src/mozSpellChecker.h @@ -22,7 +22,7 @@ namespace mozilla { class PRemoteSpellcheckEngineChild; class RemoteSpellcheckEngineChild; -} +} // namespace mozilla class mozSpellChecker : public nsISpellChecker { diff --git a/gfx/2d/2D.h b/gfx/2d/2D.h index 23bbda370e..7d6976beec 100644 --- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -1260,7 +1260,7 @@ private: static DrawEventRecorder *mRecorder; }; -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_2D_H diff --git a/gfx/2d/BaseCoord.h b/gfx/2d/BaseCoord.h index bbccbc7ae6..7d1c824564 100644 --- a/gfx/2d/BaseCoord.h +++ b/gfx/2d/BaseCoord.h @@ -104,7 +104,7 @@ struct BaseCoord { } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_BASECOORD_H_ */ diff --git a/gfx/2d/BaseMargin.h b/gfx/2d/BaseMargin.h index 33afd46585..0ac8201e54 100644 --- a/gfx/2d/BaseMargin.h +++ b/gfx/2d/BaseMargin.h @@ -138,7 +138,7 @@ struct BaseMargin { } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_BASEMARGIN_H_ */ diff --git a/gfx/2d/BasePoint.h b/gfx/2d/BasePoint.h index a09390946a..e93d4788e1 100644 --- a/gfx/2d/BasePoint.h +++ b/gfx/2d/BasePoint.h @@ -102,7 +102,7 @@ struct BasePoint { }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_BASEPOINT_H_ */ diff --git a/gfx/2d/BasePoint3D.h b/gfx/2d/BasePoint3D.h index c64ea247a5..4deeaf00de 100644 --- a/gfx/2d/BasePoint3D.h +++ b/gfx/2d/BasePoint3D.h @@ -111,7 +111,7 @@ struct BasePoint3D { } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_BASEPOINT3D_H_ */ diff --git a/gfx/2d/BasePoint4D.h b/gfx/2d/BasePoint4D.h index e098876a88..37e93f6474 100644 --- a/gfx/2d/BasePoint4D.h +++ b/gfx/2d/BasePoint4D.h @@ -120,7 +120,7 @@ struct BasePoint4D { bool HasPositiveWCoord() { return w > 0; } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_BASEPOINT4D_H_ */ diff --git a/gfx/2d/BaseRect.h b/gfx/2d/BaseRect.h index 7dea429fce..83ee628c78 100644 --- a/gfx/2d/BaseRect.h +++ b/gfx/2d/BaseRect.h @@ -572,7 +572,7 @@ private: bool operator!=(const Sub& aRect) const { return false; } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_BASERECT_H_ */ diff --git a/gfx/2d/BaseSize.h b/gfx/2d/BaseSize.h index 2da956cced..c146e4c705 100644 --- a/gfx/2d/BaseSize.h +++ b/gfx/2d/BaseSize.h @@ -85,7 +85,7 @@ struct BaseSize { } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_BASESIZE_H_ */ diff --git a/gfx/2d/Blur.cpp b/gfx/2d/Blur.cpp index c852c2c43c..c3b1912b40 100644 --- a/gfx/2d/Blur.cpp +++ b/gfx/2d/Blur.cpp @@ -755,5 +755,5 @@ AlphaBoxBlur::CalculateBlurRadius(const Point& aStd) return size; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/Blur.h b/gfx/2d/Blur.h index 644b6a474a..9e5e4a2260 100644 --- a/gfx/2d/Blur.h +++ b/gfx/2d/Blur.h @@ -175,7 +175,7 @@ private: bool mHasDirtyRect; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_BLUR_H_ */ diff --git a/gfx/2d/BlurSSE2.cpp b/gfx/2d/BlurSSE2.cpp index 52ca189bbb..d652325b90 100644 --- a/gfx/2d/BlurSSE2.cpp +++ b/gfx/2d/BlurSSE2.cpp @@ -311,5 +311,5 @@ AlphaBoxBlur::BoxBlur_SSE2(uint8_t* aData, } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/BorrowedContext.h b/gfx/2d/BorrowedContext.h index b2d096bac0..915ad99e5b 100644 --- a/gfx/2d/BorrowedContext.h +++ b/gfx/2d/BorrowedContext.h @@ -128,7 +128,7 @@ private: }; #endif -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_BORROWED_CONTEXT_H diff --git a/gfx/2d/Coord.h b/gfx/2d/Coord.h index 2a981b0ef3..90bbcbc8a2 100644 --- a/gfx/2d/Coord.h +++ b/gfx/2d/Coord.h @@ -136,7 +136,7 @@ struct CoordTyped : } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_COORD_H_ */ diff --git a/gfx/2d/DataSourceSurface.cpp b/gfx/2d/DataSourceSurface.cpp index c3a837f996..75d8435064 100644 --- a/gfx/2d/DataSourceSurface.cpp +++ b/gfx/2d/DataSourceSurface.cpp @@ -17,5 +17,5 @@ DataSourceSurface::GetDataSurface() return surface.forget(); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DataSourceSurfaceWrapper.h b/gfx/2d/DataSourceSurfaceWrapper.h index 445a4adc2b..d1112b57c0 100644 --- a/gfx/2d/DataSourceSurfaceWrapper.h +++ b/gfx/2d/DataSourceSurfaceWrapper.h @@ -33,7 +33,7 @@ private: RefPtr mSurface; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_DATASOURCESURFACEWRAPPER_H_ */ diff --git a/gfx/2d/DataSurfaceHelpers.cpp b/gfx/2d/DataSurfaceHelpers.cpp index cc4a8291d8..1587cabcef 100644 --- a/gfx/2d/DataSurfaceHelpers.cpp +++ b/gfx/2d/DataSurfaceHelpers.cpp @@ -281,5 +281,5 @@ CreateDataSourceSurfaceByCloning(DataSourceSurface* aSource) return copy.forget(); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DataSurfaceHelpers.h b/gfx/2d/DataSurfaceHelpers.h index 9cb9f4054b..fec89ae5a8 100644 --- a/gfx/2d/DataSurfaceHelpers.h +++ b/gfx/2d/DataSurfaceHelpers.h @@ -100,7 +100,7 @@ DataAtOffset(DataSourceSurface* aSurface, IntPoint aPoint); bool SurfaceContainsPoint(SourceSurface* aSurface, const IntPoint& aPoint); -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_DATASURFACEHELPERS_H diff --git a/gfx/2d/DrawCommand.h b/gfx/2d/DrawCommand.h index 6f1466d8ea..228d627c08 100644 --- a/gfx/2d/DrawCommand.h +++ b/gfx/2d/DrawCommand.h @@ -498,7 +498,9 @@ private: Matrix mTransform; }; -} /* namespace mozilla */ -} /* namespace gfx */ +} // namespace gfx + +} // namespace mozilla + #endif /* MOZILLA_GFX_DRAWCOMMAND_H_ */ diff --git a/gfx/2d/DrawEventRecorder.cpp b/gfx/2d/DrawEventRecorder.cpp index 3a663765cb..bfabb127a6 100644 --- a/gfx/2d/DrawEventRecorder.cpp +++ b/gfx/2d/DrawEventRecorder.cpp @@ -50,5 +50,5 @@ DrawEventRecorderFile::Flush() mOutputFile.flush(); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawEventRecorder.h b/gfx/2d/DrawEventRecorder.h index e297a58710..e6e5d4c8b3 100644 --- a/gfx/2d/DrawEventRecorder.h +++ b/gfx/2d/DrawEventRecorder.h @@ -75,7 +75,7 @@ private: std::ofstream mOutputFile; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_DRAWEVENTRECORDER_H_ */ diff --git a/gfx/2d/DrawTarget.cpp b/gfx/2d/DrawTarget.cpp index f2a46681be..d27d279440 100644 --- a/gfx/2d/DrawTarget.cpp +++ b/gfx/2d/DrawTarget.cpp @@ -35,5 +35,5 @@ DrawTarget::DrawCapturedDT(DrawTargetCapture *aCaptureDT, static_cast(aCaptureDT)->ReplayToDrawTarget(this, aTransform); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetCG.cpp b/gfx/2d/DrawTargetCG.cpp index c8f209427c..31352a1037 100644 --- a/gfx/2d/DrawTargetCG.cpp +++ b/gfx/2d/DrawTargetCG.cpp @@ -2066,5 +2066,5 @@ BorrowedCGContext::ReturnCGContextToDrawTarget(DrawTarget *aDT, CGContextRef cg) } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetCG.h b/gfx/2d/DrawTargetCG.h index 5e9a5ab9a0..31b40deea6 100644 --- a/gfx/2d/DrawTargetCG.h +++ b/gfx/2d/DrawTargetCG.h @@ -209,8 +209,8 @@ private: bool mMayContainInvalidPremultipliedData; }; -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/2d/DrawTargetCairo.cpp b/gfx/2d/DrawTargetCairo.cpp index 25db049807..09fe925700 100644 --- a/gfx/2d/DrawTargetCairo.cpp +++ b/gfx/2d/DrawTargetCairo.cpp @@ -1715,5 +1715,5 @@ BorrowedCairoContext::ReturnCairoContextToDrawTarget(DrawTarget* aDT, cairoDT->mContext = aCairo; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetCairo.h b/gfx/2d/DrawTargetCairo.h index f250766fea..e02af4a5d2 100644 --- a/gfx/2d/DrawTargetCairo.h +++ b/gfx/2d/DrawTargetCairo.h @@ -49,7 +49,7 @@ class GradientStopsCairo : public GradientStops ExtendMode mExtendMode; }; -class DrawTargetCairo : public DrawTarget +class DrawTargetCairo final : public DrawTarget { public: MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawTargetCairo, override) @@ -217,7 +217,7 @@ private: // data static cairo_surface_t *mDummySurface; }; -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_DRAWTARGET_CAIRO_H_ diff --git a/gfx/2d/DrawTargetCapture.cpp b/gfx/2d/DrawTargetCapture.cpp index 69c118c640..84d08d7d28 100644 --- a/gfx/2d/DrawTargetCapture.cpp +++ b/gfx/2d/DrawTargetCapture.cpp @@ -193,5 +193,5 @@ DrawTargetCaptureImpl::ReplayToDrawTarget(DrawTarget* aDT, const Matrix& aTransf } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetCapture.h b/gfx/2d/DrawTargetCapture.h index 3d2d56ce21..0e33ff5a6b 100644 --- a/gfx/2d/DrawTargetCapture.h +++ b/gfx/2d/DrawTargetCapture.h @@ -157,7 +157,9 @@ private: std::vector mDrawCommandStorage; }; -} /* namespace mozilla */ -} /* namespace gfx */ +} // namespace gfx + +} // namespace mozilla + #endif /* MOZILLA_GFX_DRAWTARGETCAPTURE_H_ */ diff --git a/gfx/2d/DrawTargetDual.cpp b/gfx/2d/DrawTargetDual.cpp index d5ed632a28..bdc27897eb 100644 --- a/gfx/2d/DrawTargetDual.cpp +++ b/gfx/2d/DrawTargetDual.cpp @@ -195,5 +195,5 @@ DrawTargetDual::CreateSimilarDrawTarget(const IntSize &aSize, SurfaceFormat aFor return MakeAndAddRef(dtA, dtB); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetDual.h b/gfx/2d/DrawTargetDual.h index 6c8a05abe5..bcc06be26e 100644 --- a/gfx/2d/DrawTargetDual.h +++ b/gfx/2d/DrawTargetDual.h @@ -161,7 +161,7 @@ private: RefPtr mB; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_DRAWTARGETDUAL_H_ */ diff --git a/gfx/2d/DrawTargetRecording.cpp b/gfx/2d/DrawTargetRecording.cpp index e541e07ef6..f05c49fb7c 100644 --- a/gfx/2d/DrawTargetRecording.cpp +++ b/gfx/2d/DrawTargetRecording.cpp @@ -588,5 +588,5 @@ DrawTargetRecording::EnsureStored(const Path *aPath) } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetRecording.h b/gfx/2d/DrawTargetRecording.h index 0e2b3fee7f..9bf7b2f7d9 100644 --- a/gfx/2d/DrawTargetRecording.h +++ b/gfx/2d/DrawTargetRecording.h @@ -281,7 +281,7 @@ private: RefPtr mFinalDT; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_DRAWTARGETRECORDING_H_ */ diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp index c5a5a11e04..6c91a8512e 100644 --- a/gfx/2d/DrawTargetSkia.cpp +++ b/gfx/2d/DrawTargetSkia.cpp @@ -958,5 +958,5 @@ DrawTargetSkia::SnapshotDestroyed() mSnapshot = nullptr; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetSkia.h b/gfx/2d/DrawTargetSkia.h index 260941ebda..a1bde6dcb9 100644 --- a/gfx/2d/DrawTargetSkia.h +++ b/gfx/2d/DrawTargetSkia.h @@ -140,7 +140,7 @@ private: SourceSurfaceSkia* mSnapshot; }; -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_SOURCESURFACESKIA_H diff --git a/gfx/2d/DrawTargetTiled.cpp b/gfx/2d/DrawTargetTiled.cpp index 31717577bd..d969b00d30 100644 --- a/gfx/2d/DrawTargetTiled.cpp +++ b/gfx/2d/DrawTargetTiled.cpp @@ -305,5 +305,5 @@ DrawTargetTiled::Fill(const Path* aPath, const Pattern& aPattern, const DrawOpti } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/DrawTargetTiled.h b/gfx/2d/DrawTargetTiled.h index aa9af05f16..1e4534e74d 100644 --- a/gfx/2d/DrawTargetTiled.h +++ b/gfx/2d/DrawTargetTiled.h @@ -207,7 +207,7 @@ public: IntRect mRect; }; -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/2d/Factory.cpp b/gfx/2d/Factory.cpp index ae01ddbb94..e86a16a60d 100644 --- a/gfx/2d/Factory.cpp +++ b/gfx/2d/Factory.cpp @@ -947,5 +947,5 @@ CriticalLogger::OutputMessage(const std::string &aString, BasicLogger::OutputMessage(aString, aLevel, aNoNewline); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/FilterNodeSoftware.cpp b/gfx/2d/FilterNodeSoftware.cpp index f67e149a68..b5a37e775a 100644 --- a/gfx/2d/FilterNodeSoftware.cpp +++ b/gfx/2d/FilterNodeSoftware.cpp @@ -1511,7 +1511,8 @@ struct CompareIntRects return a.height < b.height; } }; -} + +} // namespace already_AddRefed FilterNodeTileSoftware::Render(const IntRect& aRect) diff --git a/gfx/2d/FilterNodeSoftware.h b/gfx/2d/FilterNodeSoftware.h index 74a6026998..8ae5afd030 100644 --- a/gfx/2d/FilterNodeSoftware.h +++ b/gfx/2d/FilterNodeSoftware.h @@ -718,7 +718,7 @@ private: #endif }; -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_FILTERNODESOFTWARE_H_ diff --git a/gfx/2d/FilterProcessingSIMD-inl.h b/gfx/2d/FilterProcessingSIMD-inl.h index 40d8189260..21306a8f20 100644 --- a/gfx/2d/FilterProcessingSIMD-inl.h +++ b/gfx/2d/FilterProcessingSIMD-inl.h @@ -1077,5 +1077,5 @@ ApplyArithmeticCombine_SIMD(DataSourceSurface* aInput1, DataSourceSurface* aInpu return target.forget(); } -} // namespace mozilla } // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/FilterProcessingSSE2.cpp b/gfx/2d/FilterProcessingSSE2.cpp index 9cd0e7bc7d..6f14fc3efd 100644 --- a/gfx/2d/FilterProcessingSSE2.cpp +++ b/gfx/2d/FilterProcessingSSE2.cpp @@ -108,5 +108,5 @@ FilterProcessing::ApplyArithmeticCombine_SSE2(DataSourceSurface* aInput1, DataSo return ApplyArithmeticCombine_SIMD<__m128i,__m128i,__m128i>(aInput1, aInput2, aK1, aK2, aK3, aK4); } -} // namespace mozilla } // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/FilterProcessingScalar.cpp b/gfx/2d/FilterProcessingScalar.cpp index ca8074bd94..9e88c563e4 100644 --- a/gfx/2d/FilterProcessingScalar.cpp +++ b/gfx/2d/FilterProcessingScalar.cpp @@ -240,5 +240,5 @@ FilterProcessing::ApplyArithmeticCombine_Scalar(DataSourceSurface* aInput1, Data return ApplyArithmeticCombine_SIMD(aInput1, aInput2, aK1, aK2, aK3, aK4); } -} // namespace mozilla } // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/Filters.h b/gfx/2d/Filters.h index 31c3e83944..2b6d162281 100644 --- a/gfx/2d/Filters.h +++ b/gfx/2d/Filters.h @@ -506,7 +506,7 @@ protected: FilterNode() {} }; -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/2d/HelpersCairo.h b/gfx/2d/HelpersCairo.h index 2c35dcc185..679ede5a93 100644 --- a/gfx/2d/HelpersCairo.h +++ b/gfx/2d/HelpersCairo.h @@ -320,7 +320,7 @@ private: cairo_matrix_t mSaveMatrix; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_HELPERSCAIRO_H_ */ diff --git a/gfx/2d/HelpersSkia.h b/gfx/2d/HelpersSkia.h index bd192a51b9..7f57fe1d9b 100644 --- a/gfx/2d/HelpersSkia.h +++ b/gfx/2d/HelpersSkia.h @@ -355,7 +355,7 @@ private: // End of code imported from Skia. -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_HELPERSSKIA_H_ */ diff --git a/gfx/2d/ImageScaling.cpp b/gfx/2d/ImageScaling.cpp index 62d08d0566..85e99522bd 100644 --- a/gfx/2d/ImageScaling.cpp +++ b/gfx/2d/ImageScaling.cpp @@ -247,5 +247,5 @@ ImageHalfScaler::HalfImageHorizontal_C(uint8_t *aSource, int32_t aSourceStride, } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/ImageScaling.h b/gfx/2d/ImageScaling.h index 47d489f9d1..56173b6448 100644 --- a/gfx/2d/ImageScaling.h +++ b/gfx/2d/ImageScaling.h @@ -70,7 +70,7 @@ private: uint32_t mStride; }; -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/2d/ImageScalingSSE2.cpp b/gfx/2d/ImageScalingSSE2.cpp index 92bad43a17..1f4d4778ef 100644 --- a/gfx/2d/ImageScalingSSE2.cpp +++ b/gfx/2d/ImageScalingSSE2.cpp @@ -326,5 +326,5 @@ ImageHalfScaler::HalfImageHorizontal_SSE2(uint8_t *aSource, int32_t aSourceStrid } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/Logging.h b/gfx/2d/Logging.h index 54803fdfbe..6ac02622d6 100644 --- a/gfx/2d/Logging.h +++ b/gfx/2d/Logging.h @@ -621,7 +621,7 @@ private: TreeLog& mTreeLog; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_LOGGING_H_ */ diff --git a/gfx/2d/Matrix.cpp b/gfx/2d/Matrix.cpp index 70058fede1..f01f40e258 100644 --- a/gfx/2d/Matrix.cpp +++ b/gfx/2d/Matrix.cpp @@ -256,5 +256,5 @@ Matrix4x4::SetNAN() _44 = UnspecifiedNaN(); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/Matrix.h b/gfx/2d/Matrix.h index 11dd2412b1..780245ff29 100644 --- a/gfx/2d/Matrix.h +++ b/gfx/2d/Matrix.h @@ -953,7 +953,7 @@ public: Float _51, _52, _53, _54; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_MATRIX_H_ */ diff --git a/gfx/2d/Path.cpp b/gfx/2d/Path.cpp index d946395238..d1747cc658 100644 --- a/gfx/2d/Path.cpp +++ b/gfx/2d/Path.cpp @@ -526,5 +526,5 @@ FlattenBezier(const BezierControlPoints &aControlPoints, } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/PathAnalysis.h b/gfx/2d/PathAnalysis.h index 6b9b33f890..5a38ed161d 100644 --- a/gfx/2d/PathAnalysis.h +++ b/gfx/2d/PathAnalysis.h @@ -53,5 +53,5 @@ private: std::vector mPathOps; }; -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/PathCG.cpp b/gfx/2d/PathCG.cpp index aec62c7416..cf55a2befb 100644 --- a/gfx/2d/PathCG.cpp +++ b/gfx/2d/PathCG.cpp @@ -362,6 +362,6 @@ PathCG::GetStrokedBounds(const StrokeOptions &aStrokeOptions, } -} +} // namespace gfx -} +} // namespace mozilla diff --git a/gfx/2d/PathCG.h b/gfx/2d/PathCG.h index fc0ce7b725..e627ab706a 100644 --- a/gfx/2d/PathCG.h +++ b/gfx/2d/PathCG.h @@ -103,7 +103,7 @@ private: FillRule mFillRule; }; -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/2d/PathCairo.cpp b/gfx/2d/PathCairo.cpp index d85119f684..2d78a27711 100644 --- a/gfx/2d/PathCairo.cpp +++ b/gfx/2d/PathCairo.cpp @@ -319,5 +319,5 @@ PathCairo::AppendPathToBuilder(PathBuilderCairo *aBuilder, const Matrix *aTransf } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/PathCairo.h b/gfx/2d/PathCairo.h index 099f076fea..2b82b7c33c 100644 --- a/gfx/2d/PathCairo.h +++ b/gfx/2d/PathCairo.h @@ -89,7 +89,7 @@ private: Point mCurrentPoint; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_PATH_CAIRO_H_ */ diff --git a/gfx/2d/PathRecording.cpp b/gfx/2d/PathRecording.cpp index 243941be39..03fd4cb5a5 100644 --- a/gfx/2d/PathRecording.cpp +++ b/gfx/2d/PathRecording.cpp @@ -116,5 +116,5 @@ PathRecording::TransformedCopyToBuilder(const Matrix &aTransform, FillRule aFill return recording.forget(); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/PathRecording.h b/gfx/2d/PathRecording.h index 7df80399f9..2d3e4eb9cd 100644 --- a/gfx/2d/PathRecording.h +++ b/gfx/2d/PathRecording.h @@ -130,7 +130,7 @@ private: std::vector mStoredRecorders; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_PATHRECORDING_H_ */ diff --git a/gfx/2d/PathSkia.cpp b/gfx/2d/PathSkia.cpp index e01d452a4b..00fa0bd62b 100644 --- a/gfx/2d/PathSkia.cpp +++ b/gfx/2d/PathSkia.cpp @@ -239,5 +239,5 @@ PathSkia::StreamToSink(PathSink *aSink) const } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/PathSkia.h b/gfx/2d/PathSkia.h index 8b49da0de9..6b07ea3543 100644 --- a/gfx/2d/PathSkia.h +++ b/gfx/2d/PathSkia.h @@ -86,7 +86,7 @@ private: FillRule mFillRule; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_PATH_SKIA_H_ */ diff --git a/gfx/2d/Point.h b/gfx/2d/Point.h index 0e271ccc2a..029b7f9cc8 100644 --- a/gfx/2d/Point.h +++ b/gfx/2d/Point.h @@ -27,7 +27,7 @@ namespace gfx { // This should only be used by the typedefs below. struct UnknownUnits {}; -} // close namespace 'gfx' because IsPixel specialization must be in 'mozilla' +} // namespace gfx template<> struct IsPixel : TrueType {}; @@ -218,7 +218,7 @@ IntSizeTyped RoundedToInt(const SizeTyped& aSize) { int32_t(floorf(aSize.height + 0.5f))); } -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_POINT_H_ */ diff --git a/gfx/2d/RecordedEvent.cpp b/gfx/2d/RecordedEvent.cpp index 8506029a29..1b3876976f 100644 --- a/gfx/2d/RecordedEvent.cpp +++ b/gfx/2d/RecordedEvent.cpp @@ -1565,5 +1565,5 @@ RecordedFilterNodeSetInput::OutputSimpleEventInfo(stringstream &aStringStream) c aStringStream << ")"; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/RecordedEvent.h b/gfx/2d/RecordedEvent.h index fca0076503..5412478d2c 100644 --- a/gfx/2d/RecordedEvent.h +++ b/gfx/2d/RecordedEvent.h @@ -1073,7 +1073,7 @@ private: MOZ_IMPLICIT RecordedFilterNodeSetInput(std::istream &aStream); }; -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/2d/RecordingTypes.h b/gfx/2d/RecordingTypes.h index 92ee46f526..93fc67a68f 100644 --- a/gfx/2d/RecordingTypes.h +++ b/gfx/2d/RecordingTypes.h @@ -35,7 +35,7 @@ void ReadElement(std::istream &aStream, T &aElement) ElementStreamFormat::Read(aStream, aElement); } -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_RECORDINGTYPES_H_ */ diff --git a/gfx/2d/Rect.h b/gfx/2d/Rect.h index db0f45d373..d72798a350 100644 --- a/gfx/2d/Rect.h +++ b/gfx/2d/Rect.h @@ -187,7 +187,7 @@ IntRectTyped RoundedOut(const RectTyped& aRect) int32_t(copy.height)); } -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_RECT_H_ */ diff --git a/gfx/2d/Scale.cpp b/gfx/2d/Scale.cpp index b78f39cfe3..6062c5fcd2 100644 --- a/gfx/2d/Scale.cpp +++ b/gfx/2d/Scale.cpp @@ -51,5 +51,5 @@ bool Scale(uint8_t* srcData, int32_t srcWidth, int32_t srcHeight, int32_t srcStr #endif } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/Scale.h b/gfx/2d/Scale.h index 0e8000d577..75465da388 100644 --- a/gfx/2d/Scale.h +++ b/gfx/2d/Scale.h @@ -30,7 +30,7 @@ GFX2D_API bool Scale(uint8_t* srcData, int32_t srcWidth, int32_t srcHeight, int3 uint8_t* dstData, int32_t dstWidth, int32_t dstHeight, int32_t dstStride, SurfaceFormat format); -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_BLUR_H_ */ diff --git a/gfx/2d/ScaleFactor.h b/gfx/2d/ScaleFactor.h index 34b405ebab..89bbbc96d4 100644 --- a/gfx/2d/ScaleFactor.h +++ b/gfx/2d/ScaleFactor.h @@ -79,7 +79,7 @@ struct ScaleFactor { } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SCALEFACTOR_H_ */ diff --git a/gfx/2d/ScaleFactors2D.h b/gfx/2d/ScaleFactors2D.h index 16dfbce353..3327b4ce9f 100644 --- a/gfx/2d/ScaleFactors2D.h +++ b/gfx/2d/ScaleFactors2D.h @@ -130,7 +130,7 @@ struct ScaleFactors2D { } }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SCALEFACTORS2D_H_ */ diff --git a/gfx/2d/ScaledFontBase.cpp b/gfx/2d/ScaledFontBase.cpp index 228bd3ad1e..0e5fbd38e1 100644 --- a/gfx/2d/ScaledFontBase.cpp +++ b/gfx/2d/ScaledFontBase.cpp @@ -185,5 +185,5 @@ ScaledFontBase::SetCairoScaledFont(cairo_scaled_font_t* font) } #endif -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/ScaledFontBase.h b/gfx/2d/ScaledFontBase.h index 0cecd2fc2a..05577795d0 100644 --- a/gfx/2d/ScaledFontBase.h +++ b/gfx/2d/ScaledFontBase.h @@ -63,7 +63,7 @@ protected: Float mSize; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SCALEDFONTBASE_H_ */ diff --git a/gfx/2d/ScaledFontCairo.cpp b/gfx/2d/ScaledFontCairo.cpp index 2304b87f46..d64e02de50 100644 --- a/gfx/2d/ScaledFontCairo.cpp +++ b/gfx/2d/ScaledFontCairo.cpp @@ -61,5 +61,5 @@ SkTypeface* ScaledFontCairo::GetSkTypeface() } #endif -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/ScaledFontCairo.h b/gfx/2d/ScaledFontCairo.h index 9f4d227aed..de1f758043 100644 --- a/gfx/2d/ScaledFontCairo.h +++ b/gfx/2d/ScaledFontCairo.h @@ -50,7 +50,7 @@ private: bool mAutoHinting; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SCALEDFONTCAIRO_H_ */ diff --git a/gfx/2d/ScaledFontMac.cpp b/gfx/2d/ScaledFontMac.cpp index 24f2fa8c0e..7c68b90d99 100644 --- a/gfx/2d/ScaledFontMac.cpp +++ b/gfx/2d/ScaledFontMac.cpp @@ -270,5 +270,5 @@ ScaledFontMac::GetFontFileData(FontFileDataOutput aDataCallback, void *aBaton) } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/ScaledFontMac.h b/gfx/2d/ScaledFontMac.h index 98fd2c1d49..7862a0a497 100644 --- a/gfx/2d/ScaledFontMac.h +++ b/gfx/2d/ScaledFontMac.h @@ -47,7 +47,7 @@ public: static CTFontDrawGlyphsFuncT* CTFontDrawGlyphsPtr; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SCALEDFONTMAC_H_ */ diff --git a/gfx/2d/SourceSurfaceCG.cpp b/gfx/2d/SourceSurfaceCG.cpp index 2a2c73402f..b2627b4403 100644 --- a/gfx/2d/SourceSurfaceCG.cpp +++ b/gfx/2d/SourceSurfaceCG.cpp @@ -453,5 +453,5 @@ SourceSurfaceCGIOSurfaceContext::GetData() return (unsigned char*)mData; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SourceSurfaceCG.h b/gfx/2d/SourceSurfaceCG.h index f9b2a658ef..5d8655d503 100644 --- a/gfx/2d/SourceSurfaceCG.h +++ b/gfx/2d/SourceSurfaceCG.h @@ -198,7 +198,7 @@ private: }; -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_SOURCESURFACECG_H diff --git a/gfx/2d/SourceSurfaceCairo.cpp b/gfx/2d/SourceSurfaceCairo.cpp index 2afae57ad0..2ead9510f3 100644 --- a/gfx/2d/SourceSurfaceCairo.cpp +++ b/gfx/2d/SourceSurfaceCairo.cpp @@ -158,5 +158,5 @@ DataSourceSurfaceCairo::GetSurface() const return mImageSurface; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SourceSurfaceCairo.h b/gfx/2d/SourceSurfaceCairo.h index 1466e9ac81..428c75957b 100644 --- a/gfx/2d/SourceSurfaceCairo.h +++ b/gfx/2d/SourceSurfaceCairo.h @@ -64,7 +64,7 @@ private: cairo_surface_t* mImageSurface; }; -} -} +} // namespace gfx +} // namespace mozilla #endif // _MOZILLA_GFX_OP_SOURCESURFACE_CAIRO_H diff --git a/gfx/2d/SourceSurfaceDual.h b/gfx/2d/SourceSurfaceDual.h index 7c44bbc0b6..d392459e87 100644 --- a/gfx/2d/SourceSurfaceDual.h +++ b/gfx/2d/SourceSurfaceDual.h @@ -37,7 +37,7 @@ private: RefPtr mB; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SOURCESURFACEDUAL_H_ */ diff --git a/gfx/2d/SourceSurfaceRawData.cpp b/gfx/2d/SourceSurfaceRawData.cpp index 901a5f5676..c22de5d2b5 100644 --- a/gfx/2d/SourceSurfaceRawData.cpp +++ b/gfx/2d/SourceSurfaceRawData.cpp @@ -87,5 +87,5 @@ SourceSurfaceAlignedRawData::InitWithStride(const IntSize &aSize, return mArray != nullptr; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SourceSurfaceRawData.h b/gfx/2d/SourceSurfaceRawData.h index 13a84e5d01..de31ca893b 100644 --- a/gfx/2d/SourceSurfaceRawData.h +++ b/gfx/2d/SourceSurfaceRawData.h @@ -70,7 +70,7 @@ private: IntSize mSize; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SOURCESURFACERAWDATA_H_ */ diff --git a/gfx/2d/SourceSurfaceSkia.cpp b/gfx/2d/SourceSurfaceSkia.cpp index e33851aa79..259c75a8a9 100644 --- a/gfx/2d/SourceSurfaceSkia.cpp +++ b/gfx/2d/SourceSurfaceSkia.cpp @@ -156,5 +156,5 @@ SourceSurfaceSkia::MaybeUnlock() } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/2d/SourceSurfaceSkia.h b/gfx/2d/SourceSurfaceSkia.h index 06631acd04..c9e0108793 100644 --- a/gfx/2d/SourceSurfaceSkia.h +++ b/gfx/2d/SourceSurfaceSkia.h @@ -68,7 +68,7 @@ private: bool mLocked; }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_SOURCESURFACESKIA_H_ */ diff --git a/gfx/2d/Tools.h b/gfx/2d/Tools.h index d7405c75bc..2fbefacf1f 100644 --- a/gfx/2d/Tools.h +++ b/gfx/2d/Tools.h @@ -215,7 +215,7 @@ int32_t GetAlignedStride(int32_t aStride) return (aStride + mask) & ~mask; } -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_TOOLS_H_ */ diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h index 29cf37e0ba..9606d59e78 100644 --- a/gfx/2d/Types.h +++ b/gfx/2d/Types.h @@ -279,8 +279,8 @@ struct GradientStop Color color; }; -} -} +} // namespace gfx +} // namespace mozilla #if defined(XP_WIN) && defined(MOZ_GFX) #ifdef GFX2D_INTERNAL @@ -322,6 +322,7 @@ enum SideBits { eSideBitsLeftRight = eSideBitsLeft | eSideBitsRight, eSideBitsAll = eSideBitsTopBottom | eSideBitsLeftRight }; + } // namespace mozilla #define NS_SIDE_TOP mozilla::eSideTop diff --git a/gfx/2d/UserData.h b/gfx/2d/UserData.h index e803dc04e1..04d50b6191 100644 --- a/gfx/2d/UserData.h +++ b/gfx/2d/UserData.h @@ -122,7 +122,7 @@ private: }; -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_USERDATA_H_ */ diff --git a/gfx/2d/image_operations.cpp b/gfx/2d/image_operations.cpp index 8a913a22c1..fc6eabc1b2 100644 --- a/gfx/2d/image_operations.cpp +++ b/gfx/2d/image_operations.cpp @@ -155,7 +155,7 @@ void ComputeFilters(ImageOperations::ResizeMethod method, output->PaddingForSIMD(8); } -} +} // namespace resize ImageOperations::ResizeMethod ResizeMethodToAlgorithmMethod( ImageOperations::ResizeMethod method) { @@ -384,4 +384,4 @@ SkBitmap ImageOperations::Resize(const SkBitmap& source, dest_pixels); } -} // namespace skia +} // namespace skia diff --git a/gfx/2d/unittest/TestCairo.cpp b/gfx/2d/unittest/TestCairo.cpp index f73e1772d3..36f34373e9 100644 --- a/gfx/2d/unittest/TestCairo.cpp +++ b/gfx/2d/unittest/TestCairo.cpp @@ -49,5 +49,5 @@ TEST(Cairo, Bug825721) { TryCircle(0.0, 1.0, 5761126469220696064.0); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/gl/DecomposeIntoNoRepeatTriangles.cpp b/gfx/gl/DecomposeIntoNoRepeatTriangles.cpp index 90fb925141..fb432de7a4 100644 --- a/gfx/gl/DecomposeIntoNoRepeatTriangles.cpp +++ b/gfx/gl/DecomposeIntoNoRepeatTriangles.cpp @@ -176,5 +176,5 @@ DecomposeIntoNoRepeatTriangles(const nsIntRect& aTexCoordRect, } } -} -} +} // namespace gl +} // namespace mozilla diff --git a/gfx/gl/DecomposeIntoNoRepeatTriangles.h b/gfx/gl/DecomposeIntoNoRepeatTriangles.h index 2023afbf08..bac990b029 100644 --- a/gfx/gl/DecomposeIntoNoRepeatTriangles.h +++ b/gfx/gl/DecomposeIntoNoRepeatTriangles.h @@ -71,7 +71,7 @@ void DecomposeIntoNoRepeatTriangles(const nsIntRect& aTexCoordRect, RectTriangles& aRects, bool aFlipY = false); -} -} +} // namespace gl +} // namespace mozilla #endif // DecomposeIntoNoRepeatTriangles_h_ diff --git a/gfx/gl/GLBlitHelper.h b/gfx/gl/GLBlitHelper.h index 7aad62e2fa..6317b8db99 100644 --- a/gfx/gl/GLBlitHelper.h +++ b/gfx/gl/GLBlitHelper.h @@ -21,7 +21,7 @@ class PlanarYCbCrImage; class GrallocImage; class SurfaceTextureImage; class EGLImageImage; -} +} // namespace layers namespace gl { diff --git a/gfx/gl/GLContext.h b/gfx/gl/GLContext.h index 31b9e64a89..51ae8dd5e1 100644 --- a/gfx/gl/GLContext.h +++ b/gfx/gl/GLContext.h @@ -57,13 +57,13 @@ class nsIThread; namespace android { class GraphicBuffer; -} +} // namespace android namespace mozilla { namespace gfx { class DataSourceSurface; class SourceSurface; - } + } // namespace gfx namespace gl { class GLContext; @@ -74,12 +74,12 @@ namespace mozilla { class GLBlitTextureImageHelper; class GLReadTexImageHelper; struct SurfaceCaps; - } + } // namespace gl namespace layers { class ColorTextureLayerProgram; - } -} + } // namespace layers +} // namespace mozilla namespace mozilla { namespace gl { diff --git a/gfx/gl/GLContextCGL.h b/gfx/gl/GLContextCGL.h index 8b812f775a..f7416b334c 100644 --- a/gfx/gl/GLContextCGL.h +++ b/gfx/gl/GLContextCGL.h @@ -60,7 +60,7 @@ public: virtual bool SwapBuffers() override; }; -} -} +} // namespace gl +} // namespace mozilla #endif // GLCONTEXTCGL_H_ diff --git a/gfx/gl/GLContextEGL.h b/gfx/gl/GLContextEGL.h index a5181101a9..db7e65d53b 100644 --- a/gfx/gl/GLContextEGL.h +++ b/gfx/gl/GLContextEGL.h @@ -124,7 +124,7 @@ protected: gfxIntSize& pbsize); }; -} -} +} // namespace gl +} // namespace mozilla #endif // GLCONTEXTEGL_H_ diff --git a/gfx/gl/GLContextProvider.h b/gfx/gl/GLContextProvider.h index cfc35824b1..6bc02cdfad 100644 --- a/gfx/gl/GLContextProvider.h +++ b/gfx/gl/GLContextProvider.h @@ -70,7 +70,7 @@ typedef GLContextProviderNull GLContextProvider; #undef IN_GL_CONTEXT_PROVIDER_H -} -} +} // namespace gl +} // namespace mozilla #endif diff --git a/gfx/gl/GLContextSymbols.h b/gfx/gl/GLContextSymbols.h index f15b0b1fd9..5e1adfca31 100644 --- a/gfx/gl/GLContextSymbols.h +++ b/gfx/gl/GLContextSymbols.h @@ -672,7 +672,7 @@ struct GLContextSymbols pfnGLGetStringiT fGetStringi; }; -} -} +} // namespace gl +} // namespace mozilla #endif /* GLCONTEXTSYMBOLS_H_ */ diff --git a/gfx/gl/GLReadTexImageHelper.cpp b/gfx/gl/GLReadTexImageHelper.cpp index 31fe011a65..6ba1a1238b 100644 --- a/gfx/gl/GLReadTexImageHelper.cpp +++ b/gfx/gl/GLReadTexImageHelper.cpp @@ -760,5 +760,5 @@ GLReadTexImageHelper::ReadTexImage(GLuint aTextureId, #undef CLEANUP_IF_GLERROR_OCCURRED -} -} +} // namespace gl +} // namespace mozilla diff --git a/gfx/gl/GLReadTexImageHelper.h b/gfx/gl/GLReadTexImageHelper.h index 12f8fe7cba..821c003a96 100644 --- a/gfx/gl/GLReadTexImageHelper.h +++ b/gfx/gl/GLReadTexImageHelper.h @@ -18,7 +18,7 @@ namespace mozilla { namespace gfx { class DataSourceSurface; -} +} // namespace gfx namespace gl { @@ -73,7 +73,7 @@ public: }; -} -} +} // namespace gl +} // namespace mozilla #endif diff --git a/gfx/gl/GLScreenBuffer.h b/gfx/gl/GLScreenBuffer.h index 89c6eae2c3..b66d976226 100644 --- a/gfx/gl/GLScreenBuffer.h +++ b/gfx/gl/GLScreenBuffer.h @@ -281,7 +281,7 @@ public: bool IsReadFramebufferDefault() const; }; -} // namespace gl -} // namespace mozilla +} // namespace gl +} // namespace mozilla #endif // SCREEN_BUFFER_H_ diff --git a/gfx/gl/GLTextureImage.cpp b/gfx/gl/GLTextureImage.cpp index 740f4d492b..0ff68646c6 100644 --- a/gfx/gl/GLTextureImage.cpp +++ b/gfx/gl/GLTextureImage.cpp @@ -744,5 +744,5 @@ CreateBasicTextureImage(GLContext* aGL, return texImage.forget(); } -} // namespace -} // namespace +} // namespace gl +} // namespace mozilla diff --git a/gfx/gl/GLTextureImage.h b/gfx/gl/GLTextureImage.h index 5458b2c4ad..79eb4d5084 100644 --- a/gfx/gl/GLTextureImage.h +++ b/gfx/gl/GLTextureImage.h @@ -21,8 +21,8 @@ namespace mozilla { namespace gfx { class DataSourceSurface; class DrawTarget; -} -} +} // namespace gfx +} // namespace mozilla namespace mozilla { namespace gl { diff --git a/gfx/gl/GLUploadHelpers.cpp b/gfx/gl/GLUploadHelpers.cpp index 8b1a3fcea0..e3e78dfb08 100644 --- a/gfx/gl/GLUploadHelpers.cpp +++ b/gfx/gl/GLUploadHelpers.cpp @@ -582,5 +582,5 @@ CanUploadNonPowerOfTwo(GLContext* gl) gl->Renderer() != GLRenderer::Adreno205; } -} -} +} // namespace gl +} // namespace mozilla diff --git a/gfx/gl/GLUploadHelpers.h b/gfx/gl/GLUploadHelpers.h index 239e743d05..1e7f8f6149 100644 --- a/gfx/gl/GLUploadHelpers.h +++ b/gfx/gl/GLUploadHelpers.h @@ -16,7 +16,7 @@ namespace mozilla { namespace gfx { class DataSourceSurface; -} +} // namespace gfx namespace gl { @@ -82,7 +82,7 @@ UploadSurfaceToTexture(GLContext* gl, bool CanUploadSubTextures(GLContext* gl); bool CanUploadNonPowerOfTwo(GLContext* gl); -} -} +} // namespace gl +} // namespace mozilla #endif diff --git a/gfx/gl/GfxTexturesReporter.h b/gfx/gl/GfxTexturesReporter.h index 1e1f0bc243..89f9c4d151 100644 --- a/gfx/gl/GfxTexturesReporter.h +++ b/gfx/gl/GfxTexturesReporter.h @@ -89,7 +89,7 @@ private: int32_t mBytes; }; -} -} +} // namespace gl +} // namespace mozilla #endif // GFXTEXTURESREPORTER_H_ diff --git a/gfx/gl/HeapCopyOfStackArray.h b/gfx/gl/HeapCopyOfStackArray.h index e6dbb2a1fe..df4c050ed4 100644 --- a/gfx/gl/HeapCopyOfStackArray.h +++ b/gfx/gl/HeapCopyOfStackArray.h @@ -42,6 +42,6 @@ private: ScopedDeletePtr const mArrayData; }; -} +} // namespace mozilla #endif // HEAPCOPYOFSTACKARRAY_H_ \ No newline at end of file diff --git a/gfx/gl/SharedSurface.cpp b/gfx/gl/SharedSurface.cpp index d3e9e7cb6e..bd8783dd1a 100644 --- a/gfx/gl/SharedSurface.cpp +++ b/gfx/gl/SharedSurface.cpp @@ -573,5 +573,6 @@ ReadPixel(SharedSurface* src) return pixel; } -} /* namespace gfx */ +} // namespace gl + } /* namespace mozilla */ diff --git a/gfx/gl/SharedSurfaceEGL.cpp b/gfx/gl/SharedSurfaceEGL.cpp index 8241f8554f..3c46244070 100644 --- a/gfx/gl/SharedSurfaceEGL.cpp +++ b/gfx/gl/SharedSurfaceEGL.cpp @@ -233,5 +233,6 @@ SurfaceFactory_EGLImage::Create(GLContext* prodGL, return Move(ret); } -} /* namespace gfx */ +} // namespace gl + } /* namespace mozilla */ diff --git a/gfx/gl/SharedSurfaceEGL.h b/gfx/gl/SharedSurfaceEGL.h index a27d3b669b..4fe119e66a 100644 --- a/gfx/gl/SharedSurfaceEGL.h +++ b/gfx/gl/SharedSurfaceEGL.h @@ -106,7 +106,8 @@ public: } }; -} /* namespace gfx */ +} // namespace gl + } /* namespace mozilla */ #endif /* SHARED_SURFACE_EGL_H_ */ diff --git a/gfx/gl/SharedSurfaceGL.cpp b/gfx/gl/SharedSurfaceGL.cpp index ab170b2509..d45eee7b25 100644 --- a/gfx/gl/SharedSurfaceGL.cpp +++ b/gfx/gl/SharedSurfaceGL.cpp @@ -242,5 +242,6 @@ SharedSurface_GLTexture::ConsTexture(GLContext* consGL) return mTex; } -} /* namespace gfx */ +} // namespace gl + } /* namespace mozilla */ diff --git a/gfx/gl/SharedSurfaceGL.h b/gfx/gl/SharedSurfaceGL.h index 28e831bf01..c6197c32ab 100644 --- a/gfx/gl/SharedSurfaceGL.h +++ b/gfx/gl/SharedSurfaceGL.h @@ -19,11 +19,11 @@ namespace mozilla { namespace gl { class GLContext; - } + } // namespace gl namespace gfx { class DataSourceSurface; - } -} + } // namespace gfx +} // namespace mozilla namespace mozilla { namespace gl { @@ -176,7 +176,8 @@ public: } }; -} /* namespace gfx */ +} // namespace gl + } /* namespace mozilla */ #endif /* SHARED_SURFACE_GL_H_ */ diff --git a/gfx/gl/SharedSurfaceIO.cpp b/gfx/gl/SharedSurfaceIO.cpp index de4de735c5..16e66e78e8 100644 --- a/gfx/gl/SharedSurfaceIO.cpp +++ b/gfx/gl/SharedSurfaceIO.cpp @@ -155,5 +155,5 @@ SurfaceFactory_IOSurface::CreateShared(const gfx::IntSize& size) return SharedSurface_IOSurface::Create(ioSurf, mGL, hasAlpha); } -} -} +} // namespace gl +} // namespace mozilla diff --git a/gfx/gl/SharedSurfaceIO.h b/gfx/gl/SharedSurfaceIO.h index 1ce485cbe5..bb0d6ef300 100644 --- a/gfx/gl/SharedSurfaceIO.h +++ b/gfx/gl/SharedSurfaceIO.h @@ -83,7 +83,8 @@ protected: virtual UniquePtr CreateShared(const gfx::IntSize& size) override; }; -} /* namespace gfx */ +} // namespace gl + } /* namespace mozilla */ #endif /* SHARED_SURFACEIO_H_ */ diff --git a/gfx/gl/SkiaGLGlue.h b/gfx/gl/SkiaGLGlue.h index 290bf12e67..7278886df5 100755 --- a/gfx/gl/SkiaGLGlue.h +++ b/gfx/gl/SkiaGLGlue.h @@ -41,8 +41,8 @@ private: mozilla::gfx::RefPtrSkia mGrContext; }; -} -} +} // namespace gl +} // namespace mozilla #else diff --git a/gfx/gl/SurfaceTypes.h b/gfx/gl/SurfaceTypes.h index a9fad20950..3ca42fd7a4 100644 --- a/gfx/gl/SurfaceTypes.h +++ b/gfx/gl/SurfaceTypes.h @@ -13,7 +13,7 @@ namespace mozilla { namespace layers { class ISurfaceAllocator; -} +} // namespace layers namespace gl { @@ -90,7 +90,8 @@ enum class AttachmentType : uint8_t { Max }; -} /* namespace gfx */ +} // namespace gl + } /* namespace mozilla */ #endif /* SURFACE_TYPES_H_ */ diff --git a/gfx/gl/TextureGarbageBin.h b/gfx/gl/TextureGarbageBin.h index 8419fe8b86..9218c4f265 100644 --- a/gfx/gl/TextureGarbageBin.h +++ b/gfx/gl/TextureGarbageBin.h @@ -41,7 +41,7 @@ public: void EmptyGarbage(); }; -} -} +} // namespace gl +} // namespace mozilla #endif // TEXTUREGARBAGEBIN_H_ diff --git a/gfx/gl/TextureImageCGL.h b/gfx/gl/TextureImageCGL.h index 3f3e4908e1..bc73e74a61 100644 --- a/gfx/gl/TextureImageCGL.h +++ b/gfx/gl/TextureImageCGL.h @@ -56,7 +56,7 @@ TileGenFuncCGL(GLContext *gl, TextureImage::Flags aFlags, TextureImage::ImageFormat aImageFormat); -} -} +} // namespace gl +} // namespace mozilla #endif diff --git a/gfx/gl/TextureImageCGL.mm b/gfx/gl/TextureImageCGL.mm index f957f43c14..26cca881a6 100644 --- a/gfx/gl/TextureImageCGL.mm +++ b/gfx/gl/TextureImageCGL.mm @@ -107,5 +107,5 @@ TileGenFuncCGL(GLContext *gl, return teximage.forget(); } -} -} +} // namespace gl +} // namespace mozilla diff --git a/gfx/gl/TextureImageEGL.cpp b/gfx/gl/TextureImageEGL.cpp index fa18f67de2..5f7ee068cd 100644 --- a/gfx/gl/TextureImageEGL.cpp +++ b/gfx/gl/TextureImageEGL.cpp @@ -343,5 +343,5 @@ TileGenFuncEGL(GLContext *gl, return teximage.forget(); } -} -} +} // namespace gl +} // namespace mozilla diff --git a/gfx/gl/TextureImageEGL.h b/gfx/gl/TextureImageEGL.h index 747d593d3c..74552082bf 100644 --- a/gfx/gl/TextureImageEGL.h +++ b/gfx/gl/TextureImageEGL.h @@ -92,7 +92,7 @@ TileGenFuncEGL(GLContext *gl, TextureImage::Flags aFlags, TextureImage::ImageFormat aImageFormat); -} -} +} // namespace gl +} // namespace mozilla #endif // TEXTUREIMAGEEGL_H_ diff --git a/gfx/ipc/SharedDIB.cpp b/gfx/ipc/SharedDIB.cpp index 26655288be..ec68a61fa2 100644 --- a/gfx/ipc/SharedDIB.cpp +++ b/gfx/ipc/SharedDIB.cpp @@ -73,5 +73,5 @@ SharedDIB::ShareToProcess(base::ProcessId aTargetPid, Handle *aNewHandle) return NS_OK; } -} // gfx -} // mozilla +} // namespace gfx +} // namespace mozilla diff --git a/gfx/ipc/SharedDIB.h b/gfx/ipc/SharedDIB.h index 74e6048384..b6df420760 100644 --- a/gfx/ipc/SharedDIB.h +++ b/gfx/ipc/SharedDIB.h @@ -42,7 +42,7 @@ protected: base::SharedMemory *mShMem; }; -} // gfx -} // mozilla +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/layers/AxisPhysicsMSDModel.cpp b/gfx/layers/AxisPhysicsMSDModel.cpp index 486122295f..f200ad4884 100644 --- a/gfx/layers/AxisPhysicsMSDModel.cpp +++ b/gfx/layers/AxisPhysicsMSDModel.cpp @@ -96,5 +96,5 @@ AxisPhysicsMSDModel::IsFinished() && fabs(GetVelocity()) <= kFinishVelocity; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/AxisPhysicsMSDModel.h b/gfx/layers/AxisPhysicsMSDModel.h index 5935465184..42cc64f2bb 100644 --- a/gfx/layers/AxisPhysicsMSDModel.h +++ b/gfx/layers/AxisPhysicsMSDModel.h @@ -80,7 +80,7 @@ private: }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/AxisPhysicsModel.cpp b/gfx/layers/AxisPhysicsModel.cpp index b34ed8ff1e..3ae686d16d 100644 --- a/gfx/layers/AxisPhysicsModel.cpp +++ b/gfx/layers/AxisPhysicsModel.cpp @@ -117,5 +117,5 @@ AxisPhysicsModel::LinearInterpolate(double aV1, double aV2, double aBlend) return aV1 * (1.0 - aBlend) + aV2 * aBlend; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/AxisPhysicsModel.h b/gfx/layers/AxisPhysicsModel.h index 5a052b7f18..b1cf59b458 100644 --- a/gfx/layers/AxisPhysicsModel.h +++ b/gfx/layers/AxisPhysicsModel.h @@ -125,7 +125,7 @@ private: }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/Compositor.cpp b/gfx/layers/Compositor.cpp index 0257d9d67d..bc911e58b5 100644 --- a/gfx/layers/Compositor.cpp +++ b/gfx/layers/Compositor.cpp @@ -14,7 +14,7 @@ namespace mozilla { namespace gfx { class Matrix4x4; -} +} // namespace gfx namespace layers { diff --git a/gfx/layers/Compositor.h b/gfx/layers/Compositor.h index 6b207ecf92..30c7a9f0b7 100644 --- a/gfx/layers/Compositor.h +++ b/gfx/layers/Compositor.h @@ -114,7 +114,7 @@ namespace gfx { class Matrix; class Matrix4x4; class DrawTarget; -} +} // namespace gfx namespace layers { diff --git a/gfx/layers/CopyableCanvasLayer.cpp b/gfx/layers/CopyableCanvasLayer.cpp index 4df37a8501..c776e6fbc0 100644 --- a/gfx/layers/CopyableCanvasLayer.cpp +++ b/gfx/layers/CopyableCanvasLayer.cpp @@ -193,5 +193,5 @@ CopyableCanvasLayer::DiscardTempSurface() mCachedTempSurface = nullptr; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/CopyableCanvasLayer.h b/gfx/layers/CopyableCanvasLayer.h index 6ed1510af9..340f7b3c4a 100644 --- a/gfx/layers/CopyableCanvasLayer.h +++ b/gfx/layers/CopyableCanvasLayer.h @@ -65,7 +65,7 @@ protected: void DiscardTempSurface(); }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/D3D11ShareHandleImage.cpp b/gfx/layers/D3D11ShareHandleImage.cpp index bfc342acc1..f6eab1e458 100644 --- a/gfx/layers/D3D11ShareHandleImage.cpp +++ b/gfx/layers/D3D11ShareHandleImage.cpp @@ -140,5 +140,5 @@ D3D11ShareHandleImage::GetTexture() const { return mTexture; } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/D3D9SurfaceImage.cpp b/gfx/layers/D3D9SurfaceImage.cpp index faf74def3d..78ac432d81 100644 --- a/gfx/layers/D3D9SurfaceImage.cpp +++ b/gfx/layers/D3D9SurfaceImage.cpp @@ -272,5 +272,5 @@ D3D9SurfaceImage::GetAsSourceSurface() return surface.forget(); } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/DirectedGraph.h b/gfx/layers/DirectedGraph.h index 8c6d9cc1d8..272e16c1fa 100644 --- a/gfx/layers/DirectedGraph.h +++ b/gfx/layers/DirectedGraph.h @@ -110,7 +110,7 @@ private: nsTArray mEdges; }; -} -} +} // namespace layers +} // namespace mozilla #endif // GFX_DIRECTEDGRAPH_H diff --git a/gfx/layers/FrameMetrics.h b/gfx/layers/FrameMetrics.h index adbdd8905b..7dc57cbcba 100644 --- a/gfx/layers/FrameMetrics.h +++ b/gfx/layers/FrameMetrics.h @@ -801,7 +801,7 @@ struct ZoomConstraints { } }; -} -} +} // namespace layers +} // namespace mozilla #endif /* GFX_FRAMEMETRICS_H */ diff --git a/gfx/layers/GLImages.cpp b/gfx/layers/GLImages.cpp index e286b9e898..7f707f1a1c 100644 --- a/gfx/layers/GLImages.cpp +++ b/gfx/layers/GLImages.cpp @@ -76,5 +76,5 @@ GLImage::GetAsSourceSurface() return source.forget(); } -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/GLImages.h b/gfx/layers/GLImages.h index c47d0f1322..2e887b8c1b 100644 --- a/gfx/layers/GLImages.h +++ b/gfx/layers/GLImages.h @@ -16,7 +16,7 @@ namespace mozilla { namespace gl { class AndroidSurfaceTexture; -} +} // namespace gl namespace layers { class GLImage : public Image { @@ -78,7 +78,7 @@ private: #endif // MOZ_WIDGET_ANDROID -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif // GFX_GLIMAGES_H diff --git a/gfx/layers/GrallocImages.h b/gfx/layers/GrallocImages.h index 14b52e8d8c..121015e0a9 100644 --- a/gfx/layers/GrallocImages.h +++ b/gfx/layers/GrallocImages.h @@ -129,6 +129,7 @@ private: } // namespace layers } // namespace mozilla + #endif #endif /* GRALLOCIMAGES_H */ diff --git a/gfx/layers/IMFYCbCrImage.cpp b/gfx/layers/IMFYCbCrImage.cpp index 862271cf2a..a2a35de22c 100644 --- a/gfx/layers/IMFYCbCrImage.cpp +++ b/gfx/layers/IMFYCbCrImage.cpp @@ -288,6 +288,5 @@ IMFYCbCrImage::GetTextureClient(CompositableClient* aClient) return mTextureClient; } - -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index 8713bd654e..a6a1cd1fbe 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -570,5 +570,5 @@ CairoImage::GetTextureClient(CompositableClient *aClient) return textureClient; } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ImageDataSerializer.cpp b/gfx/layers/ImageDataSerializer.cpp index 3d47a6e086..9e67cdde5c 100644 --- a/gfx/layers/ImageDataSerializer.cpp +++ b/gfx/layers/ImageDataSerializer.cpp @@ -44,7 +44,7 @@ struct SurfaceBufferInfo return GetAlignedStride<16>(sizeof(SurfaceBufferInfo)); } }; -} // anonymous namespace +} // namespace static SurfaceBufferInfo* GetBufferInfo(uint8_t* aData, size_t aDataSize) diff --git a/gfx/layers/ImageLayers.cpp b/gfx/layers/ImageLayers.cpp index 5dda9610db..8214916bbe 100644 --- a/gfx/layers/ImageLayers.cpp +++ b/gfx/layers/ImageLayers.cpp @@ -60,5 +60,5 @@ void ImageLayer::ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSu ComputeEffectiveTransformForMaskLayer(aTransformToSurface); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ImageLayers.h b/gfx/layers/ImageLayers.h index 8007f8eba5..1fb471ff81 100644 --- a/gfx/layers/ImageLayers.h +++ b/gfx/layers/ImageLayers.h @@ -21,7 +21,7 @@ class ImageContainer; namespace layerscope { class LayersPacket; -} +} // namespace layerscope /** * A Layer which renders an Image. @@ -102,7 +102,7 @@ protected: gfx::Matrix4x4 mEffectiveTransformForBuffer; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* GFX_IMAGELAYER_H */ diff --git a/gfx/layers/ImageTypes.h b/gfx/layers/ImageTypes.h index 0d789e1dc8..4509fd14af 100644 --- a/gfx/layers/ImageTypes.h +++ b/gfx/layers/ImageTypes.h @@ -97,6 +97,6 @@ enum class StereoMode { TOP_BOTTOM }; -} // namespace +} // namespace mozilla #endif diff --git a/gfx/layers/LayerMetricsWrapper.h b/gfx/layers/LayerMetricsWrapper.h index ba7e3b474f..fa2f12ee06 100644 --- a/gfx/layers/LayerMetricsWrapper.h +++ b/gfx/layers/LayerMetricsWrapper.h @@ -417,7 +417,7 @@ private: uint32_t mIndex; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* GFX_LAYERMETRICSWRAPPER_H */ diff --git a/gfx/layers/LayerScope.cpp b/gfx/layers/LayerScope.cpp index d18c28c24a..f3a794cada 100644 --- a/gfx/layers/LayerScope.cpp +++ b/gfx/layers/LayerScope.cpp @@ -1376,5 +1376,5 @@ LayerScopeAutoFrame::EndFrame() WebSocketHelper::GetSocketManager()->DispatchDebugData(); } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/LayerScope.h b/gfx/layers/LayerScope.h index f023b4dc6b..9a871371e9 100644 --- a/gfx/layers/LayerScope.h +++ b/gfx/layers/LayerScope.h @@ -52,7 +52,7 @@ private: static void EndFrame(); }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla #endif /* GFX_LAYERSCOPE_H */ diff --git a/gfx/layers/LayerSorter.cpp b/gfx/layers/LayerSorter.cpp index e2841ca63b..c6e3d97009 100644 --- a/gfx/layers/LayerSorter.cpp +++ b/gfx/layers/LayerSorter.cpp @@ -353,5 +353,5 @@ void SortLayersBy3DZOrder(nsTArray& aLayers) aLayers.AppendElements(sortedList); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/LayerSorter.h b/gfx/layers/LayerSorter.h index 2f0ff5f5d9..b9f776e835 100644 --- a/gfx/layers/LayerSorter.h +++ b/gfx/layers/LayerSorter.h @@ -15,6 +15,7 @@ class Layer; void SortLayersBy3DZOrder(nsTArray& aLayers); -} -} +} // namespace layers +} // namespace mozilla + #endif /* GFX_LAYERSORTER_H */ diff --git a/gfx/layers/Layers.h b/gfx/layers/Layers.h index 2b4366fa56..486324176b 100644 --- a/gfx/layers/Layers.h +++ b/gfx/layers/Layers.h @@ -101,7 +101,7 @@ struct EffectMask; namespace layerscope { class LayersPacket; -} +} // namespace layerscope #define MOZ_LAYER_DECL_NAME(n, e) \ virtual const char* Name() const override { return n; } \ diff --git a/gfx/layers/LayersLogging.cpp b/gfx/layers/LayersLogging.cpp index 40aa8940aa..1cfa8250ba 100644 --- a/gfx/layers/LayersLogging.cpp +++ b/gfx/layers/LayersLogging.cpp @@ -327,8 +327,8 @@ AppendToString(std::stringstream& aStream, mozilla::gfx::SurfaceFormat format, aStream << sfx; } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla void print_stderr(std::stringstream& aStr) diff --git a/gfx/layers/LayersLogging.h b/gfx/layers/LayersLogging.h index a25aa70878..c030090c7e 100644 --- a/gfx/layers/LayersLogging.h +++ b/gfx/layers/LayersLogging.h @@ -25,7 +25,7 @@ namespace mozilla { namespace gfx { class Matrix4x4; template struct RectTyped; -} +} // namespace gfx namespace layers { @@ -207,8 +207,8 @@ Stringify(const T& obj) return ss.str(); } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla // versions of printf_stderr and fprintf_stderr that deal with line // truncation on android by printing individual lines out of the diff --git a/gfx/layers/LayersTypes.h b/gfx/layers/LayersTypes.h index 8b6af63cac..e60a80fa2b 100644 --- a/gfx/layers/LayersTypes.h +++ b/gfx/layers/LayersTypes.h @@ -262,7 +262,7 @@ operator|=(EventRegionsOverride& a, EventRegionsOverride b) return a; } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif /* GFX_LAYERSTYPES_H */ diff --git a/gfx/layers/MacIOSurfaceImage.h b/gfx/layers/MacIOSurfaceImage.h index 53569ba936..31d33a2c18 100644 --- a/gfx/layers/MacIOSurfaceImage.h +++ b/gfx/layers/MacIOSurfaceImage.h @@ -35,7 +35,7 @@ private: RefPtr mTextureClient; }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif // GFX_SHAREDTEXTUREIMAGE_H diff --git a/gfx/layers/ReadbackLayer.h b/gfx/layers/ReadbackLayer.h index 3e72ce941c..6253eaa51c 100644 --- a/gfx/layers/ReadbackLayer.h +++ b/gfx/layers/ReadbackLayer.h @@ -28,7 +28,7 @@ class ReadbackProcessor; namespace layerscope { class LayersPacket; -} +} // namespace layerscope /** * A ReadbackSink receives a stream of updates to a rectangle of pixels. @@ -200,6 +200,7 @@ protected: gfxRGBA mBackgroundColor; }; -} -} +} // namespace layers +} // namespace mozilla + #endif /* GFX_READBACKLAYER_H */ diff --git a/gfx/layers/ReadbackProcessor.cpp b/gfx/layers/ReadbackProcessor.cpp index b478ffb2c3..22d0e328d1 100644 --- a/gfx/layers/ReadbackProcessor.cpp +++ b/gfx/layers/ReadbackProcessor.cpp @@ -181,5 +181,5 @@ ReadbackProcessor::~ReadbackProcessor() } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ReadbackProcessor.h b/gfx/layers/ReadbackProcessor.h index dbd404db6d..5ffed13fa8 100644 --- a/gfx/layers/ReadbackProcessor.h +++ b/gfx/layers/ReadbackProcessor.h @@ -75,6 +75,7 @@ protected: nsTArray mAllUpdates; }; -} -} +} // namespace layers +} // namespace mozilla + #endif /* GFX_READBACKPROCESSOR_H */ diff --git a/gfx/layers/RenderTrace.h b/gfx/layers/RenderTrace.h index 01d1b21328..fd9522a57d 100644 --- a/gfx/layers/RenderTrace.h +++ b/gfx/layers/RenderTrace.h @@ -69,7 +69,7 @@ inline void renderTraceEventEnd(const char *aColor) #endif // MOZ_RENDERTRACE -} -} +} // namespace layers +} // namespace mozilla #endif //GFX_RENDERTRACE_H diff --git a/gfx/layers/RotatedBuffer.cpp b/gfx/layers/RotatedBuffer.cpp index 5bfb835914..32ce3143f9 100644 --- a/gfx/layers/RotatedBuffer.cpp +++ b/gfx/layers/RotatedBuffer.cpp @@ -791,6 +791,6 @@ RotatedContentBuffer::GetSourceSurface(ContextSource aSource) const } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/RotatedBuffer.h b/gfx/layers/RotatedBuffer.h index dbffc949b1..7f602e28fc 100644 --- a/gfx/layers/RotatedBuffer.h +++ b/gfx/layers/RotatedBuffer.h @@ -26,7 +26,7 @@ struct nsIntSize; namespace mozilla { namespace gfx { class Matrix; -} +} // namespace gfx namespace layers { @@ -429,7 +429,7 @@ protected: BufferSizePolicy mBufferSizePolicy; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* ROTATEDBUFFER_H_ */ diff --git a/gfx/layers/TiledLayerBuffer.h b/gfx/layers/TiledLayerBuffer.h index d1706cd414..0c3ce03915 100644 --- a/gfx/layers/TiledLayerBuffer.h +++ b/gfx/layers/TiledLayerBuffer.h @@ -573,7 +573,7 @@ TiledLayerBuffer::Update(const nsIntRegion& newValidRegion, mPaintedRegion.Or(mPaintedRegion, aPaintRegion); } -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif // GFX_TILEDLAYERBUFFER_H diff --git a/gfx/layers/TransactionIdAllocator.h b/gfx/layers/TransactionIdAllocator.h index 266775ce21..25e4d924d9 100644 --- a/gfx/layers/TransactionIdAllocator.h +++ b/gfx/layers/TransactionIdAllocator.h @@ -52,8 +52,8 @@ public: virtual mozilla::TimeStamp GetTransactionStart() = 0; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* GFX_TRANSACTION_ID_ALLOCATOR_H */ diff --git a/gfx/layers/YCbCrImageDataSerializer.cpp b/gfx/layers/YCbCrImageDataSerializer.cpp index 2c6bcb6e13..e0653e71e8 100644 --- a/gfx/layers/YCbCrImageDataSerializer.cpp +++ b/gfx/layers/YCbCrImageDataSerializer.cpp @@ -310,5 +310,5 @@ YCbCrImageDataDeserializer::ToDataSourceSurface() } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/YCbCrImageDataSerializer.h b/gfx/layers/YCbCrImageDataSerializer.h index 0fd7b507eb..ec55a85c5d 100644 --- a/gfx/layers/YCbCrImageDataSerializer.h +++ b/gfx/layers/YCbCrImageDataSerializer.h @@ -16,7 +16,7 @@ namespace mozilla { namespace gfx { class DataSourceSurface; -} +} // namespace gfx namespace layers { @@ -180,7 +180,7 @@ public: already_AddRefed ToDataSourceSurface(); }; -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/apz/public/GeckoContentController.h b/gfx/layers/apz/public/GeckoContentController.h index 546ce92a90..c70377cc4e 100644 --- a/gfx/layers/apz/public/GeckoContentController.h +++ b/gfx/layers/apz/public/GeckoContentController.h @@ -173,7 +173,7 @@ protected: virtual ~GeckoContentController() {} }; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_GeckoContentController_h diff --git a/gfx/layers/apz/src/APZCTreeManager.cpp b/gfx/layers/apz/src/APZCTreeManager.cpp index a337628743..8542cec1f6 100644 --- a/gfx/layers/apz/src/APZCTreeManager.cpp +++ b/gfx/layers/apz/src/APZCTreeManager.cpp @@ -1599,5 +1599,5 @@ APZCTreeManager::RootAPZCForLayersId(AsyncPanZoomController* aApzc) const return apzc.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/src/APZCTreeManager.h b/gfx/layers/apz/src/APZCTreeManager.h index 19be754813..88cf5be7bc 100644 --- a/gfx/layers/apz/src/APZCTreeManager.h +++ b/gfx/layers/apz/src/APZCTreeManager.h @@ -526,7 +526,7 @@ private: static float sDPI; }; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_PanZoomController_h diff --git a/gfx/layers/apz/src/APZUtils.h b/gfx/layers/apz/src/APZUtils.h index 5d5c98fec5..6a18ff4bc4 100644 --- a/gfx/layers/apz/src/APZUtils.h +++ b/gfx/layers/apz/src/APZUtils.h @@ -36,7 +36,7 @@ enum class ScrollSource { typedef uint32_t TouchBehaviorFlags; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_APZUtils_h diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index a2eff2b005..d5b7c0da40 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -3133,5 +3133,5 @@ void AsyncPanZoomController::ShareCompositorFrameMetrics() { } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/src/AsyncPanZoomController.h b/gfx/layers/apz/src/AsyncPanZoomController.h index 0472949880..812cd8caa9 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.h +++ b/gfx/layers/apz/src/AsyncPanZoomController.h @@ -34,7 +34,7 @@ namespace ipc { class SharedMemoryBasic; -} +} // namespace ipc namespace layers { @@ -1104,7 +1104,7 @@ protected: Vector mDeferredTasks; }; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_PanZoomController_h diff --git a/gfx/layers/apz/src/Axis.cpp b/gfx/layers/apz/src/Axis.cpp index 7b57fbcc4d..d2120f8500 100644 --- a/gfx/layers/apz/src/Axis.cpp +++ b/gfx/layers/apz/src/Axis.cpp @@ -573,5 +573,5 @@ const char* AxisY::Name() const return "Y"; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/src/Axis.h b/gfx/layers/apz/src/Axis.h index 1753ef54b5..1a92b51239 100644 --- a/gfx/layers/apz/src/Axis.h +++ b/gfx/layers/apz/src/Axis.h @@ -294,7 +294,7 @@ public: virtual const char* Name() const override; }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/apz/src/GestureEventListener.cpp b/gfx/layers/apz/src/GestureEventListener.cpp index 76a8b5d8ec..628e7fd1e6 100644 --- a/gfx/layers/apz/src/GestureEventListener.cpp +++ b/gfx/layers/apz/src/GestureEventListener.cpp @@ -506,5 +506,5 @@ void GestureEventListener::CreateMaxTapTimeoutTask() MAX_TAP_TIME); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/src/GestureEventListener.h b/gfx/layers/apz/src/GestureEventListener.h index 751177cee9..516702432a 100644 --- a/gfx/layers/apz/src/GestureEventListener.h +++ b/gfx/layers/apz/src/GestureEventListener.h @@ -225,7 +225,7 @@ private: }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/apz/src/HitTestingTreeNode.h b/gfx/layers/apz/src/HitTestingTreeNode.h index d065742c60..d4499113a5 100644 --- a/gfx/layers/apz/src/HitTestingTreeNode.h +++ b/gfx/layers/apz/src/HitTestingTreeNode.h @@ -131,7 +131,7 @@ private: EventRegionsOverride mOverride; }; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_HitTestingTreeNode_h diff --git a/gfx/layers/apz/src/InputQueue.h b/gfx/layers/apz/src/InputQueue.h index 7952d2f109..2fc5734598 100644 --- a/gfx/layers/apz/src/InputQueue.h +++ b/gfx/layers/apz/src/InputQueue.h @@ -140,7 +140,7 @@ private: nsTArray> mInputBlockQueue; }; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_InputQueue_h diff --git a/gfx/layers/apz/src/OverscrollHandoffState.h b/gfx/layers/apz/src/OverscrollHandoffState.h index 75e51d7e53..5835045b4d 100644 --- a/gfx/layers/apz/src/OverscrollHandoffState.h +++ b/gfx/layers/apz/src/OverscrollHandoffState.h @@ -155,7 +155,7 @@ struct OverscrollHandoffState { // Don't pollute other files with this macro for now. #undef NS_INLINE_DECL_THREADSAFE_MUTABLE_REFCOUNTING -} -} +} // namespace layers +} // namespace mozilla #endif /* mozilla_layers_OverscrollHandoffChain_h */ diff --git a/gfx/layers/apz/src/TaskThrottler.cpp b/gfx/layers/apz/src/TaskThrottler.cpp index 4bb53892f6..59de97b754 100644 --- a/gfx/layers/apz/src/TaskThrottler.cpp +++ b/gfx/layers/apz/src/TaskThrottler.cpp @@ -74,5 +74,5 @@ TaskThrottler::TimeSinceLastRequest(const TimeStamp& aTimeStamp) return aTimeStamp - mStartTime; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/src/TaskThrottler.h b/gfx/layers/apz/src/TaskThrottler.h index 9886a6eeaa..9ad07dfd34 100644 --- a/gfx/layers/apz/src/TaskThrottler.h +++ b/gfx/layers/apz/src/TaskThrottler.h @@ -17,7 +17,7 @@ namespace tracked_objects { class Location; -} +} // namespace tracked_objects namespace mozilla { namespace layers { @@ -109,7 +109,7 @@ private: RollingMean mMean; }; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_dom_TaskThrottler_h diff --git a/gfx/layers/apz/testutil/APZTestData.cpp b/gfx/layers/apz/testutil/APZTestData.cpp index 8a449a8fde..f48cf3a9cb 100644 --- a/gfx/layers/apz/testutil/APZTestData.cpp +++ b/gfx/layers/apz/testutil/APZTestData.cpp @@ -62,5 +62,5 @@ APZTestData::ToJS(JS::MutableHandleValue aOutValue, JSContext* aContext) const return dom::ToJSValue(aContext, result, aOutValue); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/testutil/APZTestData.h b/gfx/layers/apz/testutil/APZTestData.h index e96f0b9865..1158f6f783 100644 --- a/gfx/layers/apz/testutil/APZTestData.h +++ b/gfx/layers/apz/testutil/APZTestData.h @@ -127,8 +127,8 @@ private: SequenceNumber mPaintSequenceNumber; }; -} -} +} // namespace layers +} // namespace mozilla namespace IPC { @@ -162,7 +162,7 @@ template <> struct ParamTraits : ParamTraits {}; -} +} // namespace IPC #endif /* mozilla_layers_APZTestData_h */ diff --git a/gfx/layers/apz/util/APZCCallbackHelper.cpp b/gfx/layers/apz/util/APZCCallbackHelper.cpp index 3b214850ec..3303b817ee 100644 --- a/gfx/layers/apz/util/APZCCallbackHelper.cpp +++ b/gfx/layers/apz/util/APZCCallbackHelper.cpp @@ -651,6 +651,6 @@ APZCCallbackHelper::SendSetTargetAPZCNotification(nsIWidget* aWidget, } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/util/APZCCallbackHelper.h b/gfx/layers/apz/util/APZCCallbackHelper.h index e9f4270f14..447ebad3f3 100644 --- a/gfx/layers/apz/util/APZCCallbackHelper.h +++ b/gfx/layers/apz/util/APZCCallbackHelper.h @@ -165,7 +165,7 @@ public: const nsRefPtr& aCallback); }; -} -} +} // namespace layers +} // namespace mozilla #endif /* mozilla_layers_APZCCallbackHelper_h */ diff --git a/gfx/layers/apz/util/APZEventState.cpp b/gfx/layers/apz/util/APZEventState.cpp index ca77f86d4d..a3fd8980db 100644 --- a/gfx/layers/apz/util/APZEventState.cpp +++ b/gfx/layers/apz/util/APZEventState.cpp @@ -68,7 +68,7 @@ WidgetModifiersToDOMModifiers(mozilla::Modifiers aModifiers) return result; } -} +} // namespace namespace mozilla { namespace layers { @@ -393,6 +393,6 @@ APZEventState::GetWidget() const return result.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/util/APZEventState.h b/gfx/layers/apz/util/APZEventState.h index ff3da521a4..6a3b1c2654 100644 --- a/gfx/layers/apz/util/APZEventState.h +++ b/gfx/layers/apz/util/APZEventState.h @@ -90,7 +90,7 @@ private: int mActiveAPZTransforms; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* mozilla_layers_APZEventState_h */ diff --git a/gfx/layers/apz/util/ActiveElementManager.cpp b/gfx/layers/apz/util/ActiveElementManager.cpp index 90516745b6..630d07430b 100644 --- a/gfx/layers/apz/util/ActiveElementManager.cpp +++ b/gfx/layers/apz/util/ActiveElementManager.cpp @@ -222,5 +222,5 @@ ActiveElementManager::CancelTask() } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/util/ActiveElementManager.h b/gfx/layers/apz/util/ActiveElementManager.h index 78aa39ec1a..68ccc13b4f 100644 --- a/gfx/layers/apz/util/ActiveElementManager.h +++ b/gfx/layers/apz/util/ActiveElementManager.h @@ -16,7 +16,7 @@ namespace mozilla { namespace dom { class Element; class EventTarget; -} +} // namespace dom namespace layers { @@ -92,7 +92,7 @@ private: void CancelTask(); }; -} -} +} // namespace layers +} // namespace mozilla #endif /* mozilla_layers_ActiveElementManager_h */ diff --git a/gfx/layers/apz/util/InputAPZContext.cpp b/gfx/layers/apz/util/InputAPZContext.cpp index 68aa6a46f7..820b50a896 100644 --- a/gfx/layers/apz/util/InputAPZContext.cpp +++ b/gfx/layers/apz/util/InputAPZContext.cpp @@ -54,5 +54,5 @@ InputAPZContext::WasRoutedToChildProcess() return sRoutedToChildProcess; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/apz/util/InputAPZContext.h b/gfx/layers/apz/util/InputAPZContext.h index 869066887a..ac7be962e1 100644 --- a/gfx/layers/apz/util/InputAPZContext.h +++ b/gfx/layers/apz/util/InputAPZContext.h @@ -39,7 +39,7 @@ private: bool mOldRoutedToChildProcess; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* mozilla_layers_InputAPZContext_h */ diff --git a/gfx/layers/basic/AutoMaskData.h b/gfx/layers/basic/AutoMaskData.h index be6d318582..7bf7f9b3c8 100644 --- a/gfx/layers/basic/AutoMaskData.h +++ b/gfx/layers/basic/AutoMaskData.h @@ -54,7 +54,7 @@ private: AutoMoz2DMaskData& operator=(const AutoMoz2DMaskData&) = delete; }; -} -} +} // namespace layers +} // namespace mozilla #endif // GFX_AUTOMASKDATA_H_ diff --git a/gfx/layers/basic/BasicCanvasLayer.cpp b/gfx/layers/basic/BasicCanvasLayer.cpp index 656a770b0c..080d4b79ef 100644 --- a/gfx/layers/basic/BasicCanvasLayer.cpp +++ b/gfx/layers/basic/BasicCanvasLayer.cpp @@ -69,5 +69,5 @@ BasicLayerManager::CreateCanvasLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicCanvasLayer.h b/gfx/layers/basic/BasicCanvasLayer.h index 50e405fe92..1fcc8786e2 100644 --- a/gfx/layers/basic/BasicCanvasLayer.h +++ b/gfx/layers/basic/BasicCanvasLayer.h @@ -44,7 +44,7 @@ protected: } }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/basic/BasicColorLayer.cpp b/gfx/layers/basic/BasicColorLayer.cpp index 2067375efe..62643d131d 100644 --- a/gfx/layers/basic/BasicColorLayer.cpp +++ b/gfx/layers/basic/BasicColorLayer.cpp @@ -80,5 +80,5 @@ BasicLayerManager::CreateColorLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicCompositor.cpp b/gfx/layers/basic/BasicCompositor.cpp index 7b419a79a0..868488e8f1 100644 --- a/gfx/layers/basic/BasicCompositor.cpp +++ b/gfx/layers/basic/BasicCompositor.cpp @@ -596,5 +596,5 @@ BasicCompositor::EndFrame() mRenderTarget = nullptr; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicContainerLayer.cpp b/gfx/layers/basic/BasicContainerLayer.cpp index 409bd6cb36..663e5dc7e2 100644 --- a/gfx/layers/basic/BasicContainerLayer.cpp +++ b/gfx/layers/basic/BasicContainerLayer.cpp @@ -141,5 +141,5 @@ BasicLayerManager::CreateContainerLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicContainerLayer.h b/gfx/layers/basic/BasicContainerLayer.h index 4b7fbaa1d8..d4f649daa8 100644 --- a/gfx/layers/basic/BasicContainerLayer.h +++ b/gfx/layers/basic/BasicContainerLayer.h @@ -99,7 +99,8 @@ protected: return static_cast(mManager); } }; -} -} + +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/basic/BasicImageLayer.cpp b/gfx/layers/basic/BasicImageLayer.cpp index 89027def93..12270ad251 100644 --- a/gfx/layers/basic/BasicImageLayer.cpp +++ b/gfx/layers/basic/BasicImageLayer.cpp @@ -110,5 +110,5 @@ BasicLayerManager::CreateImageLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicImages.cpp b/gfx/layers/basic/BasicImages.cpp index 05fa18694a..897c291268 100644 --- a/gfx/layers/basic/BasicImages.cpp +++ b/gfx/layers/basic/BasicImages.cpp @@ -187,5 +187,5 @@ BasicLayerManager::GetImageFactory() return mFactory.get(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicImplData.h b/gfx/layers/basic/BasicImplData.h index db342b8db0..92778bb207 100644 --- a/gfx/layers/basic/BasicImplData.h +++ b/gfx/layers/basic/BasicImplData.h @@ -131,7 +131,7 @@ protected: gfx::CompositionOp mOperator; }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/basic/BasicLayerManager.cpp b/gfx/layers/basic/BasicLayerManager.cpp index dbea682e2a..0b591d50c0 100644 --- a/gfx/layers/basic/BasicLayerManager.cpp +++ b/gfx/layers/basic/BasicLayerManager.cpp @@ -1005,5 +1005,5 @@ BasicLayerManager::CreateReadbackLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicLayers.h b/gfx/layers/basic/BasicLayers.h index 8bf6e81940..b58f14229e 100644 --- a/gfx/layers/basic/BasicLayers.h +++ b/gfx/layers/basic/BasicLayers.h @@ -198,7 +198,7 @@ protected: bool mCompositorMightResample; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* GFX_BASICLAYERS_H */ diff --git a/gfx/layers/basic/BasicLayersImpl.cpp b/gfx/layers/basic/BasicLayersImpl.cpp index 82c469859a..2449898177 100644 --- a/gfx/layers/basic/BasicLayersImpl.cpp +++ b/gfx/layers/basic/BasicLayersImpl.cpp @@ -191,5 +191,5 @@ ShouldShadow(Layer* aLayer) } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicLayersImpl.h b/gfx/layers/basic/BasicLayersImpl.h index c6f29ba034..af9799be25 100644 --- a/gfx/layers/basic/BasicLayersImpl.h +++ b/gfx/layers/basic/BasicLayersImpl.h @@ -20,7 +20,7 @@ namespace mozilla { namespace gfx { class DrawTarget; -} +} // namespace gfx namespace layers { @@ -144,7 +144,7 @@ ToData(Layer* aLayer); gfx::CompositionOp GetEffectiveOperator(Layer* aLayer); -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/basic/BasicPaintedLayer.cpp b/gfx/layers/basic/BasicPaintedLayer.cpp index ab7fa7e1b9..1ee3c6ee66 100644 --- a/gfx/layers/basic/BasicPaintedLayer.cpp +++ b/gfx/layers/basic/BasicPaintedLayer.cpp @@ -226,5 +226,5 @@ BasicLayerManager::CreatePaintedLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/BasicPaintedLayer.h b/gfx/layers/basic/BasicPaintedLayer.h index 3139e60435..932c66af9d 100644 --- a/gfx/layers/basic/BasicPaintedLayer.h +++ b/gfx/layers/basic/BasicPaintedLayer.h @@ -126,7 +126,7 @@ protected: RefPtr mContentClient; }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/basic/MacIOSurfaceTextureHostBasic.cpp b/gfx/layers/basic/MacIOSurfaceTextureHostBasic.cpp index 891d02c130..9eb7a09a9b 100644 --- a/gfx/layers/basic/MacIOSurfaceTextureHostBasic.cpp +++ b/gfx/layers/basic/MacIOSurfaceTextureHostBasic.cpp @@ -93,5 +93,5 @@ MacIOSurfaceTextureHostBasic::GetSize() const { mSurface->GetDevicePixelHeight()); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/basic/MacIOSurfaceTextureHostBasic.h b/gfx/layers/basic/MacIOSurfaceTextureHostBasic.h index f5f0292f75..9010710b81 100644 --- a/gfx/layers/basic/MacIOSurfaceTextureHostBasic.h +++ b/gfx/layers/basic/MacIOSurfaceTextureHostBasic.h @@ -86,7 +86,7 @@ protected: RefPtr mSurface; }; -} -} +} // namespace layers +} // namespace mozilla #endif // MOZILLA_GFX_MACIOSURFACETEXTUREHOSTOGL_BASIC_H diff --git a/gfx/layers/basic/TextureHostBasic.cpp b/gfx/layers/basic/TextureHostBasic.cpp index b75ad83d73..8058e43efc 100644 --- a/gfx/layers/basic/TextureHostBasic.cpp +++ b/gfx/layers/basic/TextureHostBasic.cpp @@ -30,4 +30,4 @@ CreateTextureHostBasic(const SurfaceDescriptor& aDesc, } } // namespace layers -} // namespace gfx +} // namespace mozilla diff --git a/gfx/layers/client/CanvasClient.h b/gfx/layers/client/CanvasClient.h index 364ab7e3dd..ac32f77dd5 100644 --- a/gfx/layers/client/CanvasClient.h +++ b/gfx/layers/client/CanvasClient.h @@ -146,7 +146,7 @@ public: } }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/ClientCanvasLayer.cpp b/gfx/layers/client/ClientCanvasLayer.cpp index fadfd5d230..0895c01db1 100644 --- a/gfx/layers/client/ClientCanvasLayer.cpp +++ b/gfx/layers/client/ClientCanvasLayer.cpp @@ -207,5 +207,5 @@ ClientLayerManager::CreateCanvasLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/ClientCanvasLayer.h b/gfx/layers/client/ClientCanvasLayer.h index 0001f7e1d6..984a6a856e 100644 --- a/gfx/layers/client/ClientCanvasLayer.h +++ b/gfx/layers/client/ClientCanvasLayer.h @@ -23,7 +23,7 @@ namespace mozilla { namespace gl { class SharedSurface; class SurfaceFactory; -} +} // namespace gl namespace layers { @@ -97,7 +97,8 @@ protected: friend class CanvasClient2D; friend class CanvasClientSharedSurface; }; -} -} + +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/ClientColorLayer.cpp b/gfx/layers/client/ClientColorLayer.cpp index 0a21737524..6ce9b16366 100644 --- a/gfx/layers/client/ClientColorLayer.cpp +++ b/gfx/layers/client/ClientColorLayer.cpp @@ -78,5 +78,5 @@ ClientLayerManager::CreateColorLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/ClientContainerLayer.cpp b/gfx/layers/client/ClientContainerLayer.cpp index 06bc0e31bc..4727287e53 100644 --- a/gfx/layers/client/ClientContainerLayer.cpp +++ b/gfx/layers/client/ClientContainerLayer.cpp @@ -33,5 +33,5 @@ ClientLayerManager::CreateRefLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/ClientContainerLayer.h b/gfx/layers/client/ClientContainerLayer.h index cb6cafc07b..b93fdc3038 100644 --- a/gfx/layers/client/ClientContainerLayer.h +++ b/gfx/layers/client/ClientContainerLayer.h @@ -184,7 +184,7 @@ private: } }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/ClientImageLayer.cpp b/gfx/layers/client/ClientImageLayer.cpp index a2c006cccd..5d8d085f9f 100644 --- a/gfx/layers/client/ClientImageLayer.cpp +++ b/gfx/layers/client/ClientImageLayer.cpp @@ -182,5 +182,5 @@ ClientLayerManager::CreateImageLayer() return layer.forget(); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/ClientLayerManager.h b/gfx/layers/client/ClientLayerManager.h index 3e1ae21fe0..0ca4a45752 100644 --- a/gfx/layers/client/ClientLayerManager.h +++ b/gfx/layers/client/ClientLayerManager.h @@ -409,7 +409,7 @@ CreateShadowFor(ClientLayer* aLayer, &ShadowLayerForwarder::Created ## _type ## Layer) -} -} +} // namespace layers +} // namespace mozilla #endif /* GFX_CLIENTLAYERMANAGER_H */ diff --git a/gfx/layers/client/ClientPaintedLayer.cpp b/gfx/layers/client/ClientPaintedLayer.cpp index 5870892277..7235dbceaf 100644 --- a/gfx/layers/client/ClientPaintedLayer.cpp +++ b/gfx/layers/client/ClientPaintedLayer.cpp @@ -191,5 +191,5 @@ ClientPaintedLayer::PrintInfo(std::stringstream& aStream, const char* aPrefix) } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/ClientPaintedLayer.h b/gfx/layers/client/ClientPaintedLayer.h index b8f2b74961..55c0663129 100644 --- a/gfx/layers/client/ClientPaintedLayer.h +++ b/gfx/layers/client/ClientPaintedLayer.h @@ -117,7 +117,7 @@ protected: RefPtr mContentClient; }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/ClientReadbackLayer.h b/gfx/layers/client/ClientReadbackLayer.h index a72ea49b98..5f58486cae 100644 --- a/gfx/layers/client/ClientReadbackLayer.h +++ b/gfx/layers/client/ClientReadbackLayer.h @@ -28,7 +28,7 @@ public: virtual void RenderLayer() override {} }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla #endif /* GFX_CLIENTREADBACKLAYER_H */ diff --git a/gfx/layers/client/ClientTiledPaintedLayer.cpp b/gfx/layers/client/ClientTiledPaintedLayer.cpp index 199b892da0..c55c1deaea 100644 --- a/gfx/layers/client/ClientTiledPaintedLayer.cpp +++ b/gfx/layers/client/ClientTiledPaintedLayer.cpp @@ -543,5 +543,5 @@ ClientTiledPaintedLayer::PrintInfo(std::stringstream& aStream, const char* aPref } } -} // mozilla -} // layers +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/ClientTiledPaintedLayer.h b/gfx/layers/client/ClientTiledPaintedLayer.h index f70b5d6569..fa3a49f7c3 100644 --- a/gfx/layers/client/ClientTiledPaintedLayer.h +++ b/gfx/layers/client/ClientTiledPaintedLayer.h @@ -135,7 +135,7 @@ private: BasicTiledLayerPaintData mPaintData; }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/CompositableClient.h b/gfx/layers/client/CompositableClient.h index 892c6a8768..a73cfb51ee 100644 --- a/gfx/layers/client/CompositableClient.h +++ b/gfx/layers/client/CompositableClient.h @@ -261,7 +261,7 @@ private: CompositableClient* mCompositable; }; -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/ContentClient.h b/gfx/layers/client/ContentClient.h index 9d6884036e..7a97708a7e 100644 --- a/gfx/layers/client/ContentClient.h +++ b/gfx/layers/client/ContentClient.h @@ -33,7 +33,7 @@ class gfxContext; namespace mozilla { namespace gfx { class DrawTarget; -} +} // namespace gfx namespace layers { @@ -397,7 +397,7 @@ public: } }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/ImageClient.h b/gfx/layers/client/ImageClient.h index c97aa03d59..d36d90a91d 100644 --- a/gfx/layers/client/ImageClient.h +++ b/gfx/layers/client/ImageClient.h @@ -181,7 +181,7 @@ public: }; #endif -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index 65e49d6ed4..b2dbb08724 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -944,5 +944,5 @@ SyncObject::CreateSyncObject(SyncHandle aHandle) #endif } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/TextureClient.h b/gfx/layers/client/TextureClient.h index 7660da7d97..920372906d 100644 --- a/gfx/layers/client/TextureClient.h +++ b/gfx/layers/client/TextureClient.h @@ -779,6 +779,7 @@ protected: RefPtr mData; }; -} -} +} // namespace layers +} // namespace mozilla + #endif diff --git a/gfx/layers/client/TextureClientPool.cpp b/gfx/layers/client/TextureClientPool.cpp index 16308eb0be..9a7b9e076e 100644 --- a/gfx/layers/client/TextureClientPool.cpp +++ b/gfx/layers/client/TextureClientPool.cpp @@ -267,5 +267,5 @@ TextureClientPool::Clear() } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/TextureClientPool.h b/gfx/layers/client/TextureClientPool.h index 23fcbe861c..f314d1f8b4 100644 --- a/gfx/layers/client/TextureClientPool.h +++ b/gfx/layers/client/TextureClientPool.h @@ -118,6 +118,7 @@ private: RefPtr mSurfaceAllocator; }; -} -} +} // namespace layers +} // namespace mozilla + #endif /* MOZILLA_GFX_TEXTURECLIENTPOOL_H */ diff --git a/gfx/layers/client/TextureClientRecycleAllocator.cpp b/gfx/layers/client/TextureClientRecycleAllocator.cpp index b251518a62..fc5699efa9 100644 --- a/gfx/layers/client/TextureClientRecycleAllocator.cpp +++ b/gfx/layers/client/TextureClientRecycleAllocator.cpp @@ -266,5 +266,5 @@ TextureClientRecycleAllocator::CreateOrRecycleForDrawing( aAllocFlags); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/client/TextureClientRecycleAllocator.h b/gfx/layers/client/TextureClientRecycleAllocator.h index 59e252e989..fb36c66bd9 100644 --- a/gfx/layers/client/TextureClientRecycleAllocator.h +++ b/gfx/layers/client/TextureClientRecycleAllocator.h @@ -46,6 +46,7 @@ private: RefPtr mAllocator; }; -} -} +} // namespace layers +} // namespace mozilla + #endif /* MOZILLA_GFX_TEXTURECLIENT_RECYCLE_ALLOCATOR_H */ diff --git a/gfx/layers/client/TiledContentClient.h b/gfx/layers/client/TiledContentClient.h index 52620913c8..19649f0acf 100644 --- a/gfx/layers/client/TiledContentClient.h +++ b/gfx/layers/client/TiledContentClient.h @@ -556,7 +556,7 @@ private: ClientTiledLayerBuffer mLowPrecisionTiledBuffer; }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/composite/AsyncCompositionManager.h b/gfx/layers/composite/AsyncCompositionManager.h index 92a0edb5fe..e5790c8510 100644 --- a/gfx/layers/composite/AsyncCompositionManager.h +++ b/gfx/layers/composite/AsyncCompositionManager.h @@ -231,7 +231,7 @@ private: AutoResolveRefLayers& operator=(const AutoResolveRefLayers&) = delete; }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/composite/CanvasLayerComposite.cpp b/gfx/layers/composite/CanvasLayerComposite.cpp index 05fa72df48..ace16ab673 100644 --- a/gfx/layers/composite/CanvasLayerComposite.cpp +++ b/gfx/layers/composite/CanvasLayerComposite.cpp @@ -165,5 +165,5 @@ CanvasLayerComposite::PrintInfo(std::stringstream& aStream, const char* aPrefix) } } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/CanvasLayerComposite.h b/gfx/layers/composite/CanvasLayerComposite.h index b47c30cebf..90c3008dbe 100644 --- a/gfx/layers/composite/CanvasLayerComposite.h +++ b/gfx/layers/composite/CanvasLayerComposite.h @@ -76,6 +76,7 @@ private: RefPtr mImageHost; }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla + #endif /* GFX_CanvasLayerComposite_H */ diff --git a/gfx/layers/composite/ColorLayerComposite.cpp b/gfx/layers/composite/ColorLayerComposite.cpp index 231e935518..5258cc88d0 100644 --- a/gfx/layers/composite/ColorLayerComposite.cpp +++ b/gfx/layers/composite/ColorLayerComposite.cpp @@ -59,5 +59,5 @@ ColorLayerComposite::GenEffectChain(EffectChain& aEffect) color.a)); } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/ColorLayerComposite.h b/gfx/layers/composite/ColorLayerComposite.h index f102028f79..d1ea6d6e31 100644 --- a/gfx/layers/composite/ColorLayerComposite.h +++ b/gfx/layers/composite/ColorLayerComposite.h @@ -62,6 +62,7 @@ public: virtual const char* Name() const override { return "ColorLayerComposite"; } }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla + #endif /* GFX_ColorLayerComposite_H */ diff --git a/gfx/layers/composite/CompositableHost.h b/gfx/layers/composite/CompositableHost.h index 8d620164e4..7e35fc39c9 100644 --- a/gfx/layers/composite/CompositableHost.h +++ b/gfx/layers/composite/CompositableHost.h @@ -35,7 +35,7 @@ namespace mozilla { namespace gfx { class Matrix4x4; class DataSourceSurface; -} +} // namespace gfx namespace layers { @@ -292,10 +292,10 @@ namespace CompositableMap { void Set(uint64_t aID, PCompositableParent* aParent); void Erase(uint64_t aID); void Clear(); -} // CompositableMap +} // namespace CompositableMap -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/composite/ContainerLayerComposite.cpp b/gfx/layers/composite/ContainerLayerComposite.cpp index 91ced0992f..f103e06058 100755 --- a/gfx/layers/composite/ContainerLayerComposite.cpp +++ b/gfx/layers/composite/ContainerLayerComposite.cpp @@ -651,6 +651,5 @@ RefLayerComposite::CleanupResources() mLastIntermediateSurface = nullptr; } -} /* layers */ -} /* mozilla */ - +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/ContainerLayerComposite.h b/gfx/layers/composite/ContainerLayerComposite.h index 642ed19399..b8440eadf3 100644 --- a/gfx/layers/composite/ContainerLayerComposite.h +++ b/gfx/layers/composite/ContainerLayerComposite.h @@ -181,7 +181,7 @@ public: RefPtr mLastIntermediateSurface; }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla #endif /* GFX_ContainerLayerComposite_H */ diff --git a/gfx/layers/composite/ContentHost.cpp b/gfx/layers/composite/ContentHost.cpp index a3ed579950..db892208b6 100644 --- a/gfx/layers/composite/ContentHost.cpp +++ b/gfx/layers/composite/ContentHost.cpp @@ -20,7 +20,7 @@ namespace mozilla { namespace gfx { class Matrix4x4; -} +} // namespace gfx using namespace gfx; namespace layers { diff --git a/gfx/layers/composite/ContentHost.h b/gfx/layers/composite/ContentHost.h index 49db5a1651..6cbc9c2457 100644 --- a/gfx/layers/composite/ContentHost.h +++ b/gfx/layers/composite/ContentHost.h @@ -36,7 +36,7 @@ namespace mozilla { namespace gfx { class Matrix4x4; -} +} // namespace gfx namespace layers { class Compositor; class ThebesBufferData; @@ -223,7 +223,7 @@ public: nsIntRegion* aUpdatedRegionBack); }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/composite/FPSCounter.h b/gfx/layers/composite/FPSCounter.h index 422d18eb67..4b669ffc74 100644 --- a/gfx/layers/composite/FPSCounter.h +++ b/gfx/layers/composite/FPSCounter.h @@ -112,7 +112,7 @@ private: RefPtr mFPSTextureSource; }; -} -} +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_opengl_FPSCounter_h_ diff --git a/gfx/layers/composite/ImageHost.cpp b/gfx/layers/composite/ImageHost.cpp index b806637f73..c1d3b2328d 100644 --- a/gfx/layers/composite/ImageHost.cpp +++ b/gfx/layers/composite/ImageHost.cpp @@ -19,7 +19,7 @@ class nsIntRegion; namespace mozilla { namespace gfx { class Matrix4x4; -} +} // namespace gfx using namespace gfx; diff --git a/gfx/layers/composite/ImageHost.h b/gfx/layers/composite/ImageHost.h index 1a5f378d0a..4a125104b0 100644 --- a/gfx/layers/composite/ImageHost.h +++ b/gfx/layers/composite/ImageHost.h @@ -27,7 +27,7 @@ class nsIntRegion; namespace mozilla { namespace gfx { class Matrix4x4; -} +} // namespace gfx namespace layers { class Compositor; @@ -127,7 +127,7 @@ protected: #endif -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/composite/ImageLayerComposite.cpp b/gfx/layers/composite/ImageLayerComposite.cpp index 884a83f2fc..e739f0e453 100644 --- a/gfx/layers/composite/ImageLayerComposite.cpp +++ b/gfx/layers/composite/ImageLayerComposite.cpp @@ -192,5 +192,5 @@ ImageLayerComposite::PrintInfo(std::stringstream& aStream, const char* aPrefix) } } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/ImageLayerComposite.h b/gfx/layers/composite/ImageLayerComposite.h index 1cb0499a6f..a5ffb53f57 100644 --- a/gfx/layers/composite/ImageLayerComposite.h +++ b/gfx/layers/composite/ImageLayerComposite.h @@ -78,7 +78,7 @@ private: RefPtr mImageHost; }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla #endif /* GFX_ImageLayerComposite_H */ diff --git a/gfx/layers/composite/LayerManagerComposite.cpp b/gfx/layers/composite/LayerManagerComposite.cpp index 6e89a4716b..9a9cad5287 100644 --- a/gfx/layers/composite/LayerManagerComposite.cpp +++ b/gfx/layers/composite/LayerManagerComposite.cpp @@ -1180,5 +1180,5 @@ LayerManagerComposite::PlatformSyncBeforeReplyUpdate() #endif // !defined(MOZ_HAVE_PLATFORM_SPECIFIC_LAYER_BUFFERS) -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/LayerManagerComposite.h b/gfx/layers/composite/LayerManagerComposite.h index 0a4a5c9f8d..ccb706c960 100644 --- a/gfx/layers/composite/LayerManagerComposite.h +++ b/gfx/layers/composite/LayerManagerComposite.h @@ -41,7 +41,7 @@ struct nsIntSize; namespace mozilla { namespace gfx { class DrawTarget; -} +} // namespace gfx namespace gl { class GLContext; @@ -463,7 +463,7 @@ protected: }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla #endif /* GFX_LayerManagerComposite_H */ diff --git a/gfx/layers/composite/PaintedLayerComposite.cpp b/gfx/layers/composite/PaintedLayerComposite.cpp index fb03879a37..6a09982df8 100644 --- a/gfx/layers/composite/PaintedLayerComposite.cpp +++ b/gfx/layers/composite/PaintedLayerComposite.cpp @@ -193,5 +193,5 @@ PaintedLayerComposite::PrintInfo(std::stringstream& aStream, const char* aPrefix } } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/PaintedLayerComposite.h b/gfx/layers/composite/PaintedLayerComposite.h index 564ea4e8fc..5f87f47f0c 100644 --- a/gfx/layers/composite/PaintedLayerComposite.h +++ b/gfx/layers/composite/PaintedLayerComposite.h @@ -92,6 +92,7 @@ private: RefPtr mBuffer; }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla + #endif /* GFX_PaintedLayerComposite_H */ diff --git a/gfx/layers/composite/TextRenderer.cpp b/gfx/layers/composite/TextRenderer.cpp index 99e007a82e..17cbdfd74d 100644 --- a/gfx/layers/composite/TextRenderer.cpp +++ b/gfx/layers/composite/TextRenderer.cpp @@ -165,5 +165,5 @@ TextRenderer::EnsureInitialized() png_destroy_read_struct(&png_ptr, &info_ptr, nullptr); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/TextRenderer.h b/gfx/layers/composite/TextRenderer.h index 4be093620c..f220a88927 100644 --- a/gfx/layers/composite/TextRenderer.h +++ b/gfx/layers/composite/TextRenderer.h @@ -44,7 +44,7 @@ private: gfx::DataSourceSurface::MappedSurface mMap; }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index e33d0b3cde..a9eb9ea23c 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -1003,5 +1003,5 @@ SharedSurfaceTextureHost::Unlock() //////////////////////////////////////////////////////////////////////////////// -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/TextureHost.h b/gfx/layers/composite/TextureHost.h index 7615d1bcfd..8039f0c976 100644 --- a/gfx/layers/composite/TextureHost.h +++ b/gfx/layers/composite/TextureHost.h @@ -40,7 +40,7 @@ class SharedSurface; } namespace ipc { class Shmem; -} +} // namespace ipc namespace layers { @@ -814,7 +814,7 @@ CreateBackendIndependentTextureHost(const SurfaceDescriptor& aDesc, ISurfaceAllocator* aDeallocator, TextureFlags aFlags); -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/composite/TiledContentHost.cpp b/gfx/layers/composite/TiledContentHost.cpp index af346de198..cfff0f4f93 100644 --- a/gfx/layers/composite/TiledContentHost.cpp +++ b/gfx/layers/composite/TiledContentHost.cpp @@ -662,5 +662,5 @@ TiledContentHost::Dump(std::stringstream& aStream, mTiledBuffer.Dump(aStream, aPrefix, aDumpHtml); } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/composite/TiledContentHost.h b/gfx/layers/composite/TiledContentHost.h index ee7f221bc1..7a5e452383 100644 --- a/gfx/layers/composite/TiledContentHost.h +++ b/gfx/layers/composite/TiledContentHost.h @@ -39,7 +39,7 @@ struct nsIntSize; namespace mozilla { namespace gfx { class Matrix4x4; -} +} // namespace gfx namespace layers { @@ -317,7 +317,7 @@ private: bool mPendingLowPrecisionUpload; }; -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/d3d9/Nv3DVUtils.h b/gfx/layers/d3d9/Nv3DVUtils.h index 24c482eb0e..f0e240373e 100644 --- a/gfx/layers/d3d9/Nv3DVUtils.h +++ b/gfx/layers/d3d9/Nv3DVUtils.h @@ -80,7 +80,7 @@ private: }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla #endif /* GFX_NV3DVUTILS_H */ diff --git a/gfx/layers/d3d9/ReadbackLayerD3D9.h b/gfx/layers/d3d9/ReadbackLayerD3D9.h index a8398594f2..5d3a7fd1e5 100644 --- a/gfx/layers/d3d9/ReadbackLayerD3D9.h +++ b/gfx/layers/d3d9/ReadbackLayerD3D9.h @@ -28,6 +28,7 @@ public: virtual void RenderLayer() {} }; -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla + #endif /* GFX_READBACKLAYERD3D9_H */ diff --git a/gfx/layers/ipc/CompositableForwarder.h b/gfx/layers/ipc/CompositableForwarder.h index 5fe9423046..e38894891e 100644 --- a/gfx/layers/ipc/CompositableForwarder.h +++ b/gfx/layers/ipc/CompositableForwarder.h @@ -218,7 +218,7 @@ protected: static mozilla::Atomic sSerialCounter; }; -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/ipc/CompositableTransactionParent.cpp b/gfx/layers/ipc/CompositableTransactionParent.cpp index 9a064d52fa..0b16216a1d 100644 --- a/gfx/layers/ipc/CompositableTransactionParent.cpp +++ b/gfx/layers/ipc/CompositableTransactionParent.cpp @@ -263,6 +263,6 @@ CompositableParentManager::SendPendingAsyncMessges() mPendingAsyncMessage.clear(); } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ipc/CompositableTransactionParent.h b/gfx/layers/ipc/CompositableTransactionParent.h index 7324dcc9ff..b5ddc898aa 100644 --- a/gfx/layers/ipc/CompositableTransactionParent.h +++ b/gfx/layers/ipc/CompositableTransactionParent.h @@ -65,7 +65,7 @@ protected: std::vector mPendingAsyncMessage; }; -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/ipc/CompositorBench.h b/gfx/layers/ipc/CompositorBench.h index d02c9540e3..c8e17cef41 100644 --- a/gfx/layers/ipc/CompositorBench.h +++ b/gfx/layers/ipc/CompositorBench.h @@ -23,8 +23,8 @@ void CompositorBench(Compositor* aCompositor, const gfx::Rect& aScreenRect); static inline void CompositorBench(Compositor* aCompositor, const gfx::Rect& aScreenRect) {} #endif -} -} +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/ipc/CompositorChild.h b/gfx/layers/ipc/CompositorChild.h index 09a9249ec5..670f007550 100644 --- a/gfx/layers/ipc/CompositorChild.h +++ b/gfx/layers/ipc/CompositorChild.h @@ -26,7 +26,7 @@ namespace mozilla { namespace dom { class TabChild; -} +} // namespace dom namespace layers { @@ -200,7 +200,7 @@ private: bool mCanSend; }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_CompositorChild_h diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index e7165d196e..ed378ef8f4 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -45,7 +45,7 @@ class nsIWidget; namespace mozilla { namespace gfx { class DrawTarget; -} +} // namespace gfx namespace layers { @@ -422,7 +422,7 @@ protected: DISALLOW_EVIL_CONSTRUCTORS(CompositorParent); }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_CompositorParent_h diff --git a/gfx/layers/ipc/ISurfaceAllocator.h b/gfx/layers/ipc/ISurfaceAllocator.h index cdd86e933b..4f1c30d0a6 100644 --- a/gfx/layers/ipc/ISurfaceAllocator.h +++ b/gfx/layers/ipc/ISurfaceAllocator.h @@ -39,10 +39,10 @@ class Thread; namespace mozilla { namespace ipc { class Shmem; -} +} // namespace ipc namespace gfx { class DataSourceSurface; -} +} // namespace gfx namespace layers { @@ -236,7 +236,7 @@ private: static mozilla::Atomic sAmount; }; -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/ipc/ImageBridgeChild.cpp b/gfx/layers/ipc/ImageBridgeChild.cpp index 3912911a1f..90be379478 100644 --- a/gfx/layers/ipc/ImageBridgeChild.cpp +++ b/gfx/layers/ipc/ImageBridgeChild.cpp @@ -43,7 +43,7 @@ struct nsIntRect; namespace mozilla { namespace ipc { class Shmem; -} +} // namespace ipc namespace layers { @@ -978,5 +978,5 @@ void ImageBridgeChild::SendPendingAsyncMessges() SendChildAsyncMessages(replies); } -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ipc/ImageBridgeChild.h b/gfx/layers/ipc/ImageBridgeChild.h index c9be164806..0f09619a9f 100644 --- a/gfx/layers/ipc/ImageBridgeChild.h +++ b/gfx/layers/ipc/ImageBridgeChild.h @@ -24,12 +24,12 @@ struct nsIntRect; namespace base { class Thread; -} +} // namespace base namespace mozilla { namespace ipc { class Shmem; -} +} // namespace ipc namespace layers { @@ -308,7 +308,7 @@ protected: bool mShuttingDown; }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/ipc/ImageBridgeParent.cpp b/gfx/layers/ipc/ImageBridgeParent.cpp index 90d120e739..67e38eff29 100644 --- a/gfx/layers/ipc/ImageBridgeParent.cpp +++ b/gfx/layers/ipc/ImageBridgeParent.cpp @@ -455,5 +455,5 @@ ImageBridgeParent::SendPendingAsyncMessges(base::ProcessId aChildProcessId) imageBridge->SendPendingAsyncMessges(); } -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ipc/ImageBridgeParent.h b/gfx/layers/ipc/ImageBridgeParent.h index d8b7f39f72..27c083cc5d 100644 --- a/gfx/layers/ipc/ImageBridgeParent.h +++ b/gfx/layers/ipc/ImageBridgeParent.h @@ -23,12 +23,12 @@ class MessageLoop; namespace base { class Thread; -} +} // namespace base namespace mozilla { namespace ipc { class Shmem; -} +} // namespace ipc namespace layers { @@ -164,7 +164,7 @@ private: nsRefPtr mCompositorThreadHolder; }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif // gfx_layers_ipc_ImageBridgeParent_h_ diff --git a/gfx/layers/ipc/LayerTransactionChild.cpp b/gfx/layers/ipc/LayerTransactionChild.cpp index 7e4bbb8f52..b690a99d6f 100644 --- a/gfx/layers/ipc/LayerTransactionChild.cpp +++ b/gfx/layers/ipc/LayerTransactionChild.cpp @@ -163,5 +163,5 @@ LayerTransactionChild::DeallocPTextureChild(PTextureChild* actor) return TextureClient::DestroyIPDLActor(actor); } -} // namespace layers -} // namespace mozilla +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ipc/LayerTransactionChild.h b/gfx/layers/ipc/LayerTransactionChild.h index 9c09c17093..907d82bea9 100644 --- a/gfx/layers/ipc/LayerTransactionChild.h +++ b/gfx/layers/ipc/LayerTransactionChild.h @@ -20,7 +20,7 @@ namespace mozilla { namespace layout { class RenderFrameChild; class ShadowLayerForwarder; -} +} // namespace layout namespace layers { diff --git a/gfx/layers/ipc/LayerTransactionParent.cpp b/gfx/layers/ipc/LayerTransactionParent.cpp index c0c6bcce4d..4931b9c02f 100644 --- a/gfx/layers/ipc/LayerTransactionParent.cpp +++ b/gfx/layers/ipc/LayerTransactionParent.cpp @@ -50,7 +50,7 @@ using mozilla::layout::RenderFrameParent; namespace mozilla { namespace gfx { class VRHMDInfo; -} +} // namespace gfx namespace layers { diff --git a/gfx/layers/ipc/LayerTransactionParent.h b/gfx/layers/ipc/LayerTransactionParent.h index 2b86a9a5e8..ba8e0e21d2 100644 --- a/gfx/layers/ipc/LayerTransactionParent.h +++ b/gfx/layers/ipc/LayerTransactionParent.h @@ -21,11 +21,11 @@ namespace mozilla { namespace ipc { class Shmem; -} +} // namespace ipc namespace layout { class RenderFrameParent; -} +} // namespace layout namespace layers { @@ -35,8 +35,8 @@ class ShadowLayerParent; class CompositableParent; class ShadowLayersManager; -class LayerTransactionParent : public PLayerTransactionParent, - public CompositableParentManager +class LayerTransactionParent final : public PLayerTransactionParent, + public CompositableParentManager { typedef mozilla::layout::RenderFrameParent RenderFrameParent; typedef InfallibleTArray EditArray; diff --git a/gfx/layers/ipc/ShadowLayerChild.cpp b/gfx/layers/ipc/ShadowLayerChild.cpp index 8fd162e4ae..b52c229af3 100644 --- a/gfx/layers/ipc/ShadowLayerChild.cpp +++ b/gfx/layers/ipc/ShadowLayerChild.cpp @@ -34,5 +34,5 @@ ShadowLayerChild::ActorDestroy(ActorDestroyReason why) } } -} // namespace layers -} // namespace mozilla +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ipc/ShadowLayerUtils.h b/gfx/layers/ipc/ShadowLayerUtils.h index 868dd78431..863b5385fc 100644 --- a/gfx/layers/ipc/ShadowLayerUtils.h +++ b/gfx/layers/ipc/ShadowLayerUtils.h @@ -24,7 +24,8 @@ namespace mozilla { namespace layers { struct SurfaceDescriptorX11 { bool operator==(const SurfaceDescriptorX11&) const { return false; } }; -} } +} // namespace layers +} // namespace mozilla #endif #if defined(MOZ_WIDGET_GONK) @@ -38,7 +39,8 @@ struct MagicGrallocBufferHandle { struct GrallocBufferRef { bool operator==(const GrallocBufferRef&) const { return false; } }; -} } +} // namespace layers +} // namespace mozilla #endif namespace IPC { diff --git a/gfx/layers/ipc/ShadowLayers.cpp b/gfx/layers/ipc/ShadowLayers.cpp index 655eefc5b5..0e055b09eb 100644 --- a/gfx/layers/ipc/ShadowLayers.cpp +++ b/gfx/layers/ipc/ShadowLayers.cpp @@ -39,7 +39,7 @@ struct nsIntPoint; namespace mozilla { namespace ipc { class Shmem; -} +} // namespace ipc namespace layers { diff --git a/gfx/layers/ipc/ShadowLayers.h b/gfx/layers/ipc/ShadowLayers.h index 360d07fd22..915e70a6af 100644 --- a/gfx/layers/ipc/ShadowLayers.h +++ b/gfx/layers/ipc/ShadowLayers.h @@ -131,7 +131,7 @@ class Transaction; * from the content thread. (See CompositableForwarder.h and ImageBridgeChild.h) */ -class ShadowLayerForwarder : public CompositableForwarder +class ShadowLayerForwarder final : public CompositableForwarder { friend class ClientLayerManager; diff --git a/gfx/layers/ipc/ShadowLayersManager.h b/gfx/layers/ipc/ShadowLayersManager.h index 16414e8226..6c3cb1e4f0 100644 --- a/gfx/layers/ipc/ShadowLayersManager.h +++ b/gfx/layers/ipc/ShadowLayersManager.h @@ -39,7 +39,7 @@ public: APZTestData* aOutData) { } }; -} // layers -} // mozilla +} // namespace layers +} // namespace mozilla #endif // mozilla_layers_ShadowLayersManager_h diff --git a/gfx/layers/ipc/SharedBufferManagerChild.h b/gfx/layers/ipc/SharedBufferManagerChild.h index 8f6f11ec30..7e957f43c2 100644 --- a/gfx/layers/ipc/SharedBufferManagerChild.h +++ b/gfx/layers/ipc/SharedBufferManagerChild.h @@ -14,7 +14,7 @@ namespace base { class Thread; -} +} // namespace base namespace mozilla { #ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC diff --git a/gfx/layers/ipc/SharedBufferManagerParent.h b/gfx/layers/ipc/SharedBufferManagerParent.h index b00a5ebf3e..2fb0644955 100644 --- a/gfx/layers/ipc/SharedBufferManagerParent.h +++ b/gfx/layers/ipc/SharedBufferManagerParent.h @@ -22,7 +22,7 @@ class GraphicBuffer; namespace base { class Thread; -} +} // namespace base namespace mozilla { #ifdef MOZ_HAVE_SURFACEDESCRIPTORGRALLOC diff --git a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp index 15945ed1db..2761992f90 100644 --- a/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp +++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.cpp @@ -225,5 +225,5 @@ SharedPlanarYCbCrImage::Allocate(PlanarYCbCrData& aData) return mBufferSize > 0; } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/ipc/SharedPlanarYCbCrImage.h b/gfx/layers/ipc/SharedPlanarYCbCrImage.h index 30efcf4f2f..d9a21690f1 100644 --- a/gfx/layers/ipc/SharedPlanarYCbCrImage.h +++ b/gfx/layers/ipc/SharedPlanarYCbCrImage.h @@ -60,7 +60,7 @@ private: RefPtr mCompositable; }; -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/opengl/CompositingRenderTargetOGL.cpp b/gfx/layers/opengl/CompositingRenderTargetOGL.cpp index 09cd4d181e..a5f17bad7c 100644 --- a/gfx/layers/opengl/CompositingRenderTargetOGL.cpp +++ b/gfx/layers/opengl/CompositingRenderTargetOGL.cpp @@ -112,5 +112,5 @@ CompositingRenderTargetOGL::InitializeImpl() } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/CompositingRenderTargetOGL.h b/gfx/layers/opengl/CompositingRenderTargetOGL.h index e293d076a3..f91ba27c40 100644 --- a/gfx/layers/opengl/CompositingRenderTargetOGL.h +++ b/gfx/layers/opengl/CompositingRenderTargetOGL.h @@ -26,10 +26,10 @@ namespace mozilla { namespace gl { class BindableTexture; -} +} // namespace gl namespace gfx { class DataSourceSurface; -} +} // namespace gfx namespace layers { @@ -172,7 +172,7 @@ private: GLuint mFBO; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* MOZILLA_GFX_SURFACEOGL_H */ diff --git a/gfx/layers/opengl/CompositorOGL.cpp b/gfx/layers/opengl/CompositorOGL.cpp index 7c9bfbd1c1..dca5379ba5 100644 --- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -1623,5 +1623,5 @@ PerFrameTexturePoolOGL::EndFrame() mCreatedTextures.Clear(); } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/CompositorOGL.h b/gfx/layers/opengl/CompositorOGL.h index c0f686c2b0..5f5255c188 100644 --- a/gfx/layers/opengl/CompositorOGL.h +++ b/gfx/layers/opengl/CompositorOGL.h @@ -44,7 +44,7 @@ class TimeStamp; namespace gfx { class Matrix4x4; -} +} // namespace gfx namespace layers { @@ -448,7 +448,7 @@ private: CompositorOGLVRObjects mVR; }; -} -} +} // namespace layers +} // namespace mozilla #endif /* MOZILLA_GFX_COMPOSITOROGL_H */ diff --git a/gfx/layers/opengl/CompositorOGLVR.cpp b/gfx/layers/opengl/CompositorOGLVR.cpp index 9a93ce4704..9bed2fbeb2 100644 --- a/gfx/layers/opengl/CompositorOGLVR.cpp +++ b/gfx/layers/opengl/CompositorOGLVR.cpp @@ -321,5 +321,5 @@ CompositorOGL::DrawVRDistortion(const gfx::Rect& aRect, gl()->fDisableVertexAttribArray(mVR.mAGenericAttribs); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/GLBlitTextureImageHelper.cpp b/gfx/layers/opengl/GLBlitTextureImageHelper.cpp index d1ea27e64c..0b178eacaa 100644 --- a/gfx/layers/opengl/GLBlitTextureImageHelper.cpp +++ b/gfx/layers/opengl/GLBlitTextureImageHelper.cpp @@ -277,5 +277,5 @@ GLBlitTextureImageHelper::UseBlitProgram() gl->fUniform1i(gl->fGetUniformLocation(mBlitProgram, "uSrcTexture"), 0); } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/GLBlitTextureImageHelper.h b/gfx/layers/opengl/GLBlitTextureImageHelper.h index 9075a6f85f..a9fda5784f 100644 --- a/gfx/layers/opengl/GLBlitTextureImageHelper.h +++ b/gfx/layers/opengl/GLBlitTextureImageHelper.h @@ -17,7 +17,7 @@ namespace mozilla { namespace gl { class GLContext; class TextureImage; -} +} // namespace gl namespace layers { class CompositorOGL; @@ -66,7 +66,7 @@ public: gl::TextureImage *aDst, const nsIntRect& aDstRect); }; -} -} +} // namespace layers +} // namespace mozilla #endif // GLBLITTEXTUREIMAGEHELPER_H_ diff --git a/gfx/layers/opengl/GLManager.cpp b/gfx/layers/opengl/GLManager.cpp index 8eae72426f..e748cfc8ef 100644 --- a/gfx/layers/opengl/GLManager.cpp +++ b/gfx/layers/opengl/GLManager.cpp @@ -70,5 +70,5 @@ GLManager::CreateGLManager(LayerManagerComposite* aManager) return nullptr; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/GLManager.h b/gfx/layers/opengl/GLManager.h index 9f2dd40c1a..7c872758e9 100644 --- a/gfx/layers/opengl/GLManager.h +++ b/gfx/layers/opengl/GLManager.h @@ -12,7 +12,7 @@ namespace mozilla { namespace gl { class GLContext; -} +} // namespace gl namespace layers { @@ -38,6 +38,7 @@ public: const gfx::Rect& aTextureRect) = 0; }; -} -} +} // namespace layers +} // namespace mozilla + #endif diff --git a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp index a2b41d9ccd..159b41291f 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp +++ b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.cpp @@ -82,5 +82,6 @@ MacIOSurfaceTextureClientOGL::GetAsSurface() RefPtr surf = mSurface->GetAsSurface(); return surf->GetDataSurface(); } -} -} + +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h index e7ab59a00a..5a0c03825d 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h +++ b/gfx/layers/opengl/MacIOSurfaceTextureClientOGL.h @@ -54,7 +54,7 @@ protected: bool mIsLocked; }; -} -} +} // namespace layers +} // namespace mozilla #endif // MOZILLA_GFX_MACIOSURFACETEXTURECLIENTOGL_H diff --git a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp index ec993b44a2..6c526d47b5 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp +++ b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.cpp @@ -123,5 +123,5 @@ MacIOSurfaceTextureSourceOGL::gl() const return mCompositor ? mCompositor->gl() : nullptr; } -} -} +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h index 6951633ab9..cbb978122f 100644 --- a/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h +++ b/gfx/layers/opengl/MacIOSurfaceTextureHostOGL.h @@ -98,7 +98,7 @@ protected: RefPtr mSurface; }; -} -} +} // namespace layers +} // namespace mozilla #endif // MOZILLA_GFX_MACIOSURFACETEXTUREHOSTOGL_H diff --git a/gfx/layers/opengl/OGLShaderProgram.cpp b/gfx/layers/opengl/OGLShaderProgram.cpp index 2051d940e7..44b9df2468 100644 --- a/gfx/layers/opengl/OGLShaderProgram.cpp +++ b/gfx/layers/opengl/OGLShaderProgram.cpp @@ -572,5 +572,5 @@ ShaderProgramOGL::SetBlurRadius(float aRX, float aRY) SetArrayUniform(KnownUniform::BlurGaussianKernel, GAUSSIAN_KERNEL_HALF_WIDTH, gaussianKernel); } -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/OGLShaderProgram.h b/gfx/layers/opengl/OGLShaderProgram.h index 63c5002e63..d03f500fc9 100644 --- a/gfx/layers/opengl/OGLShaderProgram.h +++ b/gfx/layers/opengl/OGLShaderProgram.h @@ -523,8 +523,7 @@ protected: } }; - -} /* layers */ -} /* mozilla */ +} // namespace layers +} // namespace mozilla #endif /* GFX_OGLSHADERPROGRAM_H */ diff --git a/gfx/layers/opengl/TextureClientOGL.cpp b/gfx/layers/opengl/TextureClientOGL.cpp index d6b35eb767..9d5c9e822e 100644 --- a/gfx/layers/opengl/TextureClientOGL.cpp +++ b/gfx/layers/opengl/TextureClientOGL.cpp @@ -130,5 +130,5 @@ SurfaceTextureClient::Unlock() #endif // MOZ_WIDGET_ANDROID -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/TextureClientOGL.h b/gfx/layers/opengl/TextureClientOGL.h index 46cdca3b49..fd33b2c054 100644 --- a/gfx/layers/opengl/TextureClientOGL.h +++ b/gfx/layers/opengl/TextureClientOGL.h @@ -121,7 +121,7 @@ protected: #endif // MOZ_WIDGET_ANDROID -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index 03ac2dd7ff..5ad60b8e8b 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -708,5 +708,5 @@ EGLImageTextureHost::GetFormat() const return mTextureSource->GetFormat(); } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla diff --git a/gfx/layers/opengl/TextureHostOGL.h b/gfx/layers/opengl/TextureHostOGL.h index a3f595b1f8..25c391ab6d 100644 --- a/gfx/layers/opengl/TextureHostOGL.h +++ b/gfx/layers/opengl/TextureHostOGL.h @@ -46,11 +46,11 @@ struct nsIntSize; namespace mozilla { namespace gfx { class DataSourceSurface; -} +} // namespace gfx namespace gl { class AndroidSurfaceTexture; -} +} // namespace gl namespace layers { @@ -516,7 +516,7 @@ protected: RefPtr mTextureSource; }; -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla #endif /* MOZILLA_GFX_TEXTUREOGL_H */ diff --git a/gfx/layers/opengl/TexturePoolOGL.cpp b/gfx/layers/opengl/TexturePoolOGL.cpp index aa7f27dff0..8ee3b4cbbc 100644 --- a/gfx/layers/opengl/TexturePoolOGL.cpp +++ b/gfx/layers/opengl/TexturePoolOGL.cpp @@ -119,5 +119,5 @@ void TexturePoolOGL::Shutdown() delete sTextures; } -} // gl -} // mozilla +} // namespace gl +} // namespace mozilla diff --git a/gfx/layers/opengl/TexturePoolOGL.h b/gfx/layers/opengl/TexturePoolOGL.h index 1259c58413..136364e8c9 100644 --- a/gfx/layers/opengl/TexturePoolOGL.h +++ b/gfx/layers/opengl/TexturePoolOGL.h @@ -34,7 +34,7 @@ public: static void Shutdown(); }; -} // gl -} // mozilla +} // namespace gl +} // namespace mozilla #endif // GFX_TEXTUREPOOLOGL_H diff --git a/gfx/src/AppUnits.h b/gfx/src/AppUnits.h index bb3727b883..e0ad6dc52d 100644 --- a/gfx/src/AppUnits.h +++ b/gfx/src/AppUnits.h @@ -11,5 +11,5 @@ namespace mozilla { inline int32_t AppUnitsPerCSSPixel() { return 60; } inline int32_t AppUnitsPerCSSInch() { return 96 * AppUnitsPerCSSPixel(); } -} +} // namespace mozilla #endif /* _NS_APPUNITS_H_ */ diff --git a/gfx/src/FilterSupport.cpp b/gfx/src/FilterSupport.cpp index 06121afa01..2b05beafe7 100644 --- a/gfx/src/FilterSupport.cpp +++ b/gfx/src/FilterSupport.cpp @@ -219,7 +219,7 @@ namespace FilterWrappers { return transfer.forget(); } -} +} // namespace FilterWrappers // A class that wraps a FilterNode and handles conversion between different // color models. Create FilterCachedColorModels with your original filter and @@ -1977,7 +1977,7 @@ namespace { const Map& map; bool matches; }; -} +} // namespace static PLDHashOperator CheckAttributeEquality(const uint32_t& aAttributeName, @@ -2012,7 +2012,7 @@ namespace { AttributeMap::AttributeHandleCallback handler; void* userData; }; -} +} // namespace static PLDHashOperator PassAttributeToHandleCallback(const uint32_t& aAttributeName, @@ -2097,5 +2097,5 @@ AttributeMap::Set(AttributeName aName, const float* aValues, int32_t aLength) mMap.Put(aName, new Attribute(aValues, aLength)); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/src/FilterSupport.h b/gfx/src/FilterSupport.h index 4441250a84..207a928db8 100644 --- a/gfx/src/FilterSupport.h +++ b/gfx/src/FilterSupport.h @@ -471,7 +471,7 @@ public: const nsTArray& aInputExtents); }; -} -} +} // namespace gfx +} // namespace mozilla #endif // __FilterSupport_h diff --git a/gfx/src/gfxCrashReporterUtils.cpp b/gfx/src/gfxCrashReporterUtils.cpp index b7321e95e7..79f0138618 100644 --- a/gfx/src/gfxCrashReporterUtils.cpp +++ b/gfx/src/gfxCrashReporterUtils.cpp @@ -112,6 +112,6 @@ ScopedGfxFeatureReporter::WriteAppNote(char statusChar) namespace mozilla { void ScopedGfxFeatureReporter::WriteAppNote(char) {} -} +} // namespace mozilla #endif diff --git a/gfx/src/nsFontMetrics.cpp b/gfx/src/nsFontMetrics.cpp index a7d96280b0..5a266c8ac3 100644 --- a/gfx/src/nsFontMetrics.cpp +++ b/gfx/src/nsFontMetrics.cpp @@ -105,7 +105,7 @@ public: } }; -} // anon namespace +} // namespace nsFontMetrics::nsFontMetrics() : mDeviceContext(nullptr), mP2A(0), mTextRunRTL(false) diff --git a/gfx/src/nsRegion.cpp b/gfx/src/nsRegion.cpp index be5a7ca504..b9c18b871b 100644 --- a/gfx/src/nsRegion.cpp +++ b/gfx/src/nsRegion.cpp @@ -1009,7 +1009,7 @@ namespace { return max; } -} +} // namespace nsRect nsRegion::GetLargestRectangle (const nsRect& aContainingRect) const { nsRect bestRect; diff --git a/gfx/src/nsRenderingContext.h b/gfx/src/nsRenderingContext.h index 4b715668b5..9983096683 100644 --- a/gfx/src/nsRenderingContext.h +++ b/gfx/src/nsRenderingContext.h @@ -14,8 +14,8 @@ namespace mozilla { namespace gfx { class DrawTarget; -} -} +} // namespace gfx +} // namespace mozilla class MOZ_STACK_CLASS nsRenderingContext final { diff --git a/gfx/tests/gtest/TestTextures.cpp b/gfx/tests/gtest/TestTextures.cpp index 4c89a5c38f..c22052a869 100644 --- a/gfx/tests/gtest/TestTextures.cpp +++ b/gfx/tests/gtest/TestTextures.cpp @@ -257,8 +257,8 @@ void TestTextureClientYCbCr(TextureClient* client, PlanarYCbCrData& ycbcrData) { } } -} // namespace -} // namespace +} // namespace layers +} // namespace mozilla TEST(Layers, TextureSerialization) { // the test is run on all the following image formats diff --git a/gfx/thebes/ContextStateTracker.cpp b/gfx/thebes/ContextStateTracker.cpp index d32d3175f3..a179abad90 100644 --- a/gfx/thebes/ContextStateTracker.cpp +++ b/gfx/thebes/ContextStateTracker.cpp @@ -121,5 +121,5 @@ ContextStateTrackerOGL::DestroyOGL(GLContext* aGL) } } -} +} // namespace mozilla diff --git a/gfx/thebes/ContextStateTracker.h b/gfx/thebes/ContextStateTracker.h index 569a1121f3..01cd3c5b24 100644 --- a/gfx/thebes/ContextStateTracker.h +++ b/gfx/thebes/ContextStateTracker.h @@ -14,7 +14,7 @@ namespace mozilla { namespace gl { class GLContext; -} +} // namespace gl /** * This class tracks the state of the context for debugging and profiling. @@ -78,6 +78,7 @@ private: void Flush(GLContext* aGL); }; -} +} // namespace mozilla + #endif diff --git a/gfx/thebes/gfx2DGlue.h b/gfx/thebes/gfx2DGlue.h index 9908a0f1b1..3bd1cb96ee 100644 --- a/gfx/thebes/gfx2DGlue.h +++ b/gfx/thebes/gfx2DGlue.h @@ -384,7 +384,7 @@ To3DMatrix(const Matrix4x4& aIn) return m; } -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/thebes/gfxBlur.h b/gfx/thebes/gfxBlur.h index 187187bf3d..ff65e1836c 100644 --- a/gfx/thebes/gfxBlur.h +++ b/gfx/thebes/gfxBlur.h @@ -24,8 +24,8 @@ namespace mozilla { struct RectCornerRadii; class SourceSurface; class DrawTarget; - } -} + } // namespace gfx +} // namespace mozilla /** * Implementation of a triple box blur approximation of a Gaussian blur. diff --git a/gfx/thebes/gfxContext.h b/gfx/thebes/gfxContext.h index 12113ffe80..9340c1c2a3 100644 --- a/gfx/thebes/gfxContext.h +++ b/gfx/thebes/gfxContext.h @@ -25,8 +25,8 @@ template class FallibleTArray; namespace mozilla { namespace gfx { struct RectCornerRadii; -} -} +} // namespace gfx +} // namespace mozilla /** * This is the main class for doing actual drawing. It is initialized using diff --git a/gfx/thebes/gfxFailure.h b/gfx/thebes/gfxFailure.h index 471b0c9593..b35ffba398 100644 --- a/gfx/thebes/gfxFailure.h +++ b/gfx/thebes/gfxFailure.h @@ -19,7 +19,7 @@ namespace mozilla { nsCOMPtr gfxInfo = do_GetService("@mozilla.org/gfx/info;1"); gfxInfo->LogFailure(failure); } - } -} + } // namespace gfx +} // namespace mozilla #endif // gfxFailure_h_ diff --git a/gfx/thebes/gfxFont.h b/gfx/thebes/gfxFont.h index 025b7bf5ff..b99ff4d05c 100644 --- a/gfx/thebes/gfxFont.h +++ b/gfx/thebes/gfxFont.h @@ -63,8 +63,8 @@ struct gfxTextRunDrawCallbacks; namespace mozilla { namespace gfx { class GlyphRenderingOptions; -} -} +} // namespace gfx +} // namespace mozilla struct gfxFontStyle { gfxFontStyle(); diff --git a/gfx/thebes/gfxFontMissingGlyphs.h b/gfx/thebes/gfxFontMissingGlyphs.h index d47765c511..1814a89a74 100644 --- a/gfx/thebes/gfxFontMissingGlyphs.h +++ b/gfx/thebes/gfxFontMissingGlyphs.h @@ -13,8 +13,8 @@ namespace mozilla { namespace gfx { class DrawTarget; class Pattern; -} -} +} // namespace gfx +} // namespace mozilla /** * This class should not be instantiated. It's just a container diff --git a/gfx/thebes/gfxGradientCache.cpp b/gfx/thebes/gfxGradientCache.cpp index 9c4cfefe50..29aeeb88d6 100644 --- a/gfx/thebes/gfxGradientCache.cpp +++ b/gfx/thebes/gfxGradientCache.cpp @@ -230,5 +230,5 @@ gfxGradientCache::Shutdown() gGradientCache = nullptr; } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/thebes/gfxGradientCache.h b/gfx/thebes/gfxGradientCache.h index b4c3478ac7..ccf537cc3d 100644 --- a/gfx/thebes/gfxGradientCache.h +++ b/gfx/thebes/gfxGradientCache.h @@ -30,7 +30,7 @@ public: static void Shutdown(); }; -} -} +} // namespace gfx +} // namespace mozilla #endif diff --git a/gfx/thebes/gfxImageSurface.h b/gfx/thebes/gfxImageSurface.h index cdc17f995e..6fcbde74c7 100644 --- a/gfx/thebes/gfxImageSurface.h +++ b/gfx/thebes/gfxImageSurface.h @@ -20,8 +20,8 @@ namespace mozilla { namespace gfx { class DataSourceSurface; class SourceSurface; -} -} +} // namespace gfx +} // namespace mozilla /** * A raw image buffer. The format can be set in the constructor. Its main diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 1eb45c785a..c849c14718 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -110,8 +110,8 @@ namespace layers { void InitGralloc(); #endif void ShutdownTileCache(); -} -} +} // namespace layers +} // namespace mozilla using namespace mozilla; using namespace mozilla::layers; diff --git a/gfx/thebes/gfxPlatform.h b/gfx/thebes/gfxPlatform.h index cbcef87e8e..421aec3589 100644 --- a/gfx/thebes/gfxPlatform.h +++ b/gfx/thebes/gfxPlatform.h @@ -44,7 +44,7 @@ namespace mozilla { namespace gl { class GLContext; class SkiaGLGlue; -} +} // namespace gl namespace gfx { class DrawTarget; class SourceSurface; @@ -58,8 +58,9 @@ BackendTypeBit(BackendType b) { return 1 << uint8_t(b); } -} -} + +} // namespace gfx +} // namespace mozilla #define MOZ_PERFORMANCE_WARNING(module, ...) \ do { \ diff --git a/gfx/thebes/gfxPlatformMac.h b/gfx/thebes/gfxPlatformMac.h index b70f991ef8..b53770ed60 100644 --- a/gfx/thebes/gfxPlatformMac.h +++ b/gfx/thebes/gfxPlatformMac.h @@ -13,8 +13,8 @@ namespace mozilla { namespace gfx { class DrawTarget; class VsyncSource; -} // gfx -} // mozilla +} // namespace gfx +} // namespace mozilla class gfxPlatformMac : public gfxPlatform { public: diff --git a/gfx/thebes/gfxRect.h b/gfx/thebes/gfxRect.h index 15696fa959..3531cbe052 100644 --- a/gfx/thebes/gfxRect.h +++ b/gfx/thebes/gfxRect.h @@ -34,8 +34,8 @@ namespace mozilla { eCornerBottomLeft = 3, eNumCorners = 4 }; - } -} + } // namespace css +} // namespace mozilla #define NS_CORNER_TOP_LEFT mozilla::css::eCornerTopLeft #define NS_CORNER_TOP_RIGHT mozilla::css::eCornerTopRight #define NS_CORNER_BOTTOM_RIGHT mozilla::css::eCornerBottomRight diff --git a/gfx/thebes/gfxReusableSharedImageSurfaceWrapper.h b/gfx/thebes/gfxReusableSharedImageSurfaceWrapper.h index 78a11b3fae..4b30b23899 100644 --- a/gfx/thebes/gfxReusableSharedImageSurfaceWrapper.h +++ b/gfx/thebes/gfxReusableSharedImageSurfaceWrapper.h @@ -13,11 +13,11 @@ class gfxSharedImageSurface; namespace mozilla { namespace ipc { class Shmem; -} +} // namespace ipc namespace layers { class ISurfaceAllocator; -} -} +} // namespace layers +} // namespace mozilla /** * A cross-process capable implementation of gfxReusableSurfaceWrapper based diff --git a/gfx/thebes/gfxSVGGlyphs.h b/gfx/thebes/gfxSVGGlyphs.h index 7d0b88f672..17d19ba3e8 100644 --- a/gfx/thebes/gfxSVGGlyphs.h +++ b/gfx/thebes/gfxSVGGlyphs.h @@ -26,8 +26,8 @@ class gfxTextContextPaint; namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla /** * Wraps an SVG document contained in the SVG table of an OpenType font. diff --git a/gfx/thebes/gfxUtils.h b/gfx/thebes/gfxUtils.h index b7acb3f969..e8c00b465f 100644 --- a/gfx/thebes/gfxUtils.h +++ b/gfx/thebes/gfxUtils.h @@ -25,11 +25,11 @@ struct nsIntRect; namespace mozilla { namespace layers { struct PlanarYCbCrData; -} +} // namespace layers namespace image { class ImageRegion; -} -} +} // namespace image +} // namespace mozilla class gfxUtils { public: diff --git a/gfx/ycbcr/YCbCrUtils.cpp b/gfx/ycbcr/YCbCrUtils.cpp index 26fb95f034..ea3fb7c8f4 100644 --- a/gfx/ycbcr/YCbCrUtils.cpp +++ b/gfx/ycbcr/YCbCrUtils.cpp @@ -152,5 +152,5 @@ ConvertYCbCrToRGB(const layers::PlanarYCbCrData& aData, } } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/ycbcr/YCbCrUtils.h b/gfx/ycbcr/YCbCrUtils.h index 1e83f4426f..1cd2e1c4fd 100644 --- a/gfx/ycbcr/YCbCrUtils.h +++ b/gfx/ycbcr/YCbCrUtils.h @@ -24,7 +24,7 @@ ConvertYCbCrToRGB(const layers::PlanarYCbCrData& aData, unsigned char* aDestBuffer, int32_t aStride); -} -} +} // namespace gfx +} // namespace mozilla #endif /* MOZILLA_GFX_UTILS_H_ */ diff --git a/gfx/ycbcr/ycbcr_to_rgb565.h b/gfx/ycbcr/ycbcr_to_rgb565.h index 4d9d6b5f00..d630e0e984 100644 --- a/gfx/ycbcr/ycbcr_to_rgb565.h +++ b/gfx/ycbcr/ycbcr_to_rgb565.h @@ -65,8 +65,8 @@ NS_GFX_(bool) IsScaleYCbCrToRGB565Fast(int source_x0, ScaleFilter filter); #endif // HAVE_YCBCR_TO_RGB565 -} // namespace gfx +} // namespace gfx -} // namespace mozilla +} // namespace mozilla #endif // MEDIA_BASE_YCBCR_TO_RGB565_H_ diff --git a/gfx/ycbcr/yuv_convert.cpp b/gfx/ycbcr/yuv_convert.cpp index 8b35e98908..14d64c3754 100644 --- a/gfx/ycbcr/yuv_convert.cpp +++ b/gfx/ycbcr/yuv_convert.cpp @@ -353,5 +353,5 @@ NS_GFX_(void) ScaleYCbCrToRGB32(const uint8* y_buf, EMMS(); } -} // namespace gfx -} // namespace mozilla +} // namespace gfx +} // namespace mozilla diff --git a/gfx/ycbcr/yuv_convert.h b/gfx/ycbcr/yuv_convert.h index b5e8c91de3..b041fed885 100644 --- a/gfx/ycbcr/yuv_convert.h +++ b/gfx/ycbcr/yuv_convert.h @@ -75,7 +75,7 @@ NS_GFX_(void) ScaleYCbCrToRGB32(const uint8* yplane, Rotate view_rotate, ScaleFilter filter); -} // namespace gfx -} // namespace mozilla +} // namespace gfx +} // namespace mozilla #endif // MEDIA_BASE_YUV_CONVERT_H_ diff --git a/gfx/ycbcr/yuv_convert_mmx.cpp b/gfx/ycbcr/yuv_convert_mmx.cpp index 1704c3ee6d..b5353e5008 100644 --- a/gfx/ycbcr/yuv_convert_mmx.cpp +++ b/gfx/ycbcr/yuv_convert_mmx.cpp @@ -41,5 +41,5 @@ void FilterRows_MMX(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr, } while (dest64 < end64); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/gfx/ycbcr/yuv_convert_sse2.cpp b/gfx/ycbcr/yuv_convert_sse2.cpp index 98fecb3a46..25fe20639d 100644 --- a/gfx/ycbcr/yuv_convert_sse2.cpp +++ b/gfx/ycbcr/yuv_convert_sse2.cpp @@ -43,5 +43,5 @@ void FilterRows_SSE2(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr, } while (dest128 < end128); } -} -} +} // namespace gfx +} // namespace mozilla diff --git a/hal/Hal.cpp b/hal/Hal.cpp index d189888ae2..b663087303 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -110,7 +110,7 @@ void InitLastIDToVibrate() ClearOnShutdown(&gLastIDToVibrate); } -} // anonymous namespace +} // namespace void Vibrate(const nsTArray& pattern, nsIDOMWindow* window) diff --git a/hal/HalSensor.h b/hal/HalSensor.h index bcee5e1ed2..9524225432 100644 --- a/hal/HalSensor.h +++ b/hal/HalSensor.h @@ -47,8 +47,8 @@ class SensorAccuracy; typedef Observer ISensorAccuracyObserver; -} -} +} // namespace hal +} // namespace mozilla #include "ipc/IPCMessageUtils.h" diff --git a/hal/HalWakeLock.cpp b/hal/HalWakeLock.cpp index 83c0aa509a..1848e09424 100644 --- a/hal/HalWakeLock.cpp +++ b/hal/HalWakeLock.cpp @@ -164,7 +164,7 @@ Init() } } -} // anonymous namespace +} // namespace namespace mozilla { @@ -283,5 +283,5 @@ GetWakeLockInfo(const nsAString& aTopic, WakeLockInformation* aWakeLockInfo) *aWakeLockInfo = WakeLockInfoFromLockCount(aTopic, totalCount); } -} // hal_impl -} // mozilla +} // namespace hal_impl +} // namespace mozilla diff --git a/hal/HalWakeLock.h b/hal/HalWakeLock.h index 0462f30cba..7ee6327d80 100644 --- a/hal/HalWakeLock.h +++ b/hal/HalWakeLock.h @@ -20,7 +20,7 @@ enum WakeLockState { */ WakeLockState ComputeWakeLockState(int aNumLocks, int aNumHidden); -} // hal -} // mozilla +} // namespace hal +} // namespace mozilla #endif /* __HAL_WAKELOCK_H_ */ diff --git a/hal/cocoa/CocoaBattery.cpp b/hal/cocoa/CocoaBattery.cpp index 0a4f16a84f..6f1b7b1dca 100644 --- a/hal/cocoa/CocoaBattery.cpp +++ b/hal/cocoa/CocoaBattery.cpp @@ -129,7 +129,7 @@ SingletonDestroyer::Observe(nsISupports*, const char* aTopic, const char16_t*) MacPowerInformationService::Shutdown(); return NS_OK; } -} // anonymous namespace +} // namespace /* static */ MacPowerInformationService* MacPowerInformationService::GetInstance() diff --git a/hal/cocoa/CocoaSensor.mm b/hal/cocoa/CocoaSensor.mm index 2c8130fb00..ad203073c3 100644 --- a/hal/cocoa/CocoaSensor.mm +++ b/hal/cocoa/CocoaSensor.mm @@ -145,5 +145,5 @@ DisableSensorNotifications(SensorType aSensor) NS_RELEASE(sUpdateTimer); } } -} // hal_impl -} // mozilla +} // namespace hal_impl +} // namespace mozilla diff --git a/hal/fallback/FallbackAlarm.cpp b/hal/fallback/FallbackAlarm.cpp index aac6198f10..9ec5c48e17 100644 --- a/hal/fallback/FallbackAlarm.cpp +++ b/hal/fallback/FallbackAlarm.cpp @@ -75,5 +75,5 @@ SetAlarm(int32_t aSeconds, int32_t aNanoseconds) return true; } -} // hal_impl +} // namespace hal_impl } // namespace mozilla diff --git a/hal/fallback/FallbackFMRadio.cpp b/hal/fallback/FallbackFMRadio.cpp index f2e9e4dae8..59f5081a03 100644 --- a/hal/fallback/FallbackFMRadio.cpp +++ b/hal/fallback/FallbackFMRadio.cpp @@ -67,5 +67,5 @@ void DisableRDS() {} -} // hal_impl +} // namespace hal_impl } // namespace mozilla diff --git a/hal/fallback/FallbackPower.cpp b/hal/fallback/FallbackPower.cpp index 20037b44c5..0a53e89adc 100644 --- a/hal/fallback/FallbackPower.cpp +++ b/hal/fallback/FallbackPower.cpp @@ -21,5 +21,5 @@ void StartForceQuitWatchdog(hal::ShutdownMode aMode, int32_t aTimeoutSecs) {} -} // hal_impl +} // namespace hal_impl } // namespace mozilla diff --git a/hal/fallback/FallbackProcessPriority.cpp b/hal/fallback/FallbackProcessPriority.cpp index db8eecc071..6cf416cde3 100644 --- a/hal/fallback/FallbackProcessPriority.cpp +++ b/hal/fallback/FallbackProcessPriority.cpp @@ -21,5 +21,5 @@ SetProcessPriority(int aPid, aBackgroundLRU); } -} // hal_impl +} // namespace hal_impl } // namespace mozilla diff --git a/hal/fallback/FallbackScreenConfiguration.cpp b/hal/fallback/FallbackScreenConfiguration.cpp index 0c01821976..e8905e77a9 100644 --- a/hal/fallback/FallbackScreenConfiguration.cpp +++ b/hal/fallback/FallbackScreenConfiguration.cpp @@ -59,5 +59,5 @@ UnlockScreenOrientation() { } -} // hal_impl -} // mozilla +} // namespace hal_impl +} // namespace mozilla diff --git a/hal/fallback/FallbackScreenPower.cpp b/hal/fallback/FallbackScreenPower.cpp index 72d843fd24..2a7ad276fe 100644 --- a/hal/fallback/FallbackScreenPower.cpp +++ b/hal/fallback/FallbackScreenPower.cpp @@ -37,5 +37,5 @@ void SetScreenBrightness(double aBrightness) {} -} // hal_impl +} // namespace hal_impl } // namespace mozilla diff --git a/hal/fallback/FallbackThreadPriority.cpp b/hal/fallback/FallbackThreadPriority.cpp index bd67b592d7..e548169f0e 100644 --- a/hal/fallback/FallbackThreadPriority.cpp +++ b/hal/fallback/FallbackThreadPriority.cpp @@ -17,5 +17,5 @@ SetCurrentThreadPriority(ThreadPriority aPriority) ThreadPriorityToString(aPriority)); } -} // hal_impl +} // namespace hal_impl } // namespace mozilla diff --git a/hal/fallback/FallbackVibration.cpp b/hal/fallback/FallbackVibration.cpp index 94503132d6..ffabe9efea 100644 --- a/hal/fallback/FallbackVibration.cpp +++ b/hal/fallback/FallbackVibration.cpp @@ -19,5 +19,5 @@ void CancelVibrate(const hal::WindowIdentifier &) {} -} // hal_impl +} // namespace hal_impl } // namespace mozilla diff --git a/hal/gonk/GonkHal.cpp b/hal/gonk/GonkHal.cpp index 96af42da3a..155c628a4d 100644 --- a/hal/gonk/GonkHal.cpp +++ b/hal/gonk/GonkHal.cpp @@ -392,7 +392,7 @@ EnsureVibratorThreadInitialized() NS_NewThread(getter_AddRefs(thread), sVibratorRunnable); } -} // anonymous namespace +} // namespace void Vibrate(const nsTArray &pattern, const hal::WindowIdentifier &) @@ -469,7 +469,7 @@ public: } }; -} // anonymous namespace +} // namespace class BatteryObserver : public IUeventObserver { @@ -664,7 +664,7 @@ bool sCpuSleepAllowed = true; // when reading or writing this variable to ensure thread-safe. int32_t sInternalLockCpuCount = 0; -} // anonymous namespace +} // namespace bool GetScreenEnabled() @@ -1922,7 +1922,7 @@ private: hal::ThreadPriority mThreadPriority; }; -} // anonymous namespace +} // namespace void SetCurrentThreadPriority(ThreadPriority aThreadPriority) diff --git a/hal/sandbox/SandboxHal.h b/hal/sandbox/SandboxHal.h index 66d5434f8c..0da2d41fbf 100644 --- a/hal/sandbox/SandboxHal.h +++ b/hal/sandbox/SandboxHal.h @@ -17,7 +17,7 @@ PHalChild* CreateHalChild(); PHalParent* CreateHalParent(); -} -} +} // namespace hal_sandbox +} // namespace mozilla #endif // mozilla_SandboxHal_h diff --git a/image/Decoder.h b/image/Decoder.h index d7aa1ad862..1571918efb 100644 --- a/image/Decoder.h +++ b/image/Decoder.h @@ -18,7 +18,7 @@ namespace mozilla { namespace Telemetry { enum ID : uint32_t; -} +} // namespace Telemetry namespace image { diff --git a/image/ImageRegion.h b/image/ImageRegion.h index d9b3b9e1c5..71dadb346c 100644 --- a/image/ImageRegion.h +++ b/image/ImageRegion.h @@ -152,7 +152,7 @@ private: bool mIsRestricted; }; -} // namespace image -} // namespace mozilla +} // namespace image +} // namespace mozilla #endif // mozilla_image_ImageRegion_h diff --git a/image/RasterImage.h b/image/RasterImage.h index 7d2bdc10f1..ab3004bbc7 100644 --- a/image/RasterImage.h +++ b/image/RasterImage.h @@ -125,7 +125,7 @@ namespace layers { class LayerManager; class ImageContainer; class Image; -} +} // namespace layers namespace image { diff --git a/image/SVGDocumentWrapper.h b/image/SVGDocumentWrapper.h index dc39b62a31..473467e569 100644 --- a/image/SVGDocumentWrapper.h +++ b/image/SVGDocumentWrapper.h @@ -31,7 +31,7 @@ struct nsIntSize; namespace mozilla { namespace dom { class SVGSVGElement; -} +} // namespace dom namespace image { diff --git a/image/imgLoader.h b/image/imgLoader.h index e54d70da42..7278c09b95 100644 --- a/image/imgLoader.h +++ b/image/imgLoader.h @@ -34,8 +34,8 @@ class imgMemoryReporter; namespace mozilla { namespace image { class ImageURL; -} -} +} // namespace image +} // namespace mozilla class imgCacheEntry { diff --git a/image/imgRequest.cpp b/image/imgRequest.cpp index e1cef16edd..6891b63c7b 100644 --- a/image/imgRequest.cpp +++ b/image/imgRequest.cpp @@ -536,7 +536,7 @@ void imgRequest::SetCacheValidation(imgCacheEntry* aCacheEntry, nsIRequest* aReq } } -namespace { // anon +namespace { already_AddRefed GetApplicationCache(nsIRequest* aRequest) @@ -563,7 +563,7 @@ GetApplicationCache(nsIRequest* aRequest) return appCache.forget(); } -} // anon +} // namespace bool imgRequest::CacheChanged(nsIRequest* aNewRequest) diff --git a/intl/locale/nsUConvPropertySearch.cpp b/intl/locale/nsUConvPropertySearch.cpp index 8c1bd7a529..d9e58d0f9b 100644 --- a/intl/locale/nsUConvPropertySearch.cpp +++ b/intl/locale/nsUConvPropertySearch.cpp @@ -18,7 +18,7 @@ struct PropertyComparator } }; -} +} // namespace // static nsresult diff --git a/intl/uconv/nsUTF8ToUnicode.cpp b/intl/uconv/nsUTF8ToUnicode.cpp index 3620f4aa3f..6d802ef343 100644 --- a/intl/uconv/nsUTF8ToUnicode.cpp +++ b/intl/uconv/nsUTF8ToUnicode.cpp @@ -149,8 +149,8 @@ namespace SSE2 { void Convert_ascii_run(const char *&src, char16_t *&dst, int32_t len); -} -} +} // namespace SSE2 +} // namespace mozilla #endif static inline void diff --git a/ipc/glue/BackgroundChildImpl.cpp b/ipc/glue/BackgroundChildImpl.cpp index e7d16d9bb8..cafff2464a 100644 --- a/ipc/glue/BackgroundChildImpl.cpp +++ b/ipc/glue/BackgroundChildImpl.cpp @@ -42,7 +42,7 @@ public: Recv__delete__(const nsCString& aTestArg) override; }; -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { diff --git a/ipc/glue/BackgroundImpl.cpp b/ipc/glue/BackgroundImpl.cpp index 13b45da164..a7274d2241 100644 --- a/ipc/glue/BackgroundImpl.cpp +++ b/ipc/glue/BackgroundImpl.cpp @@ -799,7 +799,7 @@ private: NS_DECL_NSIRUNNABLE }; -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { diff --git a/ipc/glue/BackgroundParentImpl.cpp b/ipc/glue/BackgroundParentImpl.cpp index 10ec07c75c..6db147a42a 100644 --- a/ipc/glue/BackgroundParentImpl.cpp +++ b/ipc/glue/BackgroundParentImpl.cpp @@ -70,7 +70,7 @@ public: ActorDestroy(ActorDestroyReason aWhy) override; }; -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { @@ -321,7 +321,7 @@ private: nsCOMPtr mBackgroundThread; }; -} // anonymous namespace +} // namespace bool BackgroundParentImpl::RecvPBroadcastChannelConstructor( diff --git a/ipc/glue/BackgroundParentImpl.h b/ipc/glue/BackgroundParentImpl.h index 4f63c28709..a51758857d 100644 --- a/ipc/glue/BackgroundParentImpl.h +++ b/ipc/glue/BackgroundParentImpl.h @@ -12,7 +12,7 @@ namespace mozilla { namespace layout { class VsyncParent; -} +} // namespace layout namespace ipc { diff --git a/ipc/glue/CrossProcessMutex.h b/ipc/glue/CrossProcessMutex.h index 359d38a783..77e8f117a1 100644 --- a/ipc/glue/CrossProcessMutex.h +++ b/ipc/glue/CrossProcessMutex.h @@ -19,7 +19,7 @@ namespace IPC { template struct ParamTraits; -} +} // namespace IPC // // Provides: @@ -110,5 +110,6 @@ private: typedef BaseAutoLock CrossProcessMutexAutoLock; typedef BaseAutoUnlock CrossProcessMutexAutoUnlock; -} +} // namespace mozilla + #endif diff --git a/ipc/glue/CrossProcessMutex_posix.cpp b/ipc/glue/CrossProcessMutex_posix.cpp index b3e17b774b..b5b8aa5433 100644 --- a/ipc/glue/CrossProcessMutex_posix.cpp +++ b/ipc/glue/CrossProcessMutex_posix.cpp @@ -19,7 +19,7 @@ struct MutexData { mozilla::Atomic mCount; }; -} +} // namespace namespace mozilla { @@ -149,4 +149,4 @@ CrossProcessMutex::ShareToProcess(base::ProcessId aTargetPid) return result; } -} +} // namespace mozilla diff --git a/ipc/glue/IOThreadChild.h b/ipc/glue/IOThreadChild.h index 7547f9f462..c8420b187e 100644 --- a/ipc/glue/IOThreadChild.h +++ b/ipc/glue/IOThreadChild.h @@ -43,7 +43,7 @@ private: DISALLOW_EVIL_CONSTRUCTORS(IOThreadChild); }; -} // namespace plugins -} // namespace mozilla +} // namespace ipc +} // namespace mozilla #endif // ifndef dom_plugins_IOThreadChild_h diff --git a/ipc/glue/InputStreamUtils.cpp b/ipc/glue/InputStreamUtils.cpp index 9ef59efe4f..5a1c245c55 100644 --- a/ipc/glue/InputStreamUtils.cpp +++ b/ipc/glue/InputStreamUtils.cpp @@ -31,7 +31,7 @@ NS_DEFINE_CID(kBufferedInputStreamCID, NS_BUFFEREDINPUTSTREAM_CID); NS_DEFINE_CID(kMIMEInputStreamCID, NS_MIMEINPUTSTREAM_CID); NS_DEFINE_CID(kMultiplexInputStreamCID, NS_MULTIPLEXINPUTSTREAM_CID); -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { diff --git a/ipc/glue/MessageChannel.cpp b/ipc/glue/MessageChannel.cpp index 524eb116aa..39694ef95a 100644 --- a/ipc/glue/MessageChannel.cpp +++ b/ipc/glue/MessageChannel.cpp @@ -292,7 +292,7 @@ private: bool mBlocked; }; -} /* namespace {} */ +} // namespace MessageChannel::MessageChannel(MessageListener *aListener) : mListener(aListener), @@ -1854,5 +1854,5 @@ ParentProcessIsBlocked() return gParentIsBlocked; } -} // ipc -} // mozilla +} // namespace ipc +} // namespace mozilla diff --git a/ipc/glue/ProtocolUtils.h b/ipc/glue/ProtocolUtils.h index 82f0760b66..72211d96f8 100644 --- a/ipc/glue/ProtocolUtils.h +++ b/ipc/glue/ProtocolUtils.h @@ -44,16 +44,17 @@ enum { // kuint16max - 1 is used by ipc_channel.h. }; -} + +} // namespace namespace mozilla { namespace dom { class ContentParent; -} +} // namespace dom namespace net { class NeckoParent; -} +} // namespace net namespace ipc { diff --git a/ipc/glue/SharedMemory.h b/ipc/glue/SharedMemory.h index 47cd200a2b..8183442d4a 100644 --- a/ipc/glue/SharedMemory.h +++ b/ipc/glue/SharedMemory.h @@ -22,13 +22,13 @@ enum Rights { RightsRead = 1 << 0, RightsWrite = 1 << 1 }; -} +} // namespace namespace mozilla { namespace ipc { class SharedMemory; -} +} // namespace ipc namespace ipc { diff --git a/ipc/glue/Shmem.h b/ipc/glue/Shmem.h index 8cccbb3e2c..6e7cd0f99a 100644 --- a/ipc/glue/Shmem.h +++ b/ipc/glue/Shmem.h @@ -57,7 +57,7 @@ namespace mozilla { namespace layers { class ShadowLayerForwarder; -} +} // namespace layers namespace ipc { diff --git a/ipc/glue/StringUtil.cpp b/ipc/glue/StringUtil.cpp index 6c50c2ed3f..3acc807e19 100644 --- a/ipc/glue/StringUtil.cpp +++ b/ipc/glue/StringUtil.cpp @@ -41,7 +41,8 @@ GhettoStringConvert(const FromType& in) out[i] = static_cast(in[i]); return out; } -} + +} // namespace base // Implement functions that were in the chromium ICU library, which // we're not taking. @@ -88,4 +89,4 @@ std::wstring SysNativeMBToWide(const StringPiece& native_mb) { } #endif -} // namespace base +} // namespace base diff --git a/ipc/glue/URIUtils.cpp b/ipc/glue/URIUtils.cpp index cdde2d91ea..c0e4b352f6 100644 --- a/ipc/glue/URIUtils.cpp +++ b/ipc/glue/URIUtils.cpp @@ -31,7 +31,7 @@ NS_DEFINE_CID(kStandardURLCID, NS_STANDARDURL_CID); NS_DEFINE_CID(kJARURICID, NS_JARURI_CID); NS_DEFINE_CID(kIconURICID, NS_MOZICONURI_CID); -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { diff --git a/ipc/glue/WindowsMessageLoop.cpp b/ipc/glue/WindowsMessageLoop.cpp index ab7f4b0a57..3aaef73463 100644 --- a/ipc/glue/WindowsMessageLoop.cpp +++ b/ipc/glue/WindowsMessageLoop.cpp @@ -435,7 +435,7 @@ ProcessOrDeferMessage(HWND hwnd, return res; } -} // anonymous namespace +} // namespace // We need the pointer value of this in PluginInstanceChild. LRESULT CALLBACK @@ -680,7 +680,7 @@ TimeoutHasExpired(const TimeoutData& aData) return now >= aData.targetTicks; } -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { diff --git a/ipc/glue/nsIIPCSerializableURI.h b/ipc/glue/nsIIPCSerializableURI.h index 7f9ab41ed5..ebbe89b2c0 100644 --- a/ipc/glue/nsIIPCSerializableURI.h +++ b/ipc/glue/nsIIPCSerializableURI.h @@ -11,8 +11,8 @@ namespace mozilla { namespace ipc { class URIParams; -} -} +} // namespace ipc +} // namespace mozilla #define NS_IIPCSERIALIZABLEURI_IID \ {0xfee3437d, 0x3daf, 0x411f, {0xb0, 0x1d, 0xdc, 0xd4, 0x88, 0x55, 0xe3, 0xd}} diff --git a/ipc/netd/Netd.cpp b/ipc/netd/Netd.cpp index 7bdebf0cb3..efe7d58cfa 100644 --- a/ipc/netd/Netd.cpp +++ b/ipc/netd/Netd.cpp @@ -79,7 +79,7 @@ InitRndisAddress() return true; } -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { diff --git a/ipc/ril/Ril.cpp b/ipc/ril/Ril.cpp index e979e020a3..341df0bb85 100644 --- a/ipc/ril/Ril.cpp +++ b/ipc/ril/Ril.cpp @@ -302,7 +302,7 @@ RilConnector::GetSocketAddr(const sockaddr_any& aAddr, nsAString& aAddrStr) MOZ_CRASH("This should never be called!"); } -} // anonymous namespace +} // namespace namespace mozilla { namespace ipc { diff --git a/js/ductwork/debugger/JSDebugger.cpp b/js/ductwork/debugger/JSDebugger.cpp index b3fdd26867..ddae7ef836 100644 --- a/js/ductwork/debugger/JSDebugger.cpp +++ b/js/ductwork/debugger/JSDebugger.cpp @@ -62,8 +62,8 @@ JSDebugger::AddClass(JS::Handle global, JSContext* cx) return NS_OK; } -} -} +} // namespace jsdebugger +} // namespace mozilla NS_DEFINE_NAMED_CID(JSDEBUGGER_CID); diff --git a/js/ductwork/debugger/JSDebugger.h b/js/ductwork/debugger/JSDebugger.h index 36a5cdb049..ce5ab81ad8 100644 --- a/js/ductwork/debugger/JSDebugger.h +++ b/js/ductwork/debugger/JSDebugger.h @@ -24,7 +24,7 @@ private: ~JSDebugger(); }; -} -} +} // namespace jsdebugger +} // namespace mozilla #endif /* JSDebugger_h */ diff --git a/js/ipc/CrossProcessObjectWrappers.h b/js/ipc/CrossProcessObjectWrappers.h index e55ba0e49f..f5b682482f 100644 --- a/js/ipc/CrossProcessObjectWrappers.h +++ b/js/ipc/CrossProcessObjectWrappers.h @@ -24,7 +24,7 @@ namespace mozilla { namespace dom { class CPOWManagerGetter; -} +} // namespace dom namespace jsipc { diff --git a/js/ipc/JavaScriptChild.h b/js/ipc/JavaScriptChild.h index 7d39450d0e..474064b651 100644 --- a/js/ipc/JavaScriptChild.h +++ b/js/ipc/JavaScriptChild.h @@ -34,7 +34,7 @@ class JavaScriptChild : public JavaScriptBase bool ok(ReturnStatus* rs); }; -} // mozilla -} // jsipc +} // namespace jsipc +} // namespace mozilla #endif diff --git a/js/ipc/JavaScriptLogging.h b/js/ipc/JavaScriptLogging.h index f5b4d6730f..3196fdc2f7 100644 --- a/js/ipc/JavaScriptLogging.h +++ b/js/ipc/JavaScriptLogging.h @@ -224,7 +224,7 @@ class Logging JSContext* cx; }; -} -} +} // namespace jsipc +} // namespace mozilla #endif diff --git a/js/ipc/JavaScriptParent.h b/js/ipc/JavaScriptParent.h index 5becfad5f5..b0fe402550 100644 --- a/js/ipc/JavaScriptParent.h +++ b/js/ipc/JavaScriptParent.h @@ -33,8 +33,8 @@ class JavaScriptParent : public JavaScriptBase virtual JSObject* scopeForTargetObjects() override; }; -} // jsipc -} // mozilla +} // namespace jsipc +} // namespace mozilla #endif // mozilla_jsipc_JavaScriptWrapper_h__ diff --git a/js/ipc/WrapperAnswer.h b/js/ipc/WrapperAnswer.h index ecd5744a97..3204495bed 100644 --- a/js/ipc/WrapperAnswer.h +++ b/js/ipc/WrapperAnswer.h @@ -68,7 +68,7 @@ class WrapperAnswer : public virtual JavaScriptShared bool ok(ReturnStatus *rs, const JS::ObjectOpResult &result); }; -} // mozilla -} // jsipc +} // namespace jsipc +} // namespace mozilla #endif diff --git a/js/ipc/WrapperOwner.h b/js/ipc/WrapperOwner.h index 861fe2a5d0..046771f8f5 100644 --- a/js/ipc/WrapperOwner.h +++ b/js/ipc/WrapperOwner.h @@ -154,7 +154,7 @@ class WrapperOwner : public virtual JavaScriptShared ReturnStatus* rs, bool* instanceof) = 0; }; -} // jsipc -} // mozilla +} // namespace jsipc +} // namespace mozilla #endif // mozilla_jsipc_WrapperOwner_h__ diff --git a/js/public/CharacterEncoding.h b/js/public/CharacterEncoding.h index 3d71474ba8..de92f46b62 100644 --- a/js/public/CharacterEncoding.h +++ b/js/public/CharacterEncoding.h @@ -14,7 +14,7 @@ namespace js { class ExclusiveContext; -} +} // namespace js class JSFlatString; diff --git a/js/public/Class.h b/js/public/Class.h index dc32c04af3..d562346172 100644 --- a/js/public/Class.h +++ b/js/public/Class.h @@ -208,7 +208,7 @@ class ObjectOpResult } }; -} +} // namespace JS // JSClass operation signatures. diff --git a/js/public/Debug.h b/js/public/Debug.h index 0dcb3e08f2..2d853d35ac 100644 --- a/js/public/Debug.h +++ b/js/public/Debug.h @@ -21,7 +21,7 @@ namespace js { class Debugger; -} +} // namespace js namespace JS { namespace dbg { diff --git a/js/public/HashTable.h b/js/public/HashTable.h index cad15ed7b3..90413ccd60 100644 --- a/js/public/HashTable.h +++ b/js/public/HashTable.h @@ -29,7 +29,7 @@ template class HashMapEntry; namespace detail { template class HashTableEntry; template class HashTable; -} +} // namespace detail /*****************************************************************************/ @@ -1700,7 +1700,7 @@ class HashTable : private AllocPolicy #undef METER }; -} // namespace detail -} // namespace js +} // namespace detail +} // namespace js #endif /* js_HashTable_h */ diff --git a/js/public/Id.h b/js/public/Id.h index 74b5142ef5..d45c29c238 100644 --- a/js/public/Id.h +++ b/js/public/Id.h @@ -178,6 +178,6 @@ template <> struct GCMethods #undef id -} +} // namespace js #endif /* js_Id_h */ diff --git a/js/public/TracingAPI.h b/js/public/TracingAPI.h index a3565ead3e..69e4030089 100644 --- a/js/public/TracingAPI.h +++ b/js/public/TracingAPI.h @@ -255,7 +255,7 @@ JS_TraceChildren(JSTracer* trc, void* thing, JSGCTraceKind kind); namespace JS { typedef js::HashSet, js::SystemAllocPolicy> ZoneSet; -} +} // namespace JS // Trace every value within |zones| that is wrapped by a cross-compartment // wrapper from a zone that is not an element of |zones|. diff --git a/js/public/Value.h b/js/public/Value.h index 1490b7c2eb..34ee487b39 100644 --- a/js/public/Value.h +++ b/js/public/Value.h @@ -1992,7 +1992,7 @@ extern JS_PUBLIC_DATA(const HandleValue) UndefinedHandleValue; extern JS_PUBLIC_DATA(const HandleValue) TrueHandleValue; extern JS_PUBLIC_DATA(const HandleValue) FalseHandleValue; -} +} // namespace JS #undef JS_VALUE_IS_CONSTEXPR #undef JS_RETURN_LAYOUT_FROM_BITS diff --git a/js/src/NamespaceImports.h b/js/src/NamespaceImports.h index 84e0a0e494..551c645a74 100644 --- a/js/src/NamespaceImports.h +++ b/js/src/NamespaceImports.h @@ -46,7 +46,7 @@ class MOZ_STACK_CLASS SourceBufferHolder; class HandleValueArray; class ObjectOpResult; -} +} // namespace JS // Do the importing. namespace js { diff --git a/js/src/asmjs/AsmJSFrameIterator.h b/js/src/asmjs/AsmJSFrameIterator.h index 4175c80478..b21c69a1d3 100644 --- a/js/src/asmjs/AsmJSFrameIterator.h +++ b/js/src/asmjs/AsmJSFrameIterator.h @@ -117,7 +117,7 @@ namespace AsmJSExit MOZ_ASSERT(ExtractReasonKind(reason) == Reason_Builtin); return BuiltinKind(uint16_t(reason >> 16)); } -} +} // namespace AsmJSExit // Iterates over the frames of a single AsmJSActivation, given an // asynchrously-interrupted thread's state. If the activation's diff --git a/js/src/asmjs/AsmJSModule.h b/js/src/asmjs/AsmJSModule.h index 8044eb30f7..182614f9b1 100644 --- a/js/src/asmjs/AsmJSModule.h +++ b/js/src/asmjs/AsmJSModule.h @@ -1622,6 +1622,6 @@ class AsmJSModuleObject : public NativeObject static const Class class_; }; -} // namespace js +} // namespace js #endif /* asmjs_AsmJSModule_h */ diff --git a/js/src/asmjs/AsmJSValidate.cpp b/js/src/asmjs/AsmJSValidate.cpp index 2d6364d784..15f2f3b669 100644 --- a/js/src/asmjs/AsmJSValidate.cpp +++ b/js/src/asmjs/AsmJSValidate.cpp @@ -983,7 +983,8 @@ class Signature RetType retType() const { return retType_; } }; -} /* namespace anonymous */ +} // namespace + static bool operator==(const Signature& lhs, const Signature& rhs) @@ -5601,7 +5602,7 @@ class CheckSimdVectorScalarArgs } }; -} // anonymous namespace +} // namespace static inline bool CheckSimdUnary(FunctionCompiler& f, ParseNode* call, AsmJSSimdType opType, @@ -5683,7 +5684,7 @@ CheckSimdCast(FunctionCompiler& f, ParseNode* call, AsmJSSimdType fromType, AsmJ return true; } -} +} // namespace static bool CheckSimdShuffleSelectors(FunctionCompiler& f, ParseNode* lane, int32_t lanes[4], uint32_t maxLane) diff --git a/js/src/asmjs/AsmJSValidate.h b/js/src/asmjs/AsmJSValidate.h index a865d120a4..a1b3f7c511 100644 --- a/js/src/asmjs/AsmJSValidate.h +++ b/js/src/asmjs/AsmJSValidate.h @@ -37,7 +37,7 @@ namespace frontend { template struct ParseContext; class FullParseHandler; class ParseNode; -} +} // namespace frontend typedef frontend::Parser AsmJSParser; typedef frontend::ParseContext AsmJSParseContext; diff --git a/js/src/builtin/Eval.h b/js/src/builtin/Eval.h index 30ad6f719c..7badd7315f 100644 --- a/js/src/builtin/Eval.h +++ b/js/src/builtin/Eval.h @@ -42,5 +42,6 @@ DirectEvalValueFromIon(JSContext* cx, extern bool IsAnyBuiltinEval(JSFunction* fun); -} // namespace js +} // namespace js + #endif /* builtin_Eval_h */ diff --git a/js/src/builtin/MapObject.cpp b/js/src/builtin/MapObject.cpp index db3bd4b2c4..086e62de37 100644 --- a/js/src/builtin/MapObject.cpp +++ b/js/src/builtin/MapObject.cpp @@ -671,7 +671,7 @@ class OrderedHashTable OrderedHashTable(const OrderedHashTable&) = delete; }; -} // namespace detail +} // namespace detail template class OrderedHashMap @@ -771,7 +771,7 @@ class OrderedHashSet } }; -} // namespace js +} // namespace js /*** HashableValue *******************************************************************************/ diff --git a/js/src/builtin/Object.cpp b/js/src/builtin/Object.cpp index 92d62ca6c0..1d7231330a 100644 --- a/js/src/builtin/Object.cpp +++ b/js/src/builtin/Object.cpp @@ -982,7 +982,7 @@ ProtoGetter(JSContext* cx, unsigned argc, Value* vp) namespace js { size_t sSetProtoCalled = 0; -} +} // namespace js static bool ProtoSetter(JSContext* cx, unsigned argc, Value* vp) diff --git a/js/src/builtin/Object.h b/js/src/builtin/Object.h index 283963fca9..7f90b029a6 100644 --- a/js/src/builtin/Object.h +++ b/js/src/builtin/Object.h @@ -14,7 +14,7 @@ namespace JS { class CallArgs; class Value; -} +} // namespace JS namespace js { diff --git a/js/src/builtin/SIMD.cpp b/js/src/builtin/SIMD.cpp index f3df5cec41..fc5783e0ba 100644 --- a/js/src/builtin/SIMD.cpp +++ b/js/src/builtin/SIMD.cpp @@ -638,7 +638,8 @@ struct ShiftRight { struct ShiftRightLogical { static inline int32_t apply(int32_t v, int32_t bits) { return uint32_t(v) >> (bits & 31); } }; -} + +} // namespace js static inline bool ErrorBadArgs(JSContext* cx) diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp index 51741db2e2..2009c1d734 100644 --- a/js/src/builtin/TypedObject.cpp +++ b/js/src/builtin/TypedObject.cpp @@ -2874,7 +2874,7 @@ class MemoryInitVisitor { void visitReference(ReferenceTypeDescr& descr, uint8_t* mem); }; -} // anonymous namespace +} // namespace void MemoryInitVisitor::visitReference(ReferenceTypeDescr& descr, uint8_t* mem) @@ -2944,7 +2944,7 @@ class MemoryTracingVisitor { void visitReference(ReferenceTypeDescr& descr, uint8_t* mem); }; -} // anonymous namespace +} // namespace void MemoryTracingVisitor::visitReference(ReferenceTypeDescr& descr, uint8_t* mem) @@ -3001,7 +3001,7 @@ struct TraceListVisitor { bool fillList(Vector& entries); }; -} // anonymous namespace +} // namespace void TraceListVisitor::visitReference(ReferenceTypeDescr& descr, uint8_t* mem) diff --git a/js/src/builtin/TypedObject.h b/js/src/builtin/TypedObject.h index f243284562..955e4cdb40 100644 --- a/js/src/builtin/TypedObject.h +++ b/js/src/builtin/TypedObject.h @@ -123,7 +123,7 @@ enum Kind { Array = JS_TYPEREPR_ARRAY_KIND }; -} +} // namespace type /////////////////////////////////////////////////////////////////////////// // Typed Prototypes diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index b20a451ed8..58768d4483 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -250,12 +250,12 @@ namespace CType { */ static JSObject* GetGlobalCTypes(JSContext* cx, JSObject* obj); -} +} // namespace CType namespace ABI { bool IsABI(JSObject* obj); static bool ToSource(JSContext* cx, unsigned argc, jsval* vp); -} +} // namespace ABI namespace PointerType { static bool Create(JSContext* cx, unsigned argc, jsval* vp); @@ -274,7 +274,7 @@ namespace PointerType { // The following is not an instance function, since we don't want to expose arbitrary // pointer arithmetic at this moment. static bool OffsetBy(JSContext* cx, const CallArgs& args, int offset); -} +} // namespace PointerType namespace ArrayType { bool IsArrayType(HandleValue v); @@ -290,7 +290,7 @@ namespace ArrayType { static bool Setter(JSContext* cx, HandleObject obj, HandleId idval, MutableHandleValue vp, ObjectOpResult &result); static bool AddressOfElement(JSContext* cx, unsigned argc, jsval* vp); -} +} // namespace ArrayType namespace StructType { bool IsStruct(HandleValue v); @@ -306,7 +306,7 @@ namespace StructType { MutableHandleValue vp, ObjectOpResult &result); static bool AddressOfField(JSContext* cx, unsigned argc, jsval* vp); static bool Define(JSContext* cx, unsigned argc, jsval* vp); -} +} // namespace StructType namespace FunctionType { static bool Create(JSContext* cx, unsigned argc, jsval* vp); @@ -350,7 +350,7 @@ namespace CData { #if defined(XP_WIN) bool LastErrorGetter(JSContext* cx, const JS::CallArgs& args); #endif // defined(XP_WIN) -} +} // namespace CData namespace CDataFinalizer { /* @@ -415,7 +415,7 @@ namespace CDataFinalizer { static bool Forget(JSContext* cx, unsigned argc, jsval* vp); static bool ToSource(JSContext* cx, unsigned argc, jsval* vp); static bool ToString(JSContext* cx, unsigned argc, jsval* vp); - } + } // namespace Methods /* * Utility functions @@ -463,7 +463,7 @@ namespace CDataFinalizer { static bool GetValue(JSContext* cx, JSObject* obj, MutableHandleValue result); static JSObject* GetCData(JSContext* cx, JSObject* obj); - } +} // namespace CDataFinalizer // Int64Base provides functions common to Int64 and UInt64. @@ -480,7 +480,7 @@ namespace Int64Base { bool isUnsigned); static void Finalize(JSFreeOp* fop, JSObject* obj); -} +} // namespace Int64Base namespace Int64 { static bool Construct(JSContext* cx, unsigned argc, jsval* vp); @@ -492,7 +492,7 @@ namespace Int64 { static bool Lo(JSContext* cx, unsigned argc, jsval* vp); static bool Hi(JSContext* cx, unsigned argc, jsval* vp); static bool Join(JSContext* cx, unsigned argc, jsval* vp); -} +} // namespace Int64 namespace UInt64 { static bool Construct(JSContext* cx, unsigned argc, jsval* vp); @@ -504,7 +504,7 @@ namespace UInt64 { static bool Lo(JSContext* cx, unsigned argc, jsval* vp); static bool Hi(JSContext* cx, unsigned argc, jsval* vp); static bool Join(JSContext* cx, unsigned argc, jsval* vp); -} +} // namespace UInt64 /******************************************************************************* ** JSClass definitions and initialization functions @@ -7802,5 +7802,5 @@ UInt64::Join(JSContext* cx, unsigned argc, jsval* vp) return true; } -} -} +} // namespace ctypes +} // namespace js diff --git a/js/src/ctypes/CTypes.h b/js/src/ctypes/CTypes.h index 40e9fb0bbf..f3ac140d3a 100644 --- a/js/src/ctypes/CTypes.h +++ b/js/src/ctypes/CTypes.h @@ -433,13 +433,13 @@ namespace CType { JSObject* GetProtoFromCtor(JSObject* obj, CTypeProtoSlot slot); JSObject* GetProtoFromType(JSContext* cx, JSObject* obj, CTypeProtoSlot slot); const JSCTypesCallbacks* GetCallbacksFromType(JSObject* obj); -} +} // namespace CType namespace PointerType { JSObject* CreateInternal(JSContext* cx, HandleObject baseType); JSObject* GetBaseType(JSObject* obj); -} +} // namespace PointerType typedef mozilla::UniquePtr> UniquePtrFFIType; @@ -451,7 +451,7 @@ namespace ArrayType { size_t GetLength(JSObject* obj); bool GetSafeLength(JSObject* obj, size_t* result); UniquePtrFFIType BuildFFIType(JSContext* cx, JSObject* obj); -} +} // namespace ArrayType namespace StructType { bool DefineInternal(JSContext* cx, JSObject* typeObj, JSObject* fieldsObj); @@ -460,7 +460,7 @@ namespace StructType { const FieldInfo* LookupField(JSContext* cx, JSObject* obj, JSFlatString* name); JSObject* BuildFieldsArray(JSContext* cx, JSObject* obj); UniquePtrFFIType BuildFFIType(JSContext* cx, JSObject* obj); -} +} // namespace StructType namespace FunctionType { JSObject* CreateInternal(JSContext* cx, HandleValue abi, HandleValue rtype, @@ -472,12 +472,12 @@ namespace FunctionType { FunctionInfo* GetFunctionInfo(JSObject* obj); void BuildSymbolName(JSString* name, JSObject* typeObj, AutoCString& result); -} +} // namespace FunctionType namespace CClosure { JSObject* Create(JSContext* cx, HandleObject typeObj, HandleObject fnObj, HandleObject thisObj, jsval errVal, PRFuncPtr* fnptr); -} +} // namespace CClosure namespace CData { JSObject* Create(JSContext* cx, HandleObject typeObj, HandleObject refObj, @@ -493,17 +493,17 @@ namespace CData { bool Cast(JSContext* cx, unsigned argc, jsval* vp); // Attached by JSAPI as the function 'ctypes.getRuntime' bool GetRuntime(JSContext* cx, unsigned argc, jsval* vp); -} +} // namespace CData namespace Int64 { bool IsInt64(JSObject* obj); -} +} // namespace Int64 namespace UInt64 { bool IsUInt64(JSObject* obj); -} +} // namespace UInt64 -} -} +} // namespace ctypes +} // namespace js #endif /* ctypes_CTypes_h */ diff --git a/js/src/ctypes/Library.cpp b/js/src/ctypes/Library.cpp index 9637e58f4a..ddb6971ded 100644 --- a/js/src/ctypes/Library.cpp +++ b/js/src/ctypes/Library.cpp @@ -24,7 +24,7 @@ namespace Library static bool Close(JSContext* cx, unsigned argc, jsval* vp); static bool Declare(JSContext* cx, unsigned argc, jsval* vp); -} +} // namespace Library /******************************************************************************* ** JSObject implementation @@ -366,6 +366,6 @@ Library::Declare(JSContext* cx, unsigned argc, jsval* vp) return true; } -} -} +} // namespace ctypes +} // namespace js diff --git a/js/src/ctypes/Library.h b/js/src/ctypes/Library.h index d6e05b8003..57aa7c8a97 100644 --- a/js/src/ctypes/Library.h +++ b/js/src/ctypes/Library.h @@ -29,9 +29,9 @@ namespace Library PRLibrary* GetLibrary(JSObject* obj); bool Open(JSContext* cx, unsigned argc, JS::Value* vp); -} +} // namespace Library -} -} +} // namespace ctypes +} // namespace js #endif /* ctypes_Library_h */ diff --git a/js/src/devtools/sharkctl.cpp b/js/src/devtools/sharkctl.cpp index 7408d95169..7b2dc02ae9 100644 --- a/js/src/devtools/sharkctl.cpp +++ b/js/src/devtools/sharkctl.cpp @@ -202,6 +202,6 @@ Stop() connected = false; } -} +} // namespace Shark #endif diff --git a/js/src/devtools/sharkctl.h b/js/src/devtools/sharkctl.h index bbe624691e..f09ed8be39 100644 --- a/js/src/devtools/sharkctl.h +++ b/js/src/devtools/sharkctl.h @@ -17,7 +17,7 @@ namespace Shark { bool Start(); void Stop(); -} +} // namespace Shark #endif /* __APPLE__ */ diff --git a/js/src/frontend/FullParseHandler.h b/js/src/frontend/FullParseHandler.h index da3d5b4b5c..784d72a825 100644 --- a/js/src/frontend/FullParseHandler.h +++ b/js/src/frontend/FullParseHandler.h @@ -855,7 +855,7 @@ FullParseHandler::makeAssignment(ParseNode* pn, ParseNode* rhs) return lhs; } -} // frontend -} // js +} // namespace frontend +} // namespace js #endif /* frontend_FullParseHandler_h */ diff --git a/js/src/frontend/SourceNotes.h b/js/src/frontend/SourceNotes.h index b44b1b9c04..071ab7c769 100644 --- a/js/src/frontend/SourceNotes.h +++ b/js/src/frontend/SourceNotes.h @@ -95,7 +95,7 @@ SN_IS_TERMINATOR(jssrcnote* sn) return *sn == SRC_NULL; } -} // namespace js +} // namespace js #define SN_TYPE_BITS 5 #define SN_DELTA_BITS 3 @@ -205,6 +205,6 @@ SrcNoteLength(jssrcnote *sn); extern JS_FRIEND_API(ptrdiff_t) GetSrcNoteOffset(jssrcnote* sn, unsigned which); -} +} // namespace js #endif /* frontend_SourceNotes_h */ diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h index 0e593d32c2..02b55011b2 100644 --- a/js/src/gc/Barrier.h +++ b/js/src/gc/Barrier.h @@ -155,7 +155,7 @@ class JSLinearString; namespace JS { class Symbol; -} +} // namespace JS namespace js { @@ -185,7 +185,7 @@ class ObjectGroup; namespace jit { class JitCode; -} +} // namespace jit #ifdef DEBUG // Barriers can't be triggered during backend Ion compilation, which may run on @@ -771,7 +771,7 @@ class BaseShape; class UnownedBaseShape; namespace jit { class JitCode; -} +} // namespace jit typedef PreBarriered PreBarrieredObject; typedef PreBarriered PreBarrieredScript; diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h index 0250d41082..94f2e68a8f 100644 --- a/js/src/gc/Heap.h +++ b/js/src/gc/Heap.h @@ -33,8 +33,8 @@ struct JSRuntime; namespace JS { namespace shadow { struct Runtime; -} -} +} // namespace shadow +} // namespace JS namespace js { diff --git a/js/src/gc/Nursery.h b/js/src/gc/Nursery.h index ec9b1199db..b6fcad52c9 100644 --- a/js/src/gc/Nursery.h +++ b/js/src/gc/Nursery.h @@ -23,7 +23,7 @@ namespace JS { struct Zone; -} +} // namespace JS namespace js { diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index a385ada41f..b5dd098051 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -387,8 +387,9 @@ struct PersistentRootedMarker Mark(trc, r->address(), name); } }; -} -} + +} // namespace gc +} // namespace js void js::gc::MarkPersistentRootedChains(JSTracer* trc) diff --git a/js/src/gc/Zone.h b/js/src/gc/Zone.h index 6cc6f190f9..9211e8f205 100644 --- a/js/src/gc/Zone.h +++ b/js/src/gc/Zone.h @@ -22,7 +22,7 @@ namespace js { namespace jit { class JitZone; -} +} // namespace jit namespace gc { diff --git a/js/src/jit-test/tests/profiler/debugmode-osr-resume-addr.js b/js/src/jit-test/tests/profiler/debugmode-osr-resume-addr.js new file mode 100644 index 0000000000..9dd68d6280 --- /dev/null +++ b/js/src/jit-test/tests/profiler/debugmode-osr-resume-addr.js @@ -0,0 +1,11 @@ +enableSPSProfiling(); +try { + // Only the ARM simulator supports single step profiling. + enableSingleStepProfiling(); +} catch (e) { + quit(0); +} +var g = newGlobal(); +var dbg = Debugger(g); +dbg.onDebuggerStatement = function (frame) {}; +g.eval("var line = new Error().lineNumber; debugger;"); diff --git a/js/src/jit/BitSet.h b/js/src/jit/BitSet.h index 5d3b1c012d..3086d6a126 100644 --- a/js/src/jit/BitSet.h +++ b/js/src/jit/BitSet.h @@ -176,7 +176,7 @@ class BitSet::Iterator } }; -} -} +} // namespace jit +} // namespace js #endif /* jit_BitSet_h */ diff --git a/js/src/jit/ExecutableAllocator.h b/js/src/jit/ExecutableAllocator.h index 3f3b7f502b..167de49382 100644 --- a/js/src/jit/ExecutableAllocator.h +++ b/js/src/jit/ExecutableAllocator.h @@ -67,7 +67,7 @@ extern "C" void sync_instruction_memory(caddr_t v, u_int len); namespace JS { struct CodeSizes; -} +} // namespace JS namespace js { namespace jit { diff --git a/js/src/jit/IonCode.h b/js/src/jit/IonCode.h index f89eae8fce..b1f27b2f6f 100644 --- a/js/src/jit/IonCode.h +++ b/js/src/jit/IonCode.h @@ -771,7 +771,7 @@ IsMarked(const jit::VMFunction*) namespace JS { namespace ubi { template<> struct Concrete : TracerConcrete { }; -} -} +} // namespace ubi +} // namespace JS #endif /* jit_IonCode_h */ diff --git a/js/src/jit/JitFrameIterator.h b/js/src/jit/JitFrameIterator.h index 93c7748747..9032de50f0 100644 --- a/js/src/jit/JitFrameIterator.h +++ b/js/src/jit/JitFrameIterator.h @@ -18,7 +18,7 @@ namespace js { class ActivationIterator; -}; +} // namespace js namespace js { namespace jit { diff --git a/js/src/jit/JitSpewer.h b/js/src/jit/JitSpewer.h index 04806d3140..f7aadef815 100644 --- a/js/src/jit/JitSpewer.h +++ b/js/src/jit/JitSpewer.h @@ -218,7 +218,7 @@ class AutoDisableSpew } }; -} /* ion */ -} /* js */ +} // namespace jit +} // namespace js #endif /* jit_JitSpewer_h */ diff --git a/js/src/jit/LIR.h b/js/src/jit/LIR.h index 487836c2ff..28ea00b6aa 100644 --- a/js/src/jit/LIR.h +++ b/js/src/jit/LIR.h @@ -1053,7 +1053,7 @@ namespace details { return getDef(0); } }; -} +} // namespace details template class LInstructionHelper : public details::LInstructionFixedDefsTempsHelper diff --git a/js/src/jit/Label.h b/js/src/jit/Label.h index 39b5ef8529..cba2eff6aa 100644 --- a/js/src/jit/Label.h +++ b/js/src/jit/Label.h @@ -108,6 +108,7 @@ class NonAssertingLabel : public Label } }; -} } // namespace js::jit +} // namespace jit +} // namespace js #endif // jit_Label_h diff --git a/js/src/jit/LoopUnroller.cpp b/js/src/jit/LoopUnroller.cpp index eb483e87dd..9b8bdcf064 100644 --- a/js/src/jit/LoopUnroller.cpp +++ b/js/src/jit/LoopUnroller.cpp @@ -48,7 +48,7 @@ struct LoopUnroller void go(LoopIterationBound* bound); }; -} // anonymous namespace +} // namespace MDefinition* LoopUnroller::getReplacementDefinition(MDefinition* def) diff --git a/js/src/jit/Recover.h b/js/src/jit/Recover.h index ad6507e878..b4da8322eb 100644 --- a/js/src/jit/Recover.h +++ b/js/src/jit/Recover.h @@ -732,7 +732,7 @@ RInstruction::toResumePoint() const return static_cast(this); } -} -} +} // namespace jit +} // namespace js #endif /* jit_Recover_h */ diff --git a/js/src/jit/Sink.cpp b/js/src/jit/Sink.cpp index e57afd4e07..b2c36fae5a 100644 --- a/js/src/jit/Sink.cpp +++ b/js/src/jit/Sink.cpp @@ -228,5 +228,5 @@ Sink(MIRGenerator* mir, MIRGraph& graph) return true; } -} -} +} // namespace jit +} // namespace js diff --git a/js/src/jit/Snapshots.h b/js/src/jit/Snapshots.h index 1edbaa9fe3..ba9b6623d8 100644 --- a/js/src/jit/Snapshots.h +++ b/js/src/jit/Snapshots.h @@ -553,7 +553,7 @@ class RecoverReader } }; -} -} +} // namespace jit +} // namespace js #endif /* jit_Snapshot_h */ diff --git a/js/src/jit/TypePolicy.cpp b/js/src/jit/TypePolicy.cpp index 86b6811f53..6a6196961a 100644 --- a/js/src/jit/TypePolicy.cpp +++ b/js/src/jit/TypePolicy.cpp @@ -1205,8 +1205,8 @@ namespace jit { TEMPLATE_TYPE_POLICY_LIST(template<> DEFINE_TYPE_POLICY_SINGLETON_INSTANCES_) #undef DEFINE_TYPE_POLICY_SINGLETON_INSTANCES_ -} -} +} // namespace jit +} // namespace js namespace { @@ -1222,7 +1222,7 @@ thisTypeSpecialization() MOZ_CRASH("TypeSpecialization lacks definition of thisTypeSpecialization."); } -} +} // namespace TypePolicy* MGetElementCache::thisTypePolicy() diff --git a/js/src/jit/shared/Assembler-shared.h b/js/src/jit/shared/Assembler-shared.h index b39338666b..ccf8e830fc 100644 --- a/js/src/jit/shared/Assembler-shared.h +++ b/js/src/jit/shared/Assembler-shared.h @@ -32,7 +32,7 @@ namespace jit { namespace Disassembler { class HeapAccess; -}; +} // namespace Disassembler static const uint32_t Simd128DataSize = 4 * sizeof(int32_t); static_assert(Simd128DataSize == 4 * sizeof(int32_t), "SIMD data should be able to contain int32x4"); diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index 3043f67357..bf1cd864cb 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -301,7 +301,7 @@ AssertHeapIsIdle(JSContext* cx) AssertHeapIsIdle(cx->runtime()); } -} +} // namespace js static void AssertHeapIsIdleOrIterating(JSRuntime* rt) diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 52e97c1378..e643d081ed 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -1595,7 +1595,7 @@ namespace JS { extern JS_PUBLIC_API(JSObject*) CurrentGlobalOrNull(JSContext* cx); -} +} // namespace JS /* * Initialize the 'Reflect' object on a global object. @@ -3930,7 +3930,7 @@ class MOZ_STACK_CLASS JS_PUBLIC_API(AutoSetAsyncStackForNewCalls) ~AutoSetAsyncStackForNewCalls(); }; -} +} // namespace JS /************************************************************************/ diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 170f7c8f2f..61d7cd2209 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -1650,7 +1650,8 @@ enum ComparatorMatchResult { Match_RightMinusLeft }; -} /* namespace anonymous */ +} // namespace + /* * Specialize behavior for comparator functions with particular common bytecode diff --git a/js/src/jsbool.h b/js/src/jsbool.h index 4d94d6a1c9..a1c184ab65 100644 --- a/js/src/jsbool.h +++ b/js/src/jsbool.h @@ -21,6 +21,6 @@ InitBooleanClass(JSContext* cx, js::HandleObject obj); extern JSString* BooleanToString(js::ExclusiveContext* cx, bool b); -} +} // namespace js #endif /* jsbool_h */ diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index edcddbc345..f5a856c48a 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -27,7 +27,7 @@ namespace jit { class JitContext; class CompileCompartment; class DebugModeOSRVolatileJitFrameIterator; -} +} // namespace jit typedef HashSet ObjectSet; typedef HashSet ShapeSet; diff --git a/js/src/jscompartment.h b/js/src/jscompartment.h index 2a31e44520..c17f41adae 100644 --- a/js/src/jscompartment.h +++ b/js/src/jscompartment.h @@ -20,11 +20,11 @@ namespace js { namespace jit { class JitCompartment; -} +} // namespace jit namespace gc { template class ComponentFinder; -} +} // namespace gc struct NativeIterator; @@ -133,7 +133,7 @@ namespace js { class DebugScopes; class ObjectWeakMap; class WeakMapBase; -} +} // namespace js struct JSCompartment { diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp index 0beb91eafd..9bd41b6c65 100644 --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -532,7 +532,7 @@ js::SetPreserveWrapperCallback(JSRuntime* rt, PreserveWrapperCallback callback) namespace js { // Defined in vm/GlobalObject.cpp. extern size_t sSetProtoCalled; -} +} // namespace js JS_FRIEND_API(size_t) JS_SetProtoCalled(JSContext*) diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h index 2e186afda0..e8a42cb711 100644 --- a/js/src/jsfriendapi.h +++ b/js/src/jsfriendapi.h @@ -2424,8 +2424,8 @@ JSID_FROM_BITS(size_t bits) namespace js { namespace detail { bool IdMatchesAtom(jsid id, JSAtom* atom); -} -} +} // namespace detail +} // namespace js /* * Must not be used on atoms that are representable as integer jsids. diff --git a/js/src/jsfun.h b/js/src/jsfun.h index 2354b2f84e..06212fda67 100644 --- a/js/src/jsfun.h +++ b/js/src/jsfun.h @@ -19,7 +19,7 @@ namespace js { class FunctionExtended; typedef JSNative Native; -} +} // namespace js struct JSAtomState; diff --git a/js/src/jsgc.h b/js/src/jsgc.h index afe3e70172..08f75704fe 100644 --- a/js/src/jsgc.h +++ b/js/src/jsgc.h @@ -48,7 +48,7 @@ namespace jit { namespace gcstats { struct Statistics; -} +} // namespace gcstats namespace gc { diff --git a/js/src/jslibmath.h b/js/src/jslibmath.h index bc33e97ae4..52d21797d0 100644 --- a/js/src/jslibmath.h +++ b/js/src/jslibmath.h @@ -71,6 +71,6 @@ NumberMod(double a, double b) { return js_fmod(a, b); } -} +} // namespace js #endif /* jslibmath_h */ diff --git a/js/src/jsobj.h b/js/src/jsobj.h index c915c284c5..b50dd9cc2d 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -29,7 +29,7 @@ namespace JS { struct ClassInfo; -} +} // namespace JS namespace js { @@ -42,7 +42,7 @@ struct StackShape; namespace gc { class RelocationOverlay; -} +} // namespace gc inline JSObject * CastAsObject(GetterOp op) @@ -1200,7 +1200,7 @@ extern bool LookupNameUnqualified(JSContext* cx, HandlePropertyName name, HandleObject scopeChain, MutableHandleObject objp); -} +} // namespace js namespace js { diff --git a/js/src/jsopcode.h b/js/src/jsopcode.h index 533f514380..83793a62c2 100644 --- a/js/src/jsopcode.h +++ b/js/src/jsopcode.h @@ -1009,6 +1009,6 @@ DumpIonScriptCounts(js::Sprinter* sp, jit::IonScriptCounts* ionCounts); void DumpCompartmentPCCounts(JSContext* cx); -} +} // namespace js #endif /* jsopcode_h */ diff --git a/js/src/jsopcodeinlines.h b/js/src/jsopcodeinlines.h index 3825a0ac55..fe22296550 100644 --- a/js/src/jsopcodeinlines.h +++ b/js/src/jsopcodeinlines.h @@ -114,6 +114,6 @@ class BytecodeRange { jsbytecode* pc, *end; }; -} +} // namespace js #endif /* jsopcodeinlines_h */ diff --git a/js/src/jspubtd.h b/js/src/jspubtd.h index f1f9564fa4..ad1cdf0f99 100644 --- a/js/src/jspubtd.h +++ b/js/src/jspubtd.h @@ -127,8 +127,8 @@ namespace gc { class StoreBuffer; void MarkPersistentRootedChains(JSTracer*); void FinishPersistentRootedChains(JSRuntime*); -} -} +} // namespace gc +} // namespace js namespace JS { diff --git a/js/src/jsscript.h b/js/src/jsscript.h index 630e6b820d..a1486a1535 100644 --- a/js/src/jsscript.h +++ b/js/src/jsscript.h @@ -27,14 +27,14 @@ namespace JS { struct ScriptSourceInfo; -} +} // namespace JS namespace js { namespace jit { struct BaselineScript; struct IonScriptCounts; -} +} // namespace jit # define ION_DISABLED_SCRIPT ((js::jit::IonScript*)0x1) # define ION_COMPILING_SCRIPT ((js::jit::IonScript*)0x2) @@ -53,7 +53,7 @@ class NestedScopeObject; namespace frontend { struct BytecodeEmitter; class UpvarCookie; -} +} // namespace frontend } @@ -2191,7 +2191,7 @@ CloneFunctionScript(JSContext *cx, HandleFunction original, HandleFunction clone namespace JS { namespace ubi { template<> struct Concrete : TracerConcrete { }; -} -} +} // namespace ubi +} // namespace JS #endif /* jsscript_h */ diff --git a/js/src/jswatchpoint.h b/js/src/jswatchpoint.h index edc0c5da11..541bc5c150 100644 --- a/js/src/jswatchpoint.h +++ b/js/src/jswatchpoint.h @@ -83,6 +83,6 @@ class WatchpointMap { Map map; }; -} +} // namespace js #endif /* jswatchpoint_h */ diff --git a/js/src/perf/pm_linux.cpp b/js/src/perf/pm_linux.cpp index 46efa37e34..082bbd7ba8 100644 --- a/js/src/perf/pm_linux.cpp +++ b/js/src/perf/pm_linux.cpp @@ -224,7 +224,7 @@ Impl::stop(PerfMeasurement* counters) } } -} // anonymous namespace +} // namespace namespace JS { diff --git a/js/src/vm/ArgumentsObject.h b/js/src/vm/ArgumentsObject.h index 2616b7dcf5..de4a01a1b9 100644 --- a/js/src/vm/ArgumentsObject.h +++ b/js/src/vm/ArgumentsObject.h @@ -19,7 +19,7 @@ class ScriptFrameIter; namespace jit { class JitFrameLayout; -} +} // namespace jit /* * ArgumentsData stores the initial indexed arguments provided to the diff --git a/js/src/vm/HelperThreads.h b/js/src/vm/HelperThreads.h index 4b242411ab..d5396dfa20 100644 --- a/js/src/vm/HelperThreads.h +++ b/js/src/vm/HelperThreads.h @@ -29,7 +29,7 @@ struct AsmJSParallelTask; struct ParseTask; namespace jit { class IonBuilder; -} +} // namespace jit // Per-process state for off thread work items. class GlobalHelperThreadState diff --git a/js/src/vm/Probes.h b/js/src/vm/Probes.h index ab83316207..12d341627d 100644 --- a/js/src/vm/Probes.h +++ b/js/src/vm/Probes.h @@ -119,7 +119,8 @@ DiscardExecutableRegion(void* start, size_t size); void DTraceEnterJSFun(JSContext* cx, JSFunction* fun, JSScript* script); void DTraceExitJSFun(JSContext* cx, JSFunction* fun, JSScript* script); -} /* namespace Probes */ +} // namespace probes + #ifdef INCLUDE_MOZILLA_DTRACE static const char* ObjectClassname(JSObject* obj) { diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 6046ab2331..516c4bc416 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -60,7 +60,7 @@ using JS::DoubleNaNValue; namespace js { bool gCanUseExtraThreads = true; -}; +} // namespace js void js::DisableExtraThreads() diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index 0a19f9349f..b192b3ce13 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -398,7 +398,7 @@ class FreeOp : public JSFreeOp namespace JS { struct RuntimeSizes; -} +} // namespace JS /* Various built-in or commonly-used names pinned on first context. */ struct JSAtomState diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp index e2926c3a00..5d0f1d7395 100644 --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -485,7 +485,7 @@ public: MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER }; -} // anonymous namespace +} // namespace static inline js::SavedFrame * UnwrapSavedFrame(JSContext *cx, HandleObject obj, bool &skippedAsync) diff --git a/js/src/vm/Shape.h b/js/src/vm/Shape.h index 45bf22fa7b..3ecb2c93d9 100644 --- a/js/src/vm/Shape.h +++ b/js/src/vm/Shape.h @@ -1454,7 +1454,7 @@ namespace JS { namespace ubi { template<> struct Concrete : TracerConcreteWithCompartment { }; template<> struct Concrete : TracerConcreteWithCompartment { }; -} -} +} // namespace ubi +} // namespace JS #endif /* vm_Shape_h */ diff --git a/js/src/vm/SharedTypedArrayObject.h b/js/src/vm/SharedTypedArrayObject.h index a9ba1a2a28..0932469be7 100644 --- a/js/src/vm/SharedTypedArrayObject.h +++ b/js/src/vm/SharedTypedArrayObject.h @@ -143,7 +143,7 @@ SharedTypedArrayObject::byteLengthValue(SharedTypedArrayObject* tarr) return Int32Value(tarr->getFixedSlot(LENGTH_SLOT).toInt32() * size); } -} // namespace js +} // namespace js template <> inline bool diff --git a/js/src/vm/Stack.h b/js/src/vm/Stack.h index b991931aa1..540e860173 100644 --- a/js/src/vm/Stack.h +++ b/js/src/vm/Stack.h @@ -76,7 +76,7 @@ enum MaybeCheckLexical { CheckLexical = true, DontCheckLexical = false }; namespace jit { class BaselineFrame; class RematerializedFrame; -} +} // namespace jit /* * Pointer to either a ScriptFrameIter::Data, an InterpreterFrame, or a Baseline @@ -1050,7 +1050,7 @@ class AsmJSActivation; namespace jit { class JitActivation; -}; +} // namespace jit class Activation { diff --git a/js/src/vm/TraceLogging.h b/js/src/vm/TraceLogging.h index a124dcb2af..b9e13d97b7 100644 --- a/js/src/vm/TraceLogging.h +++ b/js/src/vm/TraceLogging.h @@ -23,14 +23,14 @@ struct JSRuntime; namespace JS { class ReadOnlyCompileOptions; -} +} // namespace JS namespace js { class PerThreadData; namespace jit { class CompileRuntime; -} +} // namespace jit /* * Tracelogging overview. @@ -517,6 +517,6 @@ class AutoTraceLog MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER }; -} /* namedata js */ +} // namespace js #endif /* TraceLogging_h */ diff --git a/js/src/vm/TraceLoggingGraph.h b/js/src/vm/TraceLoggingGraph.h index 2de8b1e368..fd83cc5505 100644 --- a/js/src/vm/TraceLoggingGraph.h +++ b/js/src/vm/TraceLoggingGraph.h @@ -64,7 +64,7 @@ namespace js { void DestroyTraceLoggerGraphState(); -} +} // namespace js class TraceLoggerGraphState { diff --git a/js/src/vm/TypeInference.cpp b/js/src/vm/TypeInference.cpp index 626ff06aee..dae25a8700 100644 --- a/js/src/vm/TypeInference.cpp +++ b/js/src/vm/TypeInference.cpp @@ -3541,7 +3541,7 @@ struct DestroyTypeNewScript } }; -} // anonymous namespace +} // namespace bool TypeNewScript::maybeAnalyze(JSContext* cx, ObjectGroup* group, bool* regenerate, bool force) diff --git a/js/src/vm/TypeInference.h b/js/src/vm/TypeInference.h index 093cb98565..01a684f034 100644 --- a/js/src/vm/TypeInference.h +++ b/js/src/vm/TypeInference.h @@ -30,7 +30,7 @@ namespace jit { struct IonScript; class JitAllocPolicy; class TempAllocator; -} +} // namespace jit class TaggedProto; struct TypeZone; @@ -1283,7 +1283,7 @@ PrintTypes(JSContext* cx, JSCompartment* comp, bool force); namespace JS { namespace ubi { template<> struct Concrete : TracerConcrete { }; -} -} +} // namespace ubi +} // namespace JS #endif /* vm_TypeInference_h */ diff --git a/js/src/vm/UbiNode.cpp b/js/src/vm/UbiNode.cpp index 47a2b76853..3ff60a93a1 100644 --- a/js/src/vm/UbiNode.cpp +++ b/js/src/vm/UbiNode.cpp @@ -263,8 +263,8 @@ template class TracerConcrete; template class TracerConcreteWithCompartment; template class TracerConcreteWithCompartment; template class TracerConcrete; -} -} +} // namespace ubi +} // namespace JS namespace JS { diff --git a/js/xpconnect/loader/mozJSLoaderUtils.h b/js/xpconnect/loader/mozJSLoaderUtils.h index f2840288e5..5702bf1a51 100644 --- a/js/xpconnect/loader/mozJSLoaderUtils.h +++ b/js/xpconnect/loader/mozJSLoaderUtils.h @@ -13,8 +13,8 @@ class nsIURI; namespace mozilla { namespace scache { class StartupCache; -} -} +} // namespace scache +} // namespace mozilla nsresult ReadCachedScript(mozilla::scache::StartupCache* cache, nsACString& uri, diff --git a/js/xpconnect/src/XPCJSMemoryReporter.h b/js/xpconnect/src/XPCJSMemoryReporter.h index b44e96fa1d..1f1c23f27a 100644 --- a/js/xpconnect/src/XPCJSMemoryReporter.h +++ b/js/xpconnect/src/XPCJSMemoryReporter.h @@ -28,6 +28,6 @@ public: bool anonymize); }; -} +} // namespace xpc #endif diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index f8ed6b47b4..baf3e6d5f4 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -604,7 +604,7 @@ CurrentWindowOrNull(JSContext* cx) return glob ? WindowOrNull(glob) : nullptr; } -} +} // namespace xpc static void CompartmentDestroyedCallback(JSFreeOp* fop, JSCompartment* compartment) diff --git a/js/xpconnect/src/nsXPConnect.cpp b/js/xpconnect/src/nsXPConnect.cpp index 48584b5a52..37d77abbe4 100644 --- a/js/xpconnect/src/nsXPConnect.cpp +++ b/js/xpconnect/src/nsXPConnect.cpp @@ -951,7 +951,7 @@ public: NS_IMETHOD Run() { return NS_OK; } }; -} // anonymous namespace +} // namespace NS_IMETHODIMP nsXPConnect::OnProcessNextEvent(nsIThreadInternal* aThread, bool aMayWait, diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 58d4c5820c..112349a4ed 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -2856,9 +2856,9 @@ namespace mozilla { namespace dom { namespace danger { class AutoCxPusher; -} -} -} +} // namespace danger +} // namespace dom +} // namespace mozilla class XPCJSContextStack { diff --git a/js/xpconnect/src/xpcpublic.h b/js/xpconnect/src/xpcpublic.h index cd0db99277..8b56b6e933 100644 --- a/js/xpconnect/src/xpcpublic.h +++ b/js/xpconnect/src/xpcpublic.h @@ -153,7 +153,7 @@ namespace JS { struct RuntimeStats; -} +} // namespace JS #define XPCONNECT_GLOBAL_FLAGS_WITH_EXTRA_SLOTS(n) \ JSCLASS_DOM_GLOBAL | JSCLASS_HAS_PRIVATE | \ diff --git a/js/xpconnect/wrappers/AccessCheck.cpp b/js/xpconnect/wrappers/AccessCheck.cpp index e4f4d5662a..dfee72eae4 100644 --- a/js/xpconnect/wrappers/AccessCheck.cpp +++ b/js/xpconnect/wrappers/AccessCheck.cpp @@ -448,4 +448,4 @@ ExposedPropertiesOnly::deny(js::Wrapper::Action act, HandleId id) return false; } -} +} // namespace xpc diff --git a/js/xpconnect/wrappers/AccessCheck.h b/js/xpconnect/wrappers/AccessCheck.h index b731cd0228..488cceac0e 100644 --- a/js/xpconnect/wrappers/AccessCheck.h +++ b/js/xpconnect/wrappers/AccessCheck.h @@ -101,6 +101,6 @@ struct ExposedPropertiesOnly : public Policy { } }; -} +} // namespace xpc #endif /* __AccessCheck_h__ */ diff --git a/js/xpconnect/wrappers/ChromeObjectWrapper.cpp b/js/xpconnect/wrappers/ChromeObjectWrapper.cpp index 5b873a0bb7..7f7a08f09e 100644 --- a/js/xpconnect/wrappers/ChromeObjectWrapper.cpp +++ b/js/xpconnect/wrappers/ChromeObjectWrapper.cpp @@ -39,4 +39,4 @@ ChromeObjectWrapper::set(JSContext* cx, HandleObject wrapper, return ChromeObjectWrapperBase::set(cx, wrapper, receiver, id, vp, result); } -} +} // namespace xpc diff --git a/js/xpconnect/wrappers/FilteringWrapper.cpp b/js/xpconnect/wrappers/FilteringWrapper.cpp index c61a9629cf..f6a9158185 100644 --- a/js/xpconnect/wrappers/FilteringWrapper.cpp +++ b/js/xpconnect/wrappers/FilteringWrapper.cpp @@ -261,4 +261,4 @@ template class XOW; template class NNXOW; template class NNXOWC; template class ChromeObjectWrapperBase; -} +} // namespace xpc diff --git a/js/xpconnect/wrappers/FilteringWrapper.h b/js/xpconnect/wrappers/FilteringWrapper.h index f11f81a89d..f9f35b9242 100644 --- a/js/xpconnect/wrappers/FilteringWrapper.h +++ b/js/xpconnect/wrappers/FilteringWrapper.h @@ -85,6 +85,6 @@ class CrossOriginXrayWrapper : public SecurityXrayDOM { JS::MutableHandle desc) const override; }; -} +} // namespace xpc #endif /* __FilteringWrapper_h__ */ diff --git a/js/xpconnect/wrappers/WaiveXrayWrapper.cpp b/js/xpconnect/wrappers/WaiveXrayWrapper.cpp index 43168274dc..6347d3f76d 100644 --- a/js/xpconnect/wrappers/WaiveXrayWrapper.cpp +++ b/js/xpconnect/wrappers/WaiveXrayWrapper.cpp @@ -97,4 +97,4 @@ WaiveXrayWrapper::getPrototype(JSContext *cx, HandleObject wrapper, MutableHandl (!protop || WrapperFactory::WaiveXrayAndWrap(cx, protop)); } -} +} // namespace xpc diff --git a/js/xpconnect/wrappers/WaiveXrayWrapper.h b/js/xpconnect/wrappers/WaiveXrayWrapper.h index cde7206451..d37291a5e3 100644 --- a/js/xpconnect/wrappers/WaiveXrayWrapper.h +++ b/js/xpconnect/wrappers/WaiveXrayWrapper.h @@ -40,6 +40,6 @@ class WaiveXrayWrapper : public js::CrossCompartmentWrapper { static const WaiveXrayWrapper singleton; }; -} +} // namespace xpc #endif diff --git a/js/xpconnect/wrappers/WrapperFactory.cpp b/js/xpconnect/wrappers/WrapperFactory.cpp index 111b388607..661400fd64 100644 --- a/js/xpconnect/wrappers/WrapperFactory.cpp +++ b/js/xpconnect/wrappers/WrapperFactory.cpp @@ -631,4 +631,4 @@ NativeGlobal(JSObject* obj) return global; } -} +} // namespace xpc diff --git a/js/xpconnect/wrappers/WrapperFactory.h b/js/xpconnect/wrappers/WrapperFactory.h index 566ae0caa0..3609472edc 100644 --- a/js/xpconnect/wrappers/WrapperFactory.h +++ b/js/xpconnect/wrappers/WrapperFactory.h @@ -55,6 +55,6 @@ class WrapperFactory { extern const js::Wrapper XrayWaiver; -} +} // namespace xpc #endif /* _xpc_WRAPPERFACTORY_H */ diff --git a/js/xpconnect/wrappers/XrayWrapper.cpp b/js/xpconnect/wrappers/XrayWrapper.cpp index 9d449be798..6d8ae2db97 100644 --- a/js/xpconnect/wrappers/XrayWrapper.cpp +++ b/js/xpconnect/wrappers/XrayWrapper.cpp @@ -1063,7 +1063,7 @@ bool CloneExpandoChain(JSContext* cx, JSObject* dstArg, JSObject* srcArg) RootedObject src(cx, srcArg); return GetXrayTraits(src)->cloneExpandoChain(cx, dst, src); } -} +} // namespace XrayUtils static JSObject* GetHolder(JSObject* obj) @@ -1099,7 +1099,7 @@ IsXPCWNHolderClass(const JSClass* clasp) return clasp == &XPCWrappedNativeXrayTraits::HolderClass; } -} +} // namespace XrayUtils static nsGlobalWindow* AsWindow(JSContext* cx, JSObject* wrapper) @@ -2293,4 +2293,4 @@ template<> const SCSecurityXrayXPCWN SCSecurityXrayXPCWN::singleton(0); template class SCSecurityXrayXPCWN; -} +} // namespace xpc diff --git a/js/xpconnect/wrappers/XrayWrapper.h b/js/xpconnect/wrappers/XrayWrapper.h index 65e5e3fa39..9520135906 100644 --- a/js/xpconnect/wrappers/XrayWrapper.h +++ b/js/xpconnect/wrappers/XrayWrapper.h @@ -48,7 +48,7 @@ GetNativePropertiesObject(JSContext* cx, JSObject* wrapper); bool HasNativeProperty(JSContext* cx, JS::HandleObject wrapper, JS::HandleId id, bool* hasProp); -} +} // namespace XrayUtils enum XrayType { XrayForDOMObject, @@ -556,6 +556,6 @@ extern const SandboxCallableProxyHandler sandboxCallableProxyHandler; class AutoSetWrapperNotShadowing; -} +} // namespace xpc #endif diff --git a/layout/base/ActiveLayerTracker.cpp b/layout/base/ActiveLayerTracker.cpp index 086aab5501..925d093b00 100644 --- a/layout/base/ActiveLayerTracker.cpp +++ b/layout/base/ActiveLayerTracker.cpp @@ -334,4 +334,4 @@ ActiveLayerTracker::Shutdown() gLayerActivityTracker = nullptr; } -} +} // namespace mozilla diff --git a/layout/base/ActiveLayerTracker.h b/layout/base/ActiveLayerTracker.h index d816772148..7ac336faa9 100644 --- a/layout/base/ActiveLayerTracker.h +++ b/layout/base/ActiveLayerTracker.h @@ -101,6 +101,6 @@ public: static bool IsContentActive(nsIFrame* aFrame); }; -} +} // namespace mozilla #endif /* ACTIVELAYERTRACKER_H_ */ diff --git a/layout/base/CaretAssociationHint.h b/layout/base/CaretAssociationHint.h index 52bb5ba5b0..9067de6268 100644 --- a/layout/base/CaretAssociationHint.h +++ b/layout/base/CaretAssociationHint.h @@ -17,6 +17,6 @@ enum CaretAssociationHint { CARET_ASSOCIATE_AFTER }; -} +} // namespace mozilla #endif diff --git a/layout/base/DisplayItemClip.cpp b/layout/base/DisplayItemClip.cpp index be390bcd82..4ee003c4fe 100644 --- a/layout/base/DisplayItemClip.cpp +++ b/layout/base/DisplayItemClip.cpp @@ -475,4 +475,4 @@ DisplayItemClip::ToString() const return str; } -} +} // namespace mozilla diff --git a/layout/base/DisplayItemClip.h b/layout/base/DisplayItemClip.h index b08016f28f..28d3bbde0e 100644 --- a/layout/base/DisplayItemClip.h +++ b/layout/base/DisplayItemClip.h @@ -20,8 +20,8 @@ namespace mozilla { namespace gfx { class DrawTarget; class Path; -} -} +} // namespace gfx +} // namespace mozilla namespace mozilla { @@ -187,6 +187,6 @@ private: bool mHaveClipRect; }; -} +} // namespace mozilla #endif /* DISPLAYITEMCLIP_H_ */ diff --git a/layout/base/DisplayListClipState.cpp b/layout/base/DisplayListClipState.cpp index 85a84a329f..6314b67a9d 100644 --- a/layout/base/DisplayListClipState.cpp +++ b/layout/base/DisplayListClipState.cpp @@ -114,4 +114,4 @@ DisplayListClipState::AutoSaveRestore::AutoSaveRestore(nsDisplayListBuilder* aBu , mRestored(false) {} -} +} // namespace mozilla diff --git a/layout/base/DisplayListClipState.h b/layout/base/DisplayListClipState.h index cd29d2dde7..967298ca5c 100644 --- a/layout/base/DisplayListClipState.h +++ b/layout/base/DisplayListClipState.h @@ -259,6 +259,6 @@ protected: DebugOnly mExtraClipUsed; }; -} +} // namespace mozilla #endif /* DISPLAYLISTCLIPSTATE_H_ */ diff --git a/layout/base/FrameLayerBuilder.h b/layout/base/FrameLayerBuilder.h index 0d4cab8ded..54daf77961 100644 --- a/layout/base/FrameLayerBuilder.h +++ b/layout/base/FrameLayerBuilder.h @@ -28,11 +28,11 @@ class ContainerLayer; class LayerManager; class BasicLayerManager; class PaintedLayer; -} +} // namespace layers namespace gfx { class Matrix4x4; -} +} // namespace gfx class FrameLayerBuilder; class LayerManagerData; @@ -743,6 +743,6 @@ protected: uint32_t mMaxContainerLayerGeneration; }; -} +} // namespace mozilla #endif /* FRAMELAYERBUILDER_H_ */ diff --git a/layout/base/FramePropertyTable.h b/layout/base/FramePropertyTable.h index 2e06f9bc0a..17629c6221 100644 --- a/layout/base/FramePropertyTable.h +++ b/layout/base/FramePropertyTable.h @@ -262,6 +262,6 @@ private: nsIFrame* mFrame; }; -} +} // namespace mozilla #endif /* FRAMEPROPERTYTABLE_H_ */ diff --git a/layout/base/GeometryUtils.cpp b/layout/base/GeometryUtils.cpp index 3a303916d0..eacd02247c 100644 --- a/layout/base/GeometryUtils.cpp +++ b/layout/base/GeometryUtils.cpp @@ -384,4 +384,4 @@ ConvertPointFromNode(nsINode* aTo, const dom::DOMPointInit& aPoint, return result.forget(); } -} +} // namespace mozilla diff --git a/layout/base/GeometryUtils.h b/layout/base/GeometryUtils.h index 888aa82686..4398400df7 100644 --- a/layout/base/GeometryUtils.h +++ b/layout/base/GeometryUtils.h @@ -29,7 +29,7 @@ class DOMPoint; struct DOMPointInit; class OwningTextOrElementOrDocument; class TextOrElementOrDocument; -} +} // namespace dom typedef dom::TextOrElementOrDocument GeometryNode; typedef dom::OwningTextOrElementOrDocument OwningGeometryNode; @@ -61,6 +61,6 @@ ConvertPointFromNode(nsINode* aTo, const dom::DOMPointInit& aPoint, const dom::ConvertCoordinateOptions& aOptions, ErrorResult& aRv); -} +} // namespace mozilla #endif /* MOZILLA_GEOMETRYUTILS_H_ */ diff --git a/layout/base/LayerState.h b/layout/base/LayerState.h index 494fe0ae0d..643e1e9741 100644 --- a/layout/base/LayerState.h +++ b/layout/base/LayerState.h @@ -21,6 +21,6 @@ enum LayerState { LAYER_SVG_EFFECTS }; -} +} // namespace mozilla #endif diff --git a/layout/base/MaskLayerImageCache.cpp b/layout/base/MaskLayerImageCache.cpp index 32bf9d4dde..eb9667ceef 100644 --- a/layout/base/MaskLayerImageCache.cpp +++ b/layout/base/MaskLayerImageCache.cpp @@ -84,4 +84,4 @@ MaskLayerImageCache::MaskLayerImageKey::~MaskLayerImageKey() MOZ_COUNT_DTOR(MaskLayerImageKey); } -} +} // namespace mozilla diff --git a/layout/base/MaskLayerImageCache.h b/layout/base/MaskLayerImageCache.h index 8b9b9b24cc..c22d8ef975 100644 --- a/layout/base/MaskLayerImageCache.h +++ b/layout/base/MaskLayerImageCache.h @@ -14,7 +14,7 @@ namespace mozilla { namespace layers { class ImageContainer; -} +} // namespace layers /** * Keeps a record of image containers for mask layers, containers are mapped @@ -236,7 +236,7 @@ protected: }; -} +} // namespace mozilla #endif diff --git a/layout/base/PositionedEventTargeting.cpp b/layout/base/PositionedEventTargeting.cpp index 078986e728..a280056724 100644 --- a/layout/base/PositionedEventTargeting.cpp +++ b/layout/base/PositionedEventTargeting.cpp @@ -533,4 +533,4 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent, return target; } -} +} // namespace mozilla diff --git a/layout/base/PositionedEventTargeting.h b/layout/base/PositionedEventTargeting.h index d6535fd0b3..e6a2fddb98 100644 --- a/layout/base/PositionedEventTargeting.h +++ b/layout/base/PositionedEventTargeting.h @@ -27,6 +27,6 @@ FindFrameTargetedByInputEvent(WidgetGUIEvent* aEvent, const nsPoint& aPointRelativeToRootFrame, uint32_t aFlags = 0); -} +} // namespace mozilla #endif /* mozilla_PositionedEventTargeting_h */ diff --git a/layout/base/ScrollbarStyles.cpp b/layout/base/ScrollbarStyles.cpp index fa6b4f9c05..cc9f0c57de 100644 --- a/layout/base/ScrollbarStyles.cpp +++ b/layout/base/ScrollbarStyles.cpp @@ -29,4 +29,4 @@ namespace mozilla { mScrollSnapDestinationX(aDisplay->mScrollSnapDestination.mXPosition), mScrollSnapDestinationY(aDisplay->mScrollSnapDestination.mYPosition) {} -} +} // namespace mozilla diff --git a/layout/base/ScrollbarStyles.h b/layout/base/ScrollbarStyles.h index 9436099e2a..e6f0c6dde5 100644 --- a/layout/base/ScrollbarStyles.h +++ b/layout/base/ScrollbarStyles.h @@ -77,6 +77,6 @@ struct ScrollbarStyles } }; -} +} // namespace mozilla #endif diff --git a/layout/base/SelectionCarets.h b/layout/base/SelectionCarets.h index 99a1c383ec..8c4406c7e0 100644 --- a/layout/base/SelectionCarets.h +++ b/layout/base/SelectionCarets.h @@ -32,7 +32,7 @@ namespace mozilla { namespace dom { class Selection; -} +} // namespace dom /** * The SelectionCarets draw a pair of carets when the selection is not @@ -271,6 +271,7 @@ private: // Preference static int32_t sSelectionCaretsInflateSize; }; + } // namespace mozilla #endif //SelectionCarets_h__ diff --git a/layout/base/UnitTransforms.h b/layout/base/UnitTransforms.h index 7a83321962..786625214c 100644 --- a/layout/base/UnitTransforms.h +++ b/layout/base/UnitTransforms.h @@ -121,6 +121,6 @@ static gfx::PointTyped TransformVector(const gfx::Matrix4x4& aTrans return transformedEnd - transformedStart; } -} +} // namespace mozilla #endif diff --git a/layout/base/Units.h b/layout/base/Units.h index 24f65444b7..a5c91b0f47 100644 --- a/layout/base/Units.h +++ b/layout/base/Units.h @@ -555,6 +555,6 @@ gfx::MarginTyped operator/(const gfx::MarginTyped& aMargin, const gfx: aMargin.left / aScale.xScale); } -} +} // namespace mozilla #endif diff --git a/layout/base/WordMovementType.h b/layout/base/WordMovementType.h index c1d64a7a65..8d0c8e5d14 100644 --- a/layout/base/WordMovementType.h +++ b/layout/base/WordMovementType.h @@ -9,6 +9,6 @@ namespace mozilla { enum EWordMovementType { eStartWord, eEndWord, eDefaultBehavior }; -} +} // namespace mozilla #endif diff --git a/layout/base/nsBidiPresUtils.h b/layout/base/nsBidiPresUtils.h index b6db05ea7d..dfa2acc81c 100644 --- a/layout/base/nsBidiPresUtils.h +++ b/layout/base/nsBidiPresUtils.h @@ -30,7 +30,7 @@ template class nsTHashtable; namespace mozilla { class WritingMode; class LogicalMargin; -} +} // namespace mozilla /** * A structure representing some continuation state for each frame on the line, diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index 341c85a3bb..299b2d1313 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -48,8 +48,8 @@ namespace dom { class FlattenedChildIterator; -} -} +} // namespace dom +} // namespace mozilla class nsCSSFrameConstructor : public nsFrameManager { diff --git a/layout/base/nsCSSRendering.h b/layout/base/nsCSSRendering.h index bf1b7b97fc..0586bde2ed 100644 --- a/layout/base/nsCSSRendering.h +++ b/layout/base/nsCSSRendering.h @@ -26,11 +26,11 @@ namespace mozilla { namespace gfx { class DrawTarget; -} +} // namespace gfx namespace layers { class ImageContainer; -} +} // namespace layers // A CSSSizeOrRatio represents a (possibly partially specified) size for use // in computing image sizes. Either or both of the width and height might be @@ -98,7 +98,7 @@ struct CSSSizeOrRatio bool mHasHeight; }; -} +} // namespace mozilla /** * This is a small wrapper class to encapsulate image drawing that can draw an diff --git a/layout/base/nsCSSRenderingBorders.h b/layout/base/nsCSSRenderingBorders.h index cbe2d06bd8..03b2118d9e 100644 --- a/layout/base/nsCSSRenderingBorders.h +++ b/layout/base/nsCSSRenderingBorders.h @@ -21,8 +21,8 @@ struct nsBorderColors; namespace mozilla { namespace gfx { class GradientStops; -} -} +} // namespace gfx +} // namespace mozilla // define this to enable a bunch of debug dump info #undef DEBUG_NEW_BORDERS @@ -277,6 +277,6 @@ static inline void PrintAsStringNewline(const char *s = nullptr) {} static inline void PrintAsFormatString(const char *fmt, ...) {} #endif -} +} // namespace mozilla #endif /* NS_CSS_RENDERING_BORDERS_H */ diff --git a/layout/base/nsCaret.h b/layout/base/nsCaret.h index 814dd05798..5b7c8491c5 100644 --- a/layout/base/nsCaret.h +++ b/layout/base/nsCaret.h @@ -29,11 +29,11 @@ class nsITimer; namespace mozilla { namespace dom { class Selection; -} +} // namespace dom namespace gfx { class DrawTarget; -} -} +} // namespace gfx +} // namespace mozilla //----------------------------------------------------------------------------- class nsCaret final : public nsISelectionListener diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index f25bd9f150..d8b8d4bda9 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -7968,8 +7968,8 @@ MaybeSetupTransactionIdAllocator(layers::LayerManager* aManager, nsView* aView) } } -} -} +} // namespace layout +} // namespace mozilla /* static */ bool nsLayoutUtils::IsOutlineStyleAutoEnabled() diff --git a/layout/base/nsLayoutUtils.h b/layout/base/nsLayoutUtils.h index d7cf1183b2..d1bfce6e0e 100644 --- a/layout/base/nsLayoutUtils.h +++ b/layout/base/nsLayoutUtils.h @@ -2732,8 +2732,8 @@ void StrokeLineWithSnapping(const nsPoint& aP1, const nsPoint& aP2, void MaybeSetupTransactionIdAllocator(layers::LayerManager* aManager, nsView* aView); - } -} + } // namespace layout +} // namespace mozilla class nsSetAttrRunnable : public nsRunnable { diff --git a/layout/base/nsPresContext.cpp b/layout/base/nsPresContext.cpp index 2bad9335bb..be59684ea1 100644 --- a/layout/base/nsPresContext.cpp +++ b/layout/base/nsPresContext.cpp @@ -117,7 +117,7 @@ private: nsCString mCharSet; }; -} // anonymous namespace +} // namespace nscolor nsPresContext::MakeColorPref(const nsString& aColor) diff --git a/layout/base/nsPresContext.h b/layout/base/nsPresContext.h index 46a0b7e397..c8a4a70661 100644 --- a/layout/base/nsPresContext.h +++ b/layout/base/nsPresContext.h @@ -78,8 +78,8 @@ class FontFaceSet; namespace layers { class ContainerLayer; class LayerManager; -} -} +} // namespace layers +} // namespace mozilla // supported values for cached bool types enum nsPresContext_CachedBoolPrefType { diff --git a/layout/base/nsRefreshDriver.h b/layout/base/nsRefreshDriver.h index e001e7fa38..429a5d5779 100644 --- a/layout/base/nsRefreshDriver.h +++ b/layout/base/nsRefreshDriver.h @@ -34,8 +34,8 @@ namespace mozilla { class RefreshDriverTimer; namespace layout { class VsyncChild; -} -} +} // namespace layout +} // namespace mozilla /** * An abstract base class to be implemented by callers wanting to be diff --git a/layout/forms/nsComboboxControlFrame.h b/layout/forms/nsComboboxControlFrame.h index e459c17835..0819d60491 100644 --- a/layout/forms/nsComboboxControlFrame.h +++ b/layout/forms/nsComboboxControlFrame.h @@ -40,8 +40,8 @@ class nsIScrollableFrame; namespace mozilla { namespace gfx { class DrawTarget; -} -} +} // namespace gfx +} // namespace mozilla class nsComboboxControlFrame final : public nsBlockFrame, public nsIFormControlFrame, diff --git a/layout/forms/nsNumberControlFrame.h b/layout/forms/nsNumberControlFrame.h index c07b2ee9dd..458e0abe4b 100644 --- a/layout/forms/nsNumberControlFrame.h +++ b/layout/forms/nsNumberControlFrame.h @@ -20,8 +20,8 @@ class WidgetEvent; class WidgetGUIEvent; namespace dom { class HTMLInputElement; -} -} +} // namespace dom +} // namespace mozilla /** * This frame type is used for . diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h index 5f85b149c1..8b67c7ce28 100644 --- a/layout/forms/nsTextControlFrame.h +++ b/layout/forms/nsTextControlFrame.h @@ -21,8 +21,8 @@ class nsIEditor; namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla class nsTextControlFrame final : public nsContainerFrame, public nsIAnonymousContentCreator, diff --git a/layout/generic/JustificationUtils.h b/layout/generic/JustificationUtils.h index 129ad0b6e1..5ba071d57d 100644 --- a/layout/generic/JustificationUtils.h +++ b/layout/generic/JustificationUtils.h @@ -138,6 +138,6 @@ public: } }; -} +} // namespace mozilla #endif /* !defined(mozilla_JustificationUtils_h_) */ diff --git a/layout/generic/RubyUtils.h b/layout/generic/RubyUtils.h index 26fbf8ea2f..dbcbcc3ec4 100644 --- a/layout/generic/RubyUtils.h +++ b/layout/generic/RubyUtils.h @@ -136,6 +136,6 @@ private: bool mAtIntraLevelWhitespace; }; -} +} // namespace mozilla #endif /* !defined(mozilla_RubyUtils_h_) */ diff --git a/layout/generic/Selection.h b/layout/generic/Selection.h index f3deb5d2d2..018600a496 100644 --- a/layout/generic/Selection.h +++ b/layout/generic/Selection.h @@ -30,7 +30,7 @@ class nsHTMLCopyEncoder; namespace mozilla { class ErrorResult; struct AutoPrepareFocusRange; -} +} // namespace mozilla struct RangeData { diff --git a/layout/generic/TextOverflow.cpp b/layout/generic/TextOverflow.cpp index a71719c7db..ed4fa56ab0 100644 --- a/layout/generic/TextOverflow.cpp +++ b/layout/generic/TextOverflow.cpp @@ -814,5 +814,5 @@ TextOverflow::Marker::SetupString(nsIFrame* aFrame) mInitialized = true; } -} // namespace css -} // namespace mozilla +} // namespace css +} // namespace mozilla diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index 0b819d753d..41c4515f08 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -26,7 +26,7 @@ class nsOverflowContinuationTracker; namespace mozilla { class FramePropertyTable; -} +} // namespace mozilla // Some macros for container classes to do sanity checking on // width/height/x/y values computed during reflow. diff --git a/layout/generic/nsFlexContainerFrame.h b/layout/generic/nsFlexContainerFrame.h index 7409bef3a0..3b7b07a1d4 100644 --- a/layout/generic/nsFlexContainerFrame.h +++ b/layout/generic/nsFlexContainerFrame.h @@ -15,7 +15,7 @@ namespace mozilla { template class LinkedList; class LogicalPoint; -} +} // namespace mozilla nsContainerFrame* NS_NewFlexContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext); diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index e820796cd7..7c766c6b87 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -107,8 +107,8 @@ using namespace mozilla::layout; namespace mozilla { namespace gfx { class VRHMDInfo; -} -} +} // namespace gfx +} // namespace mozilla // Struct containing cached metrics for box-wrapped frames. struct nsBoxLayoutMetrics diff --git a/layout/generic/nsFrameList.cpp b/layout/generic/nsFrameList.cpp index 57d34f7301..ab41fb56f4 100644 --- a/layout/generic/nsFrameList.cpp +++ b/layout/generic/nsFrameList.cpp @@ -17,9 +17,9 @@ namespace mozilla { namespace layout { namespace detail { const AlignedFrameListBytes gEmptyFrameListBytes = { 0 }; -} -} -} +} // namespace detail +} // namespace layout +} // namespace mozilla void* nsFrameList::operator new(size_t sz, nsIPresShell* aPresShell) CPP_THROW_NEW @@ -542,5 +542,5 @@ AutoFrameListPtr::~AutoFrameListPtr() } } -} -} +} // namespace layout +} // namespace mozilla diff --git a/layout/generic/nsFrameList.h b/layout/generic/nsFrameList.h index 0acdb8fc4c..362722c771 100644 --- a/layout/generic/nsFrameList.h +++ b/layout/generic/nsFrameList.h @@ -45,8 +45,8 @@ namespace layout { // is normally done when manipulating child lists. kNoReflowPrincipalList = 0x4000 }; -} -} +} // namespace layout +} // namespace mozilla // Uncomment this to enable expensive frame-list integrity checking // #define DEBUG_FRAME_LIST @@ -564,9 +564,10 @@ union AlignedFrameListBytes { char bytes[sizeof(nsFrameList)]; }; extern const AlignedFrameListBytes gEmptyFrameListBytes; -} -} -} +} // namespace detail + +} // namespace layout +} // namespace mozilla /* static */ inline const nsFrameList& nsFrameList::EmptyList() diff --git a/layout/generic/nsFrameState.h b/layout/generic/nsFrameState.h index 99615f6382..73bdd60d2a 100644 --- a/layout/generic/nsFrameState.h +++ b/layout/generic/nsFrameState.h @@ -100,6 +100,6 @@ namespace mozilla { nsCString GetFrameState(nsIFrame* aFrame); void PrintFrameState(nsIFrame* aFrame); #endif -} +} // namespace mozilla #endif /* nsFrameState_h_ */ diff --git a/layout/generic/nsGfxScrollFrame.h b/layout/generic/nsGfxScrollFrame.h index bf7359ba39..a90e6588d1 100644 --- a/layout/generic/nsGfxScrollFrame.h +++ b/layout/generic/nsGfxScrollFrame.h @@ -35,11 +35,11 @@ struct ScrollReflowState; namespace mozilla { namespace layers { class Layer; -} +} // namespace layers namespace layout { class ScrollbarActivity; -} -} +} // namespace layout +} // namespace mozilla namespace mozilla { @@ -535,7 +535,7 @@ protected: static int32_t sVertScrollFraction; }; -} +} // namespace mozilla /** * The scroll frame creates and manages the scrolling view diff --git a/layout/generic/nsHTMLCanvasFrame.h b/layout/generic/nsHTMLCanvasFrame.h index 6d82975742..a783aa36d4 100644 --- a/layout/generic/nsHTMLCanvasFrame.h +++ b/layout/generic/nsHTMLCanvasFrame.h @@ -16,8 +16,8 @@ namespace mozilla { namespace layers { class Layer; class LayerManager; -} -} +} // namespace layers +} // namespace mozilla class nsPresContext; class nsDisplayItem; diff --git a/layout/generic/nsIFrame.h b/layout/generic/nsIFrame.h index 33ad2ec145..5d1174bed6 100644 --- a/layout/generic/nsIFrame.h +++ b/layout/generic/nsIFrame.h @@ -94,12 +94,12 @@ class EventStates; namespace layers { class Layer; -} +} // namespace layers namespace gfx { class Matrix; -} -} +} // namespace gfx +} // namespace mozilla /** * Indication of how the frame can be split. This is used when doing runaround @@ -365,7 +365,8 @@ struct IntrinsicSize { return !(*this == rhs); } }; -} + +} // namespace mozilla /// Generic destructor for frame properties. Calls delete. template diff --git a/layout/generic/nsImageFrame.h b/layout/generic/nsImageFrame.h index faf9b09491..dbd49b4909 100644 --- a/layout/generic/nsImageFrame.h +++ b/layout/generic/nsImageFrame.h @@ -38,8 +38,8 @@ namespace layers { class ImageContainer; class ImageLayer; class LayerManager; -} -} +} // namespace layers +} // namespace mozilla class nsImageListener : public imgINotificationObserver { diff --git a/layout/generic/nsPluginFrame.h b/layout/generic/nsPluginFrame.h index 561cea8462..5753a8c814 100644 --- a/layout/generic/nsPluginFrame.h +++ b/layout/generic/nsPluginFrame.h @@ -37,8 +37,8 @@ namespace layers { class ImageContainer; class Layer; class LayerManager; -} -} +} // namespace layers +} // namespace mozilla typedef nsFrame nsPluginFrameSuper; diff --git a/layout/generic/nsRubyBaseContainerFrame.h b/layout/generic/nsRubyBaseContainerFrame.h index 3b7b1af2ce..05ce113ea0 100644 --- a/layout/generic/nsRubyBaseContainerFrame.h +++ b/layout/generic/nsRubyBaseContainerFrame.h @@ -20,7 +20,7 @@ nsContainerFrame* NS_NewRubyBaseContainerFrame(nsIPresShell* aPresShell, namespace mozilla { struct RubyColumn; -} +} // namespace mozilla class nsRubyBaseContainerFrame final : public nsContainerFrame { diff --git a/layout/generic/nsSelection.cpp b/layout/generic/nsSelection.cpp index 55f0193987..71301a47ae 100644 --- a/layout/generic/nsSelection.cpp +++ b/layout/generic/nsSelection.cpp @@ -423,7 +423,8 @@ struct MOZ_STACK_CLASS AutoPrepareFocusRange Maybe mUserSelect; MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER }; -} + +} // namespace mozilla ////////////BEGIN nsFrameSelection methods diff --git a/layout/generic/nsSimplePageSequenceFrame.h b/layout/generic/nsSimplePageSequenceFrame.h index 8e68b49396..46afc7bffd 100644 --- a/layout/generic/nsSimplePageSequenceFrame.h +++ b/layout/generic/nsSimplePageSequenceFrame.h @@ -18,8 +18,8 @@ namespace dom { class HTMLCanvasElement; -} -} +} // namespace dom +} // namespace mozilla //----------------------------------------------- // This class maintains all the data that diff --git a/layout/generic/nsVideoFrame.h b/layout/generic/nsVideoFrame.h index 569b031425..f01f07ccd4 100644 --- a/layout/generic/nsVideoFrame.h +++ b/layout/generic/nsVideoFrame.h @@ -19,8 +19,8 @@ namespace mozilla { namespace layers { class Layer; class LayerManager; -} -} +} // namespace layers +} // namespace mozilla class nsAString; class nsPresContext; diff --git a/layout/inspector/inLayoutUtils.h b/layout/inspector/inLayoutUtils.h index 826c19ef33..a5bf333389 100644 --- a/layout/inspector/inLayoutUtils.h +++ b/layout/inspector/inLayoutUtils.h @@ -17,7 +17,7 @@ class nsISupports; namespace mozilla { class EventStateManager; -} +} // namespace mozilla class inLayoutUtils { diff --git a/layout/ipc/RenderFrameChild.cpp b/layout/ipc/RenderFrameChild.cpp index 2c1d62b145..72225abc09 100644 --- a/layout/ipc/RenderFrameChild.cpp +++ b/layout/ipc/RenderFrameChild.cpp @@ -31,5 +31,5 @@ RenderFrameChild::Destroy() // WARNING: |this| is dead, hands off } -} // namespace layout -} // namespace mozilla +} // namespace layout +} // namespace mozilla diff --git a/layout/ipc/RenderFrameParent.cpp b/layout/ipc/RenderFrameParent.cpp index fe45763c2e..7efe8e376d 100644 --- a/layout/ipc/RenderFrameParent.cpp +++ b/layout/ipc/RenderFrameParent.cpp @@ -631,8 +631,8 @@ RenderFrameParent::TakeFocusForClick() nsIFocusManager::FLAG_NOSCROLL); } -} // namespace layout -} // namespace mozilla +} // namespace layout +} // namespace mozilla nsDisplayRemote::nsDisplayRemote(nsDisplayListBuilder* aBuilder, nsSubDocumentFrame* aFrame, diff --git a/layout/ipc/RenderFrameParent.h b/layout/ipc/RenderFrameParent.h index fbc42fe293..1820cfae3b 100644 --- a/layout/ipc/RenderFrameParent.h +++ b/layout/ipc/RenderFrameParent.h @@ -28,7 +28,7 @@ class TargetConfig; class LayerTransactionParent; struct TextureFactoryIdentifier; struct ScrollableLayerGuid; -} +} // namespace layers namespace layout { diff --git a/layout/ipc/VsyncChild.h b/layout/ipc/VsyncChild.h index 25b007037c..8eace84592 100644 --- a/layout/ipc/VsyncChild.h +++ b/layout/ipc/VsyncChild.h @@ -16,7 +16,7 @@ class VsyncObserver; namespace ipc { class BackgroundChildImpl; -} +} // namespace ipc namespace layout { @@ -54,6 +54,6 @@ private: }; } // namespace layout -} // namespatce mozilla +} // namespace mozilla #endif // mozilla_layout_ipc_VsyncChild_h diff --git a/layout/ipc/VsyncParent.h b/layout/ipc/VsyncParent.h index a84e9d392f..23ba5211b6 100644 --- a/layout/ipc/VsyncParent.h +++ b/layout/ipc/VsyncParent.h @@ -17,7 +17,7 @@ namespace mozilla { namespace ipc { class BackgroundParentImpl; -} +} // namespace ipc namespace layout { @@ -49,7 +49,7 @@ private: nsRefPtr mVsyncDispatcher; }; -} //layout -} //mozilla +} // namespace layout +} // namespace mozilla #endif //mozilla_layout_ipc_VsyncParent_h diff --git a/layout/printing/nsPrintPreviewListener.h b/layout/printing/nsPrintPreviewListener.h index 4d7a7c95ea..dddb1bed5a 100644 --- a/layout/printing/nsPrintPreviewListener.h +++ b/layout/printing/nsPrintPreviewListener.h @@ -16,8 +16,8 @@ namespace mozilla { namespace dom { class EventTarget; -} -} +} // namespace dom +} // namespace mozilla // // class nsPrintPreviewListener diff --git a/layout/style/AnimationCommon.cpp b/layout/style/AnimationCommon.cpp index 983d2196bc..64f0b523e8 100644 --- a/layout/style/AnimationCommon.cpp +++ b/layout/style/AnimationCommon.cpp @@ -463,7 +463,7 @@ AnimValuesStyleRule::List(FILE* out, int32_t aIndent) const } #endif -} /* end sub-namespace css */ +} // namespace css bool AnimationPlayerCollection::CanAnimatePropertyOnCompositor( @@ -861,4 +861,4 @@ AnimationPlayerCollection::HasCurrentAnimationsForProperty(nsCSSProperty return false; } -} +} // namespace mozilla diff --git a/layout/style/AnimationCommon.h b/layout/style/AnimationCommon.h index 4f16ecc231..eb08fbbd39 100644 --- a/layout/style/AnimationCommon.h +++ b/layout/style/AnimationCommon.h @@ -197,7 +197,7 @@ private: InfallibleTArray mPropertyValuePairs; }; -} /* end css sub-namespace */ +} // namespace css typedef InfallibleTArray > AnimationPlayerPtrArray; diff --git a/layout/style/CSS.cpp b/layout/style/CSS.cpp index 7f7f144d51..a0ec3a2f04 100644 --- a/layout/style/CSS.cpp +++ b/layout/style/CSS.cpp @@ -95,5 +95,5 @@ CSS::Escape(const GlobalObject& aGlobal, } } -} // dom -} // mozilla +} // namespace dom +} // namespace mozilla diff --git a/layout/style/CSSCalc.h b/layout/style/CSSCalc.h index 9b71c05bb4..141ca9c0ab 100644 --- a/layout/style/CSSCalc.h +++ b/layout/style/CSSCalc.h @@ -354,8 +354,8 @@ SerializeCalcInternal(const typename CalcOps::input_type& aValue, CalcOps &aOps) } } -} +} // namespace css -} +} // namespace mozilla #endif /* !defined(CSSCalc_h_) */ diff --git a/layout/style/CSSStyleSheet.h b/layout/style/CSSStyleSheet.h index 108510f17d..b82197d653 100644 --- a/layout/style/CSSStyleSheet.h +++ b/layout/style/CSSStyleSheet.h @@ -45,10 +45,10 @@ namespace css { class Rule; class GroupRule; class ImportRule; -} +} // namespace css namespace dom { class CSSRuleList; -} +} // namespace dom // ------------------------------- // CSS Style Sheet Inner Data Container diff --git a/layout/style/CSSValue.h b/layout/style/CSSValue.h index 14d35fde1f..0f6df035cc 100644 --- a/layout/style/CSSValue.h +++ b/layout/style/CSSValue.h @@ -16,7 +16,7 @@ class nsIDOMCSSValue; class nsROCSSPrimitiveValue; namespace mozilla { class ErrorResult; -} +} // namespace mozilla namespace mozilla { namespace dom { @@ -42,7 +42,7 @@ public: nsROCSSPrimitiveValue *AsPrimitiveValue(); }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/layout/style/CSSVariableDeclarations.h b/layout/style/CSSVariableDeclarations.h index 8e081ad702..d4dd7a6f6a 100644 --- a/layout/style/CSSVariableDeclarations.h +++ b/layout/style/CSSVariableDeclarations.h @@ -12,7 +12,7 @@ namespace mozilla { class CSSVariableResolver; -} +} // namespace mozilla struct nsRuleData; namespace mozilla { diff --git a/layout/style/CSSVariableResolver.cpp b/layout/style/CSSVariableResolver.cpp index 421355b842..a79e2b29a6 100644 --- a/layout/style/CSSVariableResolver.cpp +++ b/layout/style/CSSVariableResolver.cpp @@ -262,4 +262,4 @@ CSSVariableResolver::Put(const nsAString& aVariableName, } } -} +} // namespace mozilla diff --git a/layout/style/CSSVariableResolver.h b/layout/style/CSSVariableResolver.h index 01de94f6fc..ed21db47de 100644 --- a/layout/style/CSSVariableResolver.h +++ b/layout/style/CSSVariableResolver.h @@ -143,6 +143,6 @@ private: #endif }; -} +} // namespace mozilla #endif diff --git a/layout/style/Declaration.cpp b/layout/style/Declaration.cpp index 018fe342d8..675085ff1b 100644 --- a/layout/style/Declaration.cpp +++ b/layout/style/Declaration.cpp @@ -1532,5 +1532,5 @@ Declaration::GetVariableValueIsImportant(const nsAString& aName) const return mImportantVariables && mImportantVariables->Has(aName); } -} // namespace mozilla::css +} // namespace css } // namespace mozilla diff --git a/layout/style/ErrorReporter.cpp b/layout/style/ErrorReporter.cpp index f52550fb06..583e05c69c 100644 --- a/layout/style/ErrorReporter.cpp +++ b/layout/style/ErrorReporter.cpp @@ -58,7 +58,8 @@ private: nsString mSpec; bool mPending; }; -} + +} // namespace static bool sReportErrors; static nsIConsoleService *sConsoleService; diff --git a/layout/style/FontFace.h b/layout/style/FontFace.h index 8ff6ec94e2..e4835f4735 100644 --- a/layout/style/FontFace.h +++ b/layout/style/FontFace.h @@ -26,8 +26,8 @@ class FontFaceInitializer; class FontFaceStatusSetter; class Promise; class StringOrArrayBufferOrArrayBufferView; -} -} +} // namespace dom +} // namespace mozilla namespace mozilla { namespace dom { diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 4a70c32740..11cf545917 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -102,9 +102,9 @@ namespace css { * Data needed to properly load a stylesheet * *********************************************/ -class SheetLoadData : public nsIRunnable, - public nsIUnicharStreamLoaderObserver, - public nsIThreadObserver +class SheetLoadData final : public nsIRunnable, + public nsIUnicharStreamLoaderObserver, + public nsIThreadObserver { protected: virtual ~SheetLoadData(void); diff --git a/layout/style/Loader.h b/layout/style/Loader.h index ae98be223f..bfd641ffe2 100644 --- a/layout/style/Loader.h +++ b/layout/style/Loader.h @@ -36,8 +36,8 @@ namespace mozilla { class CSSStyleSheet; namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla namespace mozilla { diff --git a/layout/style/SVGAttrAnimationRuleProcessor.h b/layout/style/SVGAttrAnimationRuleProcessor.h index e181b77e81..8749bca103 100644 --- a/layout/style/SVGAttrAnimationRuleProcessor.h +++ b/layout/style/SVGAttrAnimationRuleProcessor.h @@ -21,7 +21,7 @@ namespace mozilla { namespace dom { class Element; -} +} // namespace dom class SVGAttrAnimationRuleProcessor final : public nsIStyleRuleProcessor { diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index b83fc45c8d..ea4a783716 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -996,8 +996,8 @@ ImportantRule::List(FILE* out, int32_t aIndent) const namespace mozilla { namespace css { class DOMCSSStyleRule; -} -} +} // namespace css +} // namespace mozilla class DOMCSSDeclarationImpl : public nsDOMCSSDeclaration { diff --git a/layout/style/nsCSSDataBlock.h b/layout/style/nsCSSDataBlock.h index bea6989767..fcc562f968 100644 --- a/layout/style/nsCSSDataBlock.h +++ b/layout/style/nsCSSDataBlock.h @@ -23,8 +23,8 @@ class nsCSSExpandedDataBlock; namespace mozilla { namespace css { class Declaration; -} -} +} // namespace css +} // namespace mozilla /** * An |nsCSSCompressedDataBlock| holds a usually-immutable chunk of diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 9b70198758..47d67ef380 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -15520,7 +15520,7 @@ CSSParserImpl::IsValueValidForProperty(const nsCSSProperty aPropID, return parsedOK; } -} // anonymous namespace +} // namespace // Recycling of parser implementation objects diff --git a/layout/style/nsCSSParser.h b/layout/style/nsCSSParser.h index ba53b556b3..70a83ade5d 100644 --- a/layout/style/nsCSSParser.h +++ b/layout/style/nsCSSParser.h @@ -34,8 +34,8 @@ class Rule; class Declaration; class Loader; class StyleRule; -} -} +} // namespace css +} // namespace mozilla // Interface to the css parser. diff --git a/layout/style/nsCSSScanner.h b/layout/style/nsCSSScanner.h index dc39f7d061..ba894d64f0 100644 --- a/layout/style/nsCSSScanner.h +++ b/layout/style/nsCSSScanner.h @@ -13,8 +13,8 @@ namespace mozilla { namespace css { class ErrorReporter; -} -} +} // namespace css +} // namespace mozilla // Token types; in close but not perfect correspondence to the token // categorization in section 4.1.1 of CSS2.1. (The deviations are all diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index bcc37a94e7..179bcef6d3 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -829,7 +829,7 @@ private: nsCSSValue::Serialization mValueSerialization; }; -} // anonymous namespace +} // namespace void nsCSSValue::AppendPolygonToString(nsCSSProperty aProperty, nsAString& aResult, diff --git a/layout/style/nsCSSValue.h b/layout/style/nsCSSValue.h index 576dee1ed4..ee3e7cf11a 100644 --- a/layout/style/nsCSSValue.h +++ b/layout/style/nsCSSValue.h @@ -235,8 +235,8 @@ private: } }; -} -} +} // namespace css +} // namespace mozilla enum nsCSSUnit { eCSSUnit_Null = 0, // (n/a) null unit, value is not specified diff --git a/layout/style/nsComputedDOMStyle.h b/layout/style/nsComputedDOMStyle.h index a8411d3b29..73ff28234b 100644 --- a/layout/style/nsComputedDOMStyle.h +++ b/layout/style/nsComputedDOMStyle.h @@ -24,8 +24,8 @@ namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla struct nsComputedStyleMap; class nsIFrame; diff --git a/layout/style/nsDOMCSSAttrDeclaration.h b/layout/style/nsDOMCSSAttrDeclaration.h index 2f98d4ff75..05134d7e5c 100644 --- a/layout/style/nsDOMCSSAttrDeclaration.h +++ b/layout/style/nsDOMCSSAttrDeclaration.h @@ -16,8 +16,8 @@ namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla class nsDOMCSSAttributeDeclaration final : public nsDOMCSSDeclaration { diff --git a/layout/style/nsDOMCSSDeclaration.h b/layout/style/nsDOMCSSDeclaration.h index b938c4ddf7..1590e977ba 100644 --- a/layout/style/nsDOMCSSDeclaration.h +++ b/layout/style/nsDOMCSSDeclaration.h @@ -24,8 +24,8 @@ namespace css { class Declaration; class Loader; class Rule; -} -} +} // namespace css +} // namespace mozilla class nsDOMCSSDeclaration : public nsICSSDeclaration { diff --git a/layout/style/nsDOMCSSRect.h b/layout/style/nsDOMCSSRect.h index 54dc70d506..4092242c93 100644 --- a/layout/style/nsDOMCSSRect.h +++ b/layout/style/nsDOMCSSRect.h @@ -16,8 +16,8 @@ class nsROCSSPrimitiveValue; -class nsDOMCSSRect : public nsIDOMRect, - public nsWrapperCache +class nsDOMCSSRect final : public nsIDOMRect, + public nsWrapperCache { public: nsDOMCSSRect(nsROCSSPrimitiveValue* aTop, diff --git a/layout/style/nsHTMLCSSStyleSheet.cpp b/layout/style/nsHTMLCSSStyleSheet.cpp index a6b9b21cde..769a7dd4eb 100644 --- a/layout/style/nsHTMLCSSStyleSheet.cpp +++ b/layout/style/nsHTMLCSSStyleSheet.cpp @@ -37,7 +37,7 @@ ClearAttrCache(const nsAString& aKey, MiscContainer*& aValue, void*) return PL_DHASH_REMOVE; } -} // anonymous namespace +} // namespace nsHTMLCSSStyleSheet::nsHTMLCSSStyleSheet() { diff --git a/layout/style/nsHTMLCSSStyleSheet.h b/layout/style/nsHTMLCSSStyleSheet.h index ab0715cc9d..f1ecf2fe42 100644 --- a/layout/style/nsHTMLCSSStyleSheet.h +++ b/layout/style/nsHTMLCSSStyleSheet.h @@ -22,8 +22,8 @@ struct MiscContainer; namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla class nsHTMLCSSStyleSheet final : public nsIStyleRuleProcessor { diff --git a/layout/style/nsLayoutStylesheetCache.h b/layout/style/nsLayoutStylesheetCache.h index 9b5287006b..b5c3068575 100644 --- a/layout/style/nsLayoutStylesheetCache.h +++ b/layout/style/nsLayoutStylesheetCache.h @@ -21,8 +21,8 @@ namespace mozilla { class CSSStyleSheet; namespace css { class Loader; -} -} +} // namespace css +} // namespace mozilla class nsLayoutStylesheetCache final : public nsIObserver diff --git a/layout/style/nsStyleConsts.h b/layout/style/nsStyleConsts.h index 2ae7e84e78..1b62ad9418 100644 --- a/layout/style/nsStyleConsts.h +++ b/layout/style/nsStyleConsts.h @@ -17,8 +17,8 @@ namespace mozilla { namespace css { typedef mozilla::Side Side; -} -} +} // namespace css +} // namespace mozilla #define NS_FOR_CSS_SIDES(var_) for (mozilla::css::Side var_ = NS_SIDE_TOP; var_ <= NS_SIDE_LEFT; var_++) static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) { diff --git a/layout/style/nsTransitionManager.h b/layout/style/nsTransitionManager.h index baad6fa547..bbfc2336bd 100644 --- a/layout/style/nsTransitionManager.h +++ b/layout/style/nsTransitionManager.h @@ -22,7 +22,7 @@ struct ElementDependentRuleProcessorData; namespace mozilla { struct StyleTransition; -} +} // namespace mozilla /***************************************************************************** * Per-Element data * diff --git a/layout/svg/SVGTextFrame.h b/layout/svg/SVGTextFrame.h index c35ea3e4f9..3b36b6158a 100644 --- a/layout/svg/SVGTextFrame.h +++ b/layout/svg/SVGTextFrame.h @@ -35,7 +35,7 @@ class TextRenderedRunIterator; namespace dom { class SVGIRect; class SVGPathElement; -} +} // namespace dom /** * Information about the positioning for a single character in an SVG diff --git a/layout/svg/nsFilterInstance.h b/layout/svg/nsFilterInstance.h index d895349b15..5c3780e4e6 100644 --- a/layout/svg/nsFilterInstance.h +++ b/layout/svg/nsFilterInstance.h @@ -28,8 +28,8 @@ class nsSVGFilterPaintCallback; namespace mozilla { namespace dom { class UserSpaceMetrics; -} -} +} // namespace dom +} // namespace mozilla /** * This class performs all filter processing. diff --git a/layout/svg/nsISVGChildFrame.h b/layout/svg/nsISVGChildFrame.h index 3bc59a1632..8ebdb54f78 100644 --- a/layout/svg/nsISVGChildFrame.h +++ b/layout/svg/nsISVGChildFrame.h @@ -27,8 +27,8 @@ class SVGUserUnitList; namespace gfx { class Matrix; -} -} +} // namespace gfx +} // namespace mozilla /** * This class is not particularly well named. It is inherited by some, but diff --git a/layout/svg/nsSVGFilterFrame.h b/layout/svg/nsSVGFilterFrame.h index c83dbb3853..23fe1117a0 100644 --- a/layout/svg/nsSVGFilterFrame.h +++ b/layout/svg/nsSVGFilterFrame.h @@ -25,8 +25,8 @@ struct nsRect; namespace mozilla { namespace dom { class SVGFilterElement; -} -} +} // namespace dom +} // namespace mozilla typedef nsSVGContainerFrame nsSVGFilterFrameBase; diff --git a/layout/svg/nsSVGFilterInstance.h b/layout/svg/nsSVGFilterInstance.h index 0e0394d71e..f955b25776 100644 --- a/layout/svg/nsSVGFilterInstance.h +++ b/layout/svg/nsSVGFilterInstance.h @@ -20,8 +20,8 @@ struct nsStyleFilter; namespace mozilla { namespace dom { class SVGFilterElement; -} -} +} // namespace dom +} // namespace mozilla /** * This class helps nsFilterInstance build its filter graph by processing a diff --git a/layout/svg/nsSVGIntegrationUtils.h b/layout/svg/nsSVGIntegrationUtils.h index 738a1a1324..2efde2e3ae 100644 --- a/layout/svg/nsSVGIntegrationUtils.h +++ b/layout/svg/nsSVGIntegrationUtils.h @@ -24,11 +24,11 @@ struct nsIntRect; namespace mozilla { namespace gfx { class DrawTarget; -} +} // namespace gfx namespace layers { class LayerManager; -} -} +} // namespace layers +} // namespace mozilla struct nsPoint; struct nsSize; diff --git a/layout/svg/nsSVGMarkerFrame.h b/layout/svg/nsSVGMarkerFrame.h index beb35ca46e..0e31c37140 100644 --- a/layout/svg/nsSVGMarkerFrame.h +++ b/layout/svg/nsSVGMarkerFrame.h @@ -21,8 +21,8 @@ class nsSVGPathGeometryFrame; namespace mozilla { namespace dom { class SVGSVGElement; -} -} +} // namespace dom +} // namespace mozilla struct nsSVGMark; diff --git a/layout/svg/nsSVGPaintServerFrame.h b/layout/svg/nsSVGPaintServerFrame.h index 7a63c85b6c..bf0006b3bc 100644 --- a/layout/svg/nsSVGPaintServerFrame.h +++ b/layout/svg/nsSVGPaintServerFrame.h @@ -17,8 +17,8 @@ namespace mozilla { namespace gfx { class DrawTarget; -} -} +} // namespace gfx +} // namespace mozilla class gfxContext; class gfxPattern; diff --git a/layout/svg/nsSVGPathGeometryFrame.h b/layout/svg/nsSVGPathGeometryFrame.h index 9cd1af9e45..144dcd7fde 100644 --- a/layout/svg/nsSVGPathGeometryFrame.h +++ b/layout/svg/nsSVGPathGeometryFrame.h @@ -18,8 +18,8 @@ namespace mozilla { namespace gfx { class DrawTarget; -} -} +} // namespace gfx +} // namespace mozilla class gfxContext; class nsDisplaySVGPathGeometry; diff --git a/layout/xul/BoxObject.h b/layout/xul/BoxObject.h index c22705dd46..6fdc32b0cf 100644 --- a/layout/xul/BoxObject.h +++ b/layout/xul/BoxObject.h @@ -86,7 +86,7 @@ protected: nsIContent* mContent; // [WEAK] }; -} -} +} // namespace dom +} // namespace mozilla #endif diff --git a/layout/xul/ListBoxObject.cpp b/layout/xul/ListBoxObject.cpp index d13c975d21..435065f5b2 100644 --- a/layout/xul/ListBoxObject.cpp +++ b/layout/xul/ListBoxObject.cpp @@ -225,8 +225,8 @@ ListBoxObject::ClearCachedValues() mListBoxBody = nullptr; } -} -} +} // namespace dom +} // namespace mozilla // Creation Routine /////////////////////////////////////////////////////////////////////// diff --git a/layout/xul/nsBoxFrame.h b/layout/xul/nsBoxFrame.h index dc47415173..5e67092c3f 100644 --- a/layout/xul/nsBoxFrame.h +++ b/layout/xul/nsBoxFrame.h @@ -24,8 +24,8 @@ class nsBoxLayoutState; namespace mozilla { namespace gfx { class DrawTarget; -} -} +} // namespace gfx +} // namespace mozilla nsIFrame* NS_NewBoxFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, diff --git a/layout/xul/tree/nsTreeBodyFrame.h b/layout/xul/tree/nsTreeBodyFrame.h index 577f3336ef..311ec6247f 100644 --- a/layout/xul/tree/nsTreeBodyFrame.h +++ b/layout/xul/tree/nsTreeBodyFrame.h @@ -32,8 +32,8 @@ class nsTreeImageListener; namespace mozilla { namespace layout { class ScrollbarActivity; -} -} +} // namespace layout +} // namespace mozilla // An entry in the tree's image cache struct nsTreeImageCacheEntry diff --git a/media/mtransport/simpletokenbucket.h b/media/mtransport/simpletokenbucket.h index 8e7a7800c3..ee94825cbf 100644 --- a/media/mtransport/simpletokenbucket.h +++ b/media/mtransport/simpletokenbucket.h @@ -48,6 +48,7 @@ class SimpleTokenBucket { DISALLOW_COPY_ASSIGN(SimpleTokenBucket); }; + } // namespace mozilla #endif // simpletokenbucket_h__ diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp index c1b9667968..82f86c5dfa 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp @@ -424,4 +424,4 @@ bool PeerConnectionCtx::gmpHasH264() { return true; } -} // namespace mozilla +} // namespace mozilla diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h index f8ea5323ea..2f9ca74e08 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.h @@ -102,6 +102,6 @@ public: static mozilla::StaticRefPtr gPeerConnectionCtxShutdown; }; -} // namespace mozilla +} // namespace mozilla #endif diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp index 3bfe078d2c..a9f997edbe 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp @@ -1223,4 +1223,4 @@ LocalSourceStreamInfo::ForgetPipelineByTrackId_m(const std::string& trackId) return nullptr; } -} // namespace mozilla +} // namespace mozilla diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h index e6c33ad66b..c04926aeb5 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.h @@ -513,5 +513,6 @@ class PeerConnectionMedia : public sigslot::has_slots<> { NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PeerConnectionMedia) }; -} // namespace mozilla +} // namespace mozilla + #endif diff --git a/memory/build/replace_malloc_bridge.h b/memory/build/replace_malloc_bridge.h index 8163439251..20dd4ab3e9 100644 --- a/memory/build/replace_malloc_bridge.h +++ b/memory/build/replace_malloc_bridge.h @@ -60,7 +60,7 @@ extern "C" MFBT_API ReplaceMallocBridge* get_bridge(); namespace mozilla { namespace dmd { struct DMDFuncs; -} +} // namespace dmd /* Callbacks to register debug file handles for Poison IO interpose. * See Mozilla(|Un)RegisterDebugHandle in xpcom/build/PoisonIOInterposer.h */ diff --git a/memory/fallible/fallible.cpp b/memory/fallible/fallible.cpp index f083fe674d..5a449bc80e 100644 --- a/memory/fallible/fallible.cpp +++ b/memory/fallible/fallible.cpp @@ -8,4 +8,4 @@ namespace mozilla { const fallible_t fallible = {}; -} +} // namespace mozilla diff --git a/memory/fallible/fallible.h b/memory/fallible/fallible.h index 0ae5d56dcf..c028360b14 100644 --- a/memory/fallible/fallible.h +++ b/memory/fallible/fallible.h @@ -62,6 +62,7 @@ struct fallible_t { }; extern const fallible_t fallible; } // namespace mozilla + #endif #endif // mozilla_fallible_h diff --git a/memory/mozalloc/msvc_raise_wrappers.cpp b/memory/mozalloc/msvc_raise_wrappers.cpp index 1675f96ca6..45cb481ec3 100644 --- a/memory/mozalloc/msvc_raise_wrappers.cpp +++ b/memory/mozalloc/msvc_raise_wrappers.cpp @@ -61,4 +61,4 @@ moz_Xruntime_error(const char* what) abort_from_exception("runtime_error", what); } -} // namespace std +} // namespace std diff --git a/memory/mozalloc/msvc_throw_wrapper.cpp b/memory/mozalloc/msvc_throw_wrapper.cpp index 14c3692b17..d00602c475 100644 --- a/memory/mozalloc/msvc_throw_wrapper.cpp +++ b/memory/mozalloc/msvc_throw_wrapper.cpp @@ -27,4 +27,4 @@ mozilla_Throw(const exception& e) mozalloc_abort(e.what()); } -} // namespace std +} // namespace std diff --git a/memory/replace/dmd/DMD.cpp b/memory/replace/dmd/DMD.cpp index 2802b17ec0..ba104dd38b 100644 --- a/memory/replace/dmd/DMD.cpp +++ b/memory/replace/dmd/DMD.cpp @@ -1193,8 +1193,8 @@ FreeCallback(void* aPtr, Thread* aT, DeadBlock* aDeadBlock) static void Init(const malloc_table_t* aMallocTable); -} // namespace dmd -} // namespace mozilla +} // namespace dmd +} // namespace mozilla void replace_init(const malloc_table_t* aMallocTable) @@ -1991,5 +1991,5 @@ DMDFuncs::ResetEverything(const char* aOptions) gSmallBlockActualSizeCounter = 0; } -} // namespace dmd -} // namespace mozilla +} // namespace dmd +} // namespace mozilla diff --git a/memory/volatile/VolatileBuffer.h b/memory/volatile/VolatileBuffer.h index ab064d9610..afb075c725 100644 --- a/memory/volatile/VolatileBuffer.h +++ b/memory/volatile/VolatileBuffer.h @@ -164,6 +164,6 @@ private: VolatileBufferPtr(VolatileBufferPtr const& vbufptr) = delete; }; -}; /* namespace mozilla */ +} // namespace mozilla #endif /* mozalloc_VolatileBuffer_h */ diff --git a/mfbt/DebugOnly.h b/mfbt/DebugOnly.h index 0243c3f399..67d963cf1d 100644 --- a/mfbt/DebugOnly.h +++ b/mfbt/DebugOnly.h @@ -82,6 +82,6 @@ public: ~DebugOnly() {} }; -} +} // namespace mozilla #endif /* mozilla_DebugOnly_h */ diff --git a/mfbt/JSONWriter.h b/mfbt/JSONWriter.h index ff5774fc5f..30c553e6ec 100644 --- a/mfbt/JSONWriter.h +++ b/mfbt/JSONWriter.h @@ -116,7 +116,7 @@ public: // on Linux that caused link errors, whereas this formulation didn't. namespace detail { extern MFBT_DATA const char gTwoCharEscapes[256]; -} +} // namespace detail class JSONWriter { diff --git a/mfbt/NullPtr.h b/mfbt/NullPtr.h index 849b1a2ef8..d2248f4bcc 100644 --- a/mfbt/NullPtr.h +++ b/mfbt/NullPtr.h @@ -26,6 +26,6 @@ struct IsNullPointer : FalseType {}; template<> struct IsNullPointer : TrueType {}; -} +} // namespace mozilla #endif /* mozilla_NullPtr_h */ diff --git a/mfbt/TypeTraits.h b/mfbt/TypeTraits.h index df21a71343..f1c67d26f2 100644 --- a/mfbt/TypeTraits.h +++ b/mfbt/TypeTraits.h @@ -1041,7 +1041,7 @@ struct RemovePointerHelper typedef Pointee Type; }; -} // namespac detail +} // namespace detail /** * Produces the pointed-to type if a pointer is provided, else returns the input diff --git a/mfbt/TypedEnumBits.h b/mfbt/TypedEnumBits.h index 8f11b8d6fe..642630c50f 100644 --- a/mfbt/TypedEnumBits.h +++ b/mfbt/TypedEnumBits.h @@ -118,7 +118,7 @@ template struct UnsignedIntegerTypeForEnum : UnsignedStdintTypeForSize {}; -} +} // namespace detail } // namespace mozilla diff --git a/mfbt/decimal/Decimal.h b/mfbt/decimal/Decimal.h index 8c57d44ddc..b36a9f257c 100644 --- a/mfbt/decimal/Decimal.h +++ b/mfbt/decimal/Decimal.h @@ -58,7 +58,7 @@ namespace WebCore { namespace DecimalPrivate { class SpecialValueHandler; -} +} // namespace DecimalPrivate // This class represents decimal base floating point number. // @@ -200,7 +200,7 @@ private: namespace mozilla { typedef WebCore::Decimal Decimal; -} +} // namespace mozilla #undef WTF_MAKE_FAST_ALLOCATED diff --git a/mfbt/decimal/moz-decimal-utils.h b/mfbt/decimal/moz-decimal-utils.h index a13152d5e7..d05447c1b4 100644 --- a/mfbt/decimal/moz-decimal-utils.h +++ b/mfbt/decimal/moz-decimal-utils.h @@ -106,7 +106,7 @@ private: std::string mStr; }; -} // namespace moz-decimal-utils +} // namespace moz_decimal_utils #endif diff --git a/mfbt/unused.cpp b/mfbt/unused.cpp index ea97ef80c7..cee781c4cb 100644 --- a/mfbt/unused.cpp +++ b/mfbt/unused.cpp @@ -10,4 +10,4 @@ namespace mozilla { const unused_t unused = unused_t(); -} // namespace mozilla +} // namespace mozilla diff --git a/mfbt/unused.h b/mfbt/unused.h index 443b7024b4..cec1f6da0d 100644 --- a/mfbt/unused.h +++ b/mfbt/unused.h @@ -27,6 +27,6 @@ operator<<(const unused_t& /*unused*/, const T& /*unused*/) { } -} +} // namespace mozilla #endif // mozilla_unused_h diff --git a/modules/libpref/Preferences.cpp b/modules/libpref/Preferences.cpp index 734b2bbe84..d270b7505a 100644 --- a/modules/libpref/Preferences.cpp +++ b/modules/libpref/Preferences.cpp @@ -392,7 +392,7 @@ class AddPreferencesMemoryReporterRunnable : public nsRunnable return RegisterStrongMemoryReporter(new PreferenceServiceReporter()); } }; -} // anonymous namespace +} // namespace // static Preferences* diff --git a/modules/libpref/Preferences.h b/modules/libpref/Preferences.h index 4a8f03e369..d2b03b768c 100644 --- a/modules/libpref/Preferences.h +++ b/modules/libpref/Preferences.h @@ -34,7 +34,7 @@ namespace mozilla { namespace dom { class PrefSetting; -} +} // namespace dom class Preferences final : public nsIPrefService, public nsIObserver, diff --git a/modules/libpref/nsPrefBranch.h b/modules/libpref/nsPrefBranch.h index 0805197f57..e1123c80c4 100644 --- a/modules/libpref/nsPrefBranch.h +++ b/modules/libpref/nsPrefBranch.h @@ -26,7 +26,7 @@ namespace mozilla { class PreferenceServiceReporter; -} // namespace mozilla; +} // namespace mozilla class nsPrefBranch; @@ -175,9 +175,9 @@ class PrefCallback : public PLDHashEntryHdr { } }; -class nsPrefBranch : public nsIPrefBranchInternal, - public nsIObserver, - public nsSupportsWeakReference +class nsPrefBranch final : public nsIPrefBranchInternal, + public nsIObserver, + public nsSupportsWeakReference { friend class mozilla::PreferenceServiceReporter; public: @@ -228,8 +228,8 @@ private: }; -class nsPrefLocalizedString : public nsIPrefLocalizedString, - public nsISupportsString +class nsPrefLocalizedString final : public nsIPrefLocalizedString, + public nsISupportsString { public: nsPrefLocalizedString(); diff --git a/modules/libpref/prefapi_private_data.h b/modules/libpref/prefapi_private_data.h index c17d5a06e5..646c0292fc 100644 --- a/modules/libpref/prefapi_private_data.h +++ b/modules/libpref/prefapi_private_data.h @@ -16,8 +16,8 @@ extern bool gDirty; namespace mozilla { namespace dom { class PrefSetting; -} -} +} // namespace dom +} // namespace mozilla enum pref_SaveTypes { SAVE_NONSHARED, SAVE_SHARED, SAVE_ALL, SAVE_ALL_AND_DEFAULTS }; diff --git a/mozglue/build/SSE.cpp b/mozglue/build/SSE.cpp index d203dd9e6d..d88176aca1 100644 --- a/mozglue/build/SSE.cpp +++ b/mozglue/build/SSE.cpp @@ -124,7 +124,7 @@ has_cpuid_bits(unsigned int level, CPUIDRegister reg, unsigned int bits) #endif // end CPUID declarations -} +} // namespace namespace mozilla { diff --git a/mozglue/build/SSE.h b/mozglue/build/SSE.h index 2054647801..c68c1f609d 100644 --- a/mozglue/build/SSE.h +++ b/mozglue/build/SSE.h @@ -215,7 +215,7 @@ namespace mozilla { #endif - } + } // namespace sse_private #if defined(MOZILLA_PRESUME_MMX) #define MOZILLA_MAY_SUPPORT_MMX 1 @@ -322,6 +322,6 @@ namespace mozilla { #endif -} +} // namespace mozilla #endif /* !defined(mozilla_SSE_h_) */ diff --git a/mozglue/build/WindowsDllBlocklist.cpp b/mozglue/build/WindowsDllBlocklist.cpp index 35806713cf..e4eda09c99 100644 --- a/mozglue/build/WindowsDllBlocklist.cpp +++ b/mozglue/build/WindowsDllBlocklist.cpp @@ -693,7 +693,7 @@ continue_loading: WindowsDllInterceptor NtDllIntercept; -} // anonymous namespace +} // namespace NS_EXPORT void DllBlocklist_Initialize() diff --git a/mozglue/build/arm.h b/mozglue/build/arm.h index 6fe410d0f4..d09d7cc07d 100644 --- a/mozglue/build/arm.h +++ b/mozglue/build/arm.h @@ -116,7 +116,7 @@ namespace mozilla { extern bool MFBT_DATA neon_enabled; #endif #endif - } + } // namespace arm_private #if defined(MOZILLA_PRESUME_EDSP) # define MOZILLA_MAY_SUPPORT_EDSP 1 @@ -158,6 +158,6 @@ namespace mozilla { inline bool supports_neon() { return false; } #endif -} +} // namespace mozilla #endif /* !defined(mozilla_arm_h_) */ diff --git a/netwerk/base/AutoClose.h b/netwerk/base/AutoClose.h index e26960e84c..9e8dc8278c 100644 --- a/netwerk/base/AutoClose.h +++ b/netwerk/base/AutoClose.h @@ -71,6 +71,7 @@ private: Mutex mMutex; }; -} } // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // mozilla_net_AutoClose_h diff --git a/netwerk/base/BackgroundFileSaver.h b/netwerk/base/BackgroundFileSaver.h index 0e236e1089..8b3fb6d0a9 100644 --- a/netwerk/base/BackgroundFileSaver.h +++ b/netwerk/base/BackgroundFileSaver.h @@ -329,8 +329,8 @@ private: //// BackgroundFileSaverStreamListener. This class is instantiated by // nsExternalHelperAppService, DownloadCore.jsm, and possibly others. -class BackgroundFileSaverStreamListener : public BackgroundFileSaver - , public nsIStreamListener +class BackgroundFileSaverStreamListener final : public BackgroundFileSaver + , public nsIStreamListener { public: NS_DECL_THREADSAFE_ISUPPORTS @@ -404,6 +404,7 @@ private: // Don't accidentally copy construct. DigestOutputStream(const DigestOutputStream& d); }; + } // namespace net } // namespace mozilla diff --git a/netwerk/base/Dashboard.cpp b/netwerk/base/Dashboard.cpp index e8443606eb..d07fa6ce5b 100644 --- a/netwerk/base/Dashboard.cpp +++ b/netwerk/base/Dashboard.cpp @@ -919,4 +919,5 @@ GetErrorString(nsresult rv, nsAString& errorString) CopyUTF8toUTF16(errorCString, errorString); } -} } // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/Dashboard.h b/netwerk/base/Dashboard.h index 9ff64f3c3a..bd89b3437f 100644 --- a/netwerk/base/Dashboard.h +++ b/netwerk/base/Dashboard.h @@ -27,7 +27,7 @@ class DnsData; class WebSocketRequest; class ConnectionData; -class Dashboard +class Dashboard final : public nsIDashboard , public nsIDashboardEventNotifier { @@ -101,5 +101,7 @@ private: nsCOMPtr mDnsService; }; -} } // namespace mozilla::net +} // namespace net +} // namespace mozilla + #endif // nsDashboard_h__ diff --git a/netwerk/base/DashboardTypes.h b/netwerk/base/DashboardTypes.h index 1a1e2fd5f0..3f1f30d16b 100644 --- a/netwerk/base/DashboardTypes.h +++ b/netwerk/base/DashboardTypes.h @@ -57,6 +57,7 @@ struct HttpRetParams bool ssl; }; -} } +} // namespace net +} // namespace mozilla #endif // mozilla_net_DashboardTypes_h_ diff --git a/netwerk/base/EventTokenBucket.cpp b/netwerk/base/EventTokenBucket.cpp index 7871470544..b28a72247c 100644 --- a/netwerk/base/EventTokenBucket.cpp +++ b/netwerk/base/EventTokenBucket.cpp @@ -434,5 +434,5 @@ EventTokenBucket::FineGrainResetTimerNotify() #endif -} // mozilla::net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/EventTokenBucket.h b/netwerk/base/EventTokenBucket.h index 9c0ad458a7..eba7552514 100644 --- a/netwerk/base/EventTokenBucket.h +++ b/netwerk/base/EventTokenBucket.h @@ -141,7 +141,7 @@ private: #endif }; -} // ::mozilla::net -} // ::mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/base/LoadContextInfo.cpp b/netwerk/base/LoadContextInfo.cpp index 1f27489d86..e4a1794573 100644 --- a/netwerk/base/LoadContextInfo.cpp +++ b/netwerk/base/LoadContextInfo.cpp @@ -111,5 +111,5 @@ GetLoadContextInfo(bool const aIsPrivate, aIsAnonymous); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/LoadContextInfo.h b/netwerk/base/LoadContextInfo.h index d8009f8dff..0432743b80 100644 --- a/netwerk/base/LoadContextInfo.h +++ b/netwerk/base/LoadContextInfo.h @@ -47,7 +47,7 @@ GetLoadContextInfo(bool const aIsPrivate = false, bool const aIsInBrowserElement = false, bool const aIsAnonymous = false); -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/base/NetworkActivityMonitor.h b/netwerk/base/NetworkActivityMonitor.h index eabcf76296..28c9a911e3 100644 --- a/netwerk/base/NetworkActivityMonitor.h +++ b/netwerk/base/NetworkActivityMonitor.h @@ -40,6 +40,7 @@ private: PRIntervalTime mLastNotificationTime[2]; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif /* NetworkActivityMonitor_h___ */ diff --git a/netwerk/base/OfflineObserver.cpp b/netwerk/base/OfflineObserver.cpp index 14a65863e2..1cdc838ea7 100644 --- a/netwerk/base/OfflineObserver.cpp +++ b/netwerk/base/OfflineObserver.cpp @@ -114,5 +114,5 @@ DisconnectableParent::OfflineNotification(nsISupports *aSubject) return NS_OK; } -} // net namespace -} // mozilla namespace +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/OfflineObserver.h b/netwerk/base/OfflineObserver.h index bcddd6f65c..02e52e1ffd 100644 --- a/netwerk/base/OfflineObserver.h +++ b/netwerk/base/OfflineObserver.h @@ -67,7 +67,7 @@ private: DisconnectableParent * mParent; }; -} // net namespace -} // mozilla namespace +} // namespace net +} // namespace mozilla #endif // nsOfflineObserver_h__ diff --git a/netwerk/base/Predictor.cpp b/netwerk/base/Predictor.cpp index 1b0dd4d1bc..d2246908a6 100644 --- a/netwerk/base/Predictor.cpp +++ b/netwerk/base/Predictor.cpp @@ -493,7 +493,7 @@ class NuwaMarkPredictorThreadRunner : public nsRunnable return NS_OK; } }; -} // anon namespace +} // namespace #endif // Predictor::nsICacheEntryMetaDataVisitor @@ -666,7 +666,8 @@ private: nsCOMPtr mIOThread; nsCOMPtr mDBFile; }; -} // anon namespace + +} // namespace void Predictor::MaybeCleanupOldDBFiles() @@ -1873,5 +1874,5 @@ PredictorLearnRedirect(nsIURI *targetURI, nsIChannel *channel, loadContext); } -} // ::mozilla::net -} // ::mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/Predictor.h b/netwerk/base/Predictor.h index f9af609325..720c418022 100644 --- a/netwerk/base/Predictor.h +++ b/netwerk/base/Predictor.h @@ -360,7 +360,7 @@ private: static Predictor *sSelf; }; -} // ::mozilla::net -} // ::mozilla +} // namespace net +} // namespace mozilla #endif // mozilla_net_Predictor_h diff --git a/netwerk/base/PrivateBrowsingChannel.h b/netwerk/base/PrivateBrowsingChannel.h index 102e5ccc7a..6db06050c2 100644 --- a/netwerk/base/PrivateBrowsingChannel.h +++ b/netwerk/base/PrivateBrowsingChannel.h @@ -98,8 +98,8 @@ protected: bool mPrivateBrowsing; }; -} -} +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/base/ProxyAutoConfig.cpp b/netwerk/base/ProxyAutoConfig.cpp index 8d907b56e3..46a48436f1 100644 --- a/netwerk/base/ProxyAutoConfig.cpp +++ b/netwerk/base/ProxyAutoConfig.cpp @@ -928,5 +928,5 @@ ProxyAutoConfig::MyIPAddress(const JS::CallArgs &aArgs) return true; } +} // namespace net } // namespace mozilla -} // namespace mozilla::net diff --git a/netwerk/base/ProxyAutoConfig.h b/netwerk/base/ProxyAutoConfig.h index 1245e4318b..7e93ed9111 100644 --- a/netwerk/base/ProxyAutoConfig.h +++ b/netwerk/base/ProxyAutoConfig.h @@ -13,7 +13,7 @@ class nsITimer; namespace JS { class CallArgs; -} +} // namespace JS namespace mozilla { namespace net { @@ -96,6 +96,7 @@ private: nsCOMPtr mTimer; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // ProxyAutoConfig_h__ diff --git a/netwerk/base/RedirectChannelRegistrar.cpp b/netwerk/base/RedirectChannelRegistrar.cpp index 49904c6615..c33b6ddf46 100644 --- a/netwerk/base/RedirectChannelRegistrar.cpp +++ b/netwerk/base/RedirectChannelRegistrar.cpp @@ -72,5 +72,5 @@ RedirectChannelRegistrar::DeregisterChannels(uint32_t id) return NS_OK; } -} -} +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/RedirectChannelRegistrar.h b/netwerk/base/RedirectChannelRegistrar.h index 148d3e8b86..333389d671 100644 --- a/netwerk/base/RedirectChannelRegistrar.h +++ b/netwerk/base/RedirectChannelRegistrar.h @@ -36,7 +36,7 @@ protected: uint32_t mId; }; -} -} +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/base/ReferrerPolicy.h b/netwerk/base/ReferrerPolicy.h index 5e223ffc90..5bf126f838 100644 --- a/netwerk/base/ReferrerPolicy.h +++ b/netwerk/base/ReferrerPolicy.h @@ -71,6 +71,7 @@ IsValidReferrerPolicy(const nsAString& content) || content.LowerCaseEqualsLiteral("unsafe-url"); } -} } //namespace mozilla::net +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/base/StreamingProtocolService.h b/netwerk/base/StreamingProtocolService.h index 69b9f9d315..96d51fe5c4 100644 --- a/netwerk/base/StreamingProtocolService.h +++ b/netwerk/base/StreamingProtocolService.h @@ -29,7 +29,8 @@ public: StreamingProtocolControllerService() {}; static already_AddRefed GetInstance(); }; -} // namespace dom + +} // namespace net } // namespace mozilla #endif //mozilla_net_StreamingProtocolControllerService_h diff --git a/netwerk/base/TLSServerSocket.cpp b/netwerk/base/TLSServerSocket.cpp index b1fc5fa9de..94e888fb37 100644 --- a/netwerk/base/TLSServerSocket.cpp +++ b/netwerk/base/TLSServerSocket.cpp @@ -282,7 +282,7 @@ TLSServerSecurityObserverProxy::OnHandshakeDoneRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace NS_IMPL_ISUPPORTS(TLSServerConnectionInfo, nsITLSServerConnectionInfo, diff --git a/netwerk/base/TLSServerSocket.h b/netwerk/base/TLSServerSocket.h index 179873e0a9..83d392e50e 100644 --- a/netwerk/base/TLSServerSocket.h +++ b/netwerk/base/TLSServerSocket.h @@ -16,8 +16,8 @@ namespace mozilla { namespace net { -class TLSServerSocket : public nsServerSocket - , public nsITLSServerSocket +class TLSServerSocket final : public nsServerSocket + , public nsITLSServerSocket { public: NS_DECL_ISUPPORTS_INHERITED diff --git a/netwerk/base/Tickler.cpp b/netwerk/base/Tickler.cpp index ba5d6eeffe..95c7fd3f57 100644 --- a/netwerk/base/Tickler.cpp +++ b/netwerk/base/Tickler.cpp @@ -291,7 +291,7 @@ NS_IMETHODIMP TicklerTimer::Notify(nsITimer *timer) namespace mozilla { namespace net { NS_IMPL_ISUPPORTS0(Tickler) -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // defined MOZ_USE_WIFI_TICKLER diff --git a/netwerk/base/Tickler.h b/netwerk/base/Tickler.h index f199cd4d2e..573fe6e762 100644 --- a/netwerk/base/Tickler.h +++ b/netwerk/base/Tickler.h @@ -125,7 +125,7 @@ public: #endif // defined MOZ_USE_WIFI_TICKLER -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // mozilla_net_Tickler_h diff --git a/netwerk/base/nsBufferedStreams.h b/netwerk/base/nsBufferedStreams.h index b40ca0dbf3..93a770bebf 100644 --- a/netwerk/base/nsBufferedStreams.h +++ b/netwerk/base/nsBufferedStreams.h @@ -88,10 +88,10 @@ protected: //////////////////////////////////////////////////////////////////////////////// -class nsBufferedOutputStream : public nsBufferedStream, - public nsISafeOutputStream, - public nsIBufferedOutputStream, - public nsIStreamBufferAccess +class nsBufferedOutputStream final : public nsBufferedStream, + public nsISafeOutputStream, + public nsIBufferedOutputStream, + public nsIStreamBufferAccess { public: NS_DECL_ISUPPORTS_INHERITED diff --git a/netwerk/base/nsIOService.cpp b/netwerk/base/nsIOService.cpp index 5470b8e3dd..99b97cfbca 100644 --- a/netwerk/base/nsIOService.cpp +++ b/netwerk/base/nsIOService.cpp @@ -1603,7 +1603,7 @@ private: int32_t mState; }; -} +} // namespace NS_IMETHODIMP nsIOService::SetAppOffline(uint32_t aAppId, int32_t aState) diff --git a/netwerk/base/nsMediaFragmentURIParser.cpp b/netwerk/base/nsMediaFragmentURIParser.cpp index 904b17ab61..3b20f53281 100644 --- a/netwerk/base/nsMediaFragmentURIParser.cpp +++ b/netwerk/base/nsMediaFragmentURIParser.cpp @@ -406,4 +406,5 @@ void nsMediaFragmentURIParser::Parse(nsACString& aRef) } } -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/nsMediaFragmentURIParser.h b/netwerk/base/nsMediaFragmentURIParser.h index cb324f8208..01c9872eb6 100644 --- a/netwerk/base/nsMediaFragmentURIParser.h +++ b/netwerk/base/nsMediaFragmentURIParser.h @@ -107,6 +107,7 @@ private: Maybe mSampleSize; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/base/nsNetUtil.h b/netwerk/base/nsNetUtil.h index 48dce564c5..9b9aea433b 100644 --- a/netwerk/base/nsNetUtil.h +++ b/netwerk/base/nsNetUtil.h @@ -2875,7 +2875,7 @@ InScriptableRange(uint64_t val) return val <= kJS_MAX_SAFE_UINTEGER; } +} // namespace net } // namespace mozilla -} // namespace mozilla::net #endif // !nsNetUtil_h__ diff --git a/netwerk/base/nsPACMan.cpp b/netwerk/base/nsPACMan.cpp index 5e6fbe69b2..2006c3a444 100644 --- a/netwerk/base/nsPACMan.cpp +++ b/netwerk/base/nsPACMan.cpp @@ -760,5 +760,5 @@ GetProxyLog() return sLog; } -} -} +} // namespace net +} // namespace mozilla diff --git a/netwerk/base/nsPACMan.h b/netwerk/base/nsPACMan.h index 953dd10584..5b2d902ea7 100644 --- a/netwerk/base/nsPACMan.h +++ b/netwerk/base/nsPACMan.h @@ -228,7 +228,7 @@ private: namespace mozilla { namespace net { PRLogModuleInfo* GetProxyLog(); -} -} +} // namespace net +} // namespace mozilla #endif // nsPACMan_h__ diff --git a/netwerk/base/nsProtocolProxyService.cpp b/netwerk/base/nsProtocolProxyService.cpp index 1a749fadf2..4f565f1c7e 100644 --- a/netwerk/base/nsProtocolProxyService.cpp +++ b/netwerk/base/nsProtocolProxyService.cpp @@ -42,7 +42,7 @@ namespace mozilla { extern const char kProxyType_SOCKS4[]; extern const char kProxyType_SOCKS5[]; extern const char kProxyType_DIRECT[]; -} +} // namespace mozilla using namespace mozilla; @@ -773,7 +773,7 @@ const char kProxyType_SOCKS[] = "socks"; const char kProxyType_SOCKS4[] = "socks4"; const char kProxyType_SOCKS5[] = "socks5"; const char kProxyType_DIRECT[] = "direct"; -} +} // namespace mozilla const char * nsProtocolProxyService::ExtractProxyInfo(const char *start, diff --git a/netwerk/base/nsProxyInfo.cpp b/netwerk/base/nsProxyInfo.cpp index 3211384e13..70a2581da6 100644 --- a/netwerk/base/nsProxyInfo.cpp +++ b/netwerk/base/nsProxyInfo.cpp @@ -94,7 +94,7 @@ namespace mozilla { extern const char kProxyType_SOCKS4[]; extern const char kProxyType_SOCKS5[]; extern const char kProxyType_DIRECT[]; -} +} // namespace mozilla bool nsProxyInfo::IsDirect() diff --git a/netwerk/base/nsServerSocket.cpp b/netwerk/base/nsServerSocket.cpp index 66eabc65d4..82b341b9d2 100644 --- a/netwerk/base/nsServerSocket.cpp +++ b/netwerk/base/nsServerSocket.cpp @@ -511,7 +511,7 @@ ServerSocketListenerProxy::OnStopListeningRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace NS_IMETHODIMP nsServerSocket::AsyncListen(nsIServerSocketListener *aListener) diff --git a/netwerk/base/nsServerSocket.h b/netwerk/base/nsServerSocket.h index 4bedeb28e6..8ca39a5a0b 100644 --- a/netwerk/base/nsServerSocket.h +++ b/netwerk/base/nsServerSocket.h @@ -16,7 +16,8 @@ class nsIEventTarget; namespace mozilla { namespace net { union NetAddr; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla class nsServerSocket : public nsASocketHandler , public nsIServerSocket diff --git a/netwerk/base/nsSocketTransportService2.h b/netwerk/base/nsSocketTransportService2.h index 6536bc9fe9..8d3c0bf397 100644 --- a/netwerk/base/nsSocketTransportService2.h +++ b/netwerk/base/nsSocketTransportService2.h @@ -52,8 +52,8 @@ static const int32_t kDefaultTCPKeepCount = #else 4; // Specifiable in Linux. #endif -} -} +} // namespace net +} // namespace mozilla //----------------------------------------------------------------------------- diff --git a/netwerk/base/nsUDPSocket.cpp b/netwerk/base/nsUDPSocket.cpp index 7691a4cd9a..b00090fce8 100644 --- a/netwerk/base/nsUDPSocket.cpp +++ b/netwerk/base/nsUDPSocket.cpp @@ -1147,7 +1147,7 @@ SendRequestRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace NS_IMETHODIMP nsUDPSocket::AsyncListen(nsIUDPSocketListener *aListener) diff --git a/netwerk/build/nsNetModule.cpp b/netwerk/build/nsNetModule.cpp index 63d31b39ca..182aab00d9 100644 --- a/netwerk/build/nsNetModule.cpp +++ b/netwerk/build/nsNetModule.cpp @@ -245,8 +245,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpChannelAuthProvider) NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpActivityDistributor) NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpBasicAuth) NS_GENERIC_FACTORY_CONSTRUCTOR(nsHttpDigestAuth) -} -} +} // namespace net +} // namespace mozilla #endif // !NECKO_PROTOCOL_http #include "mozilla/net/Dashboard.h" @@ -326,7 +326,7 @@ type##Constructor(nsISupports *aOuter, REFNSIID aIID, \ WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketChannel, false) WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true) #undef WEB_SOCKET_HANDLER_CONSTRUCTOR -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif diff --git a/netwerk/cache/nsApplicationCacheService.cpp b/netwerk/cache/nsApplicationCacheService.cpp index 9c8034088d..a8d4144957 100644 --- a/netwerk/cache/nsApplicationCacheService.cpp +++ b/netwerk/cache/nsApplicationCacheService.cpp @@ -236,7 +236,7 @@ private: NS_IMPL_ISUPPORTS(AppCacheClearDataObserver, nsIObserver) -} // anonymous namespace +} // namespace // Instantiates and registers AppCacheClearDataObserver for notifications void diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index f1e62ca080..d1c18e2eec 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -1361,7 +1361,7 @@ EvictionNotifierRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace nsresult nsCacheService::EvictEntriesForClient(const char * clientID, diff --git a/netwerk/cache/nsDiskCacheDeviceSQL.cpp b/netwerk/cache/nsDiskCacheDeviceSQL.cpp index 3721af5785..9c7445020c 100644 --- a/netwerk/cache/nsDiskCacheDeviceSQL.cpp +++ b/netwerk/cache/nsDiskCacheDeviceSQL.cpp @@ -1325,7 +1325,7 @@ GetJARIdentifier(nsIURI *aURI, return AppendJARIdentifier(_result, appId, isInBrowserElement); } -} // anon namespace +} // namespace // static nsresult diff --git a/netwerk/cache2/AppCacheStorage.cpp b/netwerk/cache2/AppCacheStorage.cpp index 6f54347cb6..c3af478f32 100644 --- a/netwerk/cache2/AppCacheStorage.cpp +++ b/netwerk/cache2/AppCacheStorage.cpp @@ -180,5 +180,5 @@ NS_IMETHODIMP AppCacheStorage::AsyncVisitStorage(nsICacheStorageVisitor* aVisito return NS_OK; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/AppCacheStorage.h b/netwerk/cache2/AppCacheStorage.h index 43594c298c..eef70dea08 100644 --- a/netwerk/cache2/AppCacheStorage.h +++ b/netwerk/cache2/AppCacheStorage.h @@ -31,7 +31,7 @@ private: nsCOMPtr mAppCache; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheEntry.cpp b/netwerk/cache2/CacheEntry.cpp index ee39ecc711..902142a4c3 100644 --- a/netwerk/cache2/CacheEntry.cpp +++ b/netwerk/cache2/CacheEntry.cpp @@ -1671,5 +1671,5 @@ size_t CacheEntry::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheEntry.h b/netwerk/cache2/CacheEntry.h index ce8d00384a..d0143d8250 100644 --- a/netwerk/cache2/CacheEntry.h +++ b/netwerk/cache2/CacheEntry.h @@ -388,7 +388,7 @@ private: nsRefPtr mEntry; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFile.cpp b/netwerk/cache2/CacheFile.cpp index aa74111893..a9e196d64f 100644 --- a/netwerk/cache2/CacheFile.cpp +++ b/netwerk/cache2/CacheFile.cpp @@ -1952,7 +1952,7 @@ CacheFile::InitIndexEntry() // Memory reporting -namespace { // anon +namespace { size_t CollectChunkSize(uint32_t const & aIdx, @@ -1962,7 +1962,7 @@ CollectChunkSize(uint32_t const & aIdx, return aChunk->SizeOfIncludingThis(mallocSizeOf); } -} // anon +} // namespace size_t CacheFile::SizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const @@ -2003,5 +2003,5 @@ CacheFile::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheFile.h b/netwerk/cache2/CacheFile.h index b82d349c2c..21e8281dd5 100644 --- a/netwerk/cache2/CacheFile.h +++ b/netwerk/cache2/CacheFile.h @@ -44,9 +44,9 @@ public: NS_DEFINE_STATIC_IID_ACCESSOR(CacheFileListener, CACHEFILELISTENER_IID) -class CacheFile : public CacheFileChunkListener - , public CacheFileIOListener - , public CacheFileMetadataListener +class CacheFile final : public CacheFileChunkListener + , public CacheFileIOListener + , public CacheFileMetadataListener { public: NS_DECL_THREADSAFE_ISUPPORTS @@ -250,7 +250,7 @@ private: bool mLocked; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFileChunk.cpp b/netwerk/cache2/CacheFileChunk.cpp index 0f9a617bc3..0ad7ad3986 100644 --- a/netwerk/cache2/CacheFileChunk.cpp +++ b/netwerk/cache2/CacheFileChunk.cpp @@ -780,5 +780,5 @@ mozilla::Atomic& CacheFileChunk::ChunksMemoryUsage() return mIsPriority ? prioChunksMemoryUsage : chunksMemoryUsage; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheFileChunk.h b/netwerk/cache2/CacheFileChunk.h index 2f7d39f378..efa6bd70f7 100644 --- a/netwerk/cache2/CacheFileChunk.h +++ b/netwerk/cache2/CacheFileChunk.h @@ -158,7 +158,7 @@ private: }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFileContextEvictor.cpp b/netwerk/cache2/CacheFileContextEvictor.cpp index c4980f07c1..94683ed5a2 100644 --- a/netwerk/cache2/CacheFileContextEvictor.cpp +++ b/netwerk/cache2/CacheFileContextEvictor.cpp @@ -595,5 +595,5 @@ CacheFileContextEvictor::EvictEntries() return NS_OK; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheFileContextEvictor.h b/netwerk/cache2/CacheFileContextEvictor.h index 1ab2167f48..bf8111547f 100644 --- a/netwerk/cache2/CacheFileContextEvictor.h +++ b/netwerk/cache2/CacheFileContextEvictor.h @@ -88,7 +88,7 @@ private: nsCOMPtr mEntriesDir; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFileIOManager.cpp b/netwerk/cache2/CacheFileIOManager.cpp index e4676da4c0..f2aa847bf4 100644 --- a/netwerk/cache2/CacheFileIOManager.cpp +++ b/netwerk/cache2/CacheFileIOManager.cpp @@ -2693,7 +2693,7 @@ EvictionNotifierRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace nsresult CacheFileIOManager::EvictAllInternal() @@ -3818,7 +3818,7 @@ CacheFileIOManager::UpdateSmartCacheSize(int64_t aFreeSpace) // Memory reporting -namespace { // anon +namespace { // A helper class that dispatches and waits for an event that gets result of // CacheFileIOManager->mHandles.SizeOfExcludingThis() on the I/O thread @@ -3879,7 +3879,7 @@ private: size_t mSize; }; -} // anon +} // namespace size_t CacheFileIOManager::SizeOfExcludingThisInternal(mozilla::MallocSizeOf mallocSizeOf) const @@ -3939,5 +3939,5 @@ CacheFileIOManager::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) return mallocSizeOf(gInstance) + SizeOfExcludingThis(mallocSizeOf); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheFileIOManager.h b/netwerk/cache2/CacheFileIOManager.h index 1355dc631c..389c2b95a0 100644 --- a/netwerk/cache2/CacheFileIOManager.h +++ b/netwerk/cache2/CacheFileIOManager.h @@ -408,7 +408,7 @@ private: TimeStamp mLastSmartSizeTime; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFileInputStream.cpp b/netwerk/cache2/CacheFileInputStream.cpp index 974007cbff..108a681da6 100644 --- a/netwerk/cache2/CacheFileInputStream.cpp +++ b/netwerk/cache2/CacheFileInputStream.cpp @@ -631,5 +631,5 @@ CacheFileInputStream::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) co return mallocSizeOf(this); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheFileInputStream.h b/netwerk/cache2/CacheFileInputStream.h index 22f60b7736..d3781dad05 100644 --- a/netwerk/cache2/CacheFileInputStream.h +++ b/netwerk/cache2/CacheFileInputStream.h @@ -67,7 +67,7 @@ private: }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFileMetadata.cpp b/netwerk/cache2/CacheFileMetadata.cpp index 1430cbc869..785bc64068 100644 --- a/netwerk/cache2/CacheFileMetadata.cpp +++ b/netwerk/cache2/CacheFileMetadata.cpp @@ -927,5 +927,5 @@ CacheFileMetadata::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheFileMetadata.h b/netwerk/cache2/CacheFileMetadata.h index 08ce90930a..2053e0bbba 100644 --- a/netwerk/cache2/CacheFileMetadata.h +++ b/netwerk/cache2/CacheFileMetadata.h @@ -194,7 +194,7 @@ private: }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFileOutputStream.cpp b/netwerk/cache2/CacheFileOutputStream.cpp index b78d541a88..9566e32a31 100644 --- a/netwerk/cache2/CacheFileOutputStream.cpp +++ b/netwerk/cache2/CacheFileOutputStream.cpp @@ -450,5 +450,5 @@ CacheFileOutputStream::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) c return mallocSizeOf(this); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheFileOutputStream.h b/netwerk/cache2/CacheFileOutputStream.h index 778891832b..f8cdcf3bba 100644 --- a/netwerk/cache2/CacheFileOutputStream.h +++ b/netwerk/cache2/CacheFileOutputStream.h @@ -63,7 +63,7 @@ private: }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheFileUtils.cpp b/netwerk/cache2/CacheFileUtils.cpp index c71eaddd75..a82f31b97d 100644 --- a/netwerk/cache2/CacheFileUtils.cpp +++ b/netwerk/cache2/CacheFileUtils.cpp @@ -15,7 +15,7 @@ namespace mozilla { namespace net { namespace CacheFileUtils { -namespace { // anon +namespace { /** * A simple recursive descent parser for the mapping key. @@ -196,7 +196,7 @@ public: } }; -} // anon +} // namespace already_AddRefed ParseKey(const nsCSubstring &aKey, diff --git a/netwerk/cache2/CacheHashUtils.cpp b/netwerk/cache2/CacheHashUtils.cpp index 2171d27ae0..8e4eda56b5 100644 --- a/netwerk/cache2/CacheHashUtils.cpp +++ b/netwerk/cache2/CacheHashUtils.cpp @@ -187,6 +187,6 @@ CacheHash::GetHash16() return (hash & 0xFFFF); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheHashUtils.h b/netwerk/cache2/CacheHashUtils.h index 4e25e25511..d97e76ff93 100644 --- a/netwerk/cache2/CacheHashUtils.h +++ b/netwerk/cache2/CacheHashUtils.h @@ -55,7 +55,7 @@ private: }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheIOThread.cpp b/netwerk/cache2/CacheIOThread.cpp index 9eee735cb9..2c2ed049d1 100644 --- a/netwerk/cache2/CacheIOThread.cpp +++ b/netwerk/cache2/CacheIOThread.cpp @@ -356,5 +356,5 @@ size_t CacheIOThread::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) co return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheIOThread.h b/netwerk/cache2/CacheIOThread.h index c276546f69..c91a4249c7 100644 --- a/netwerk/cache2/CacheIOThread.h +++ b/netwerk/cache2/CacheIOThread.h @@ -98,7 +98,7 @@ private: DebugOnly mInsideLoop; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheIndex.cpp b/netwerk/cache2/CacheIndex.cpp index a1dbf9b50e..ac238eabb0 100644 --- a/netwerk/cache2/CacheIndex.cpp +++ b/netwerk/cache2/CacheIndex.cpp @@ -1639,7 +1639,7 @@ CacheIndex::WriteIndexToDisk() mSkipEntries = 0; } -namespace { // anon +namespace { struct WriteRecordsHelper { @@ -1652,7 +1652,7 @@ struct WriteRecordsHelper #endif }; -} // anon +} // namespace void CacheIndex::WriteRecords() @@ -3221,7 +3221,7 @@ CacheIndex::ReleaseBuffer() mRWBufPos = 0; } -namespace { // anon +namespace { class FrecencyComparator { @@ -3252,7 +3252,7 @@ public: } }; -} // anon +} // namespace void CacheIndex::InsertRecordToFrecencyArray(CacheIndexRecord *aRecord) @@ -3692,5 +3692,5 @@ CacheIndex::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) return mallocSizeOf(gInstance) + SizeOfExcludingThis(mallocSizeOf); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheIndex.h b/netwerk/cache2/CacheIndex.h index e0a389343c..d95fbed9cf 100644 --- a/netwerk/cache2/CacheIndex.h +++ b/netwerk/cache2/CacheIndex.h @@ -1153,7 +1153,7 @@ private: bool mLocked; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheIndexContextIterator.cpp b/netwerk/cache2/CacheIndexContextIterator.cpp index 825b495da0..5f3cb7bd7c 100644 --- a/netwerk/cache2/CacheIndexContextIterator.cpp +++ b/netwerk/cache2/CacheIndexContextIterator.cpp @@ -41,5 +41,5 @@ CacheIndexContextIterator::AddRecords( } } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheIndexContextIterator.h b/netwerk/cache2/CacheIndexContextIterator.h index 49797522d2..32eb9c4789 100644 --- a/netwerk/cache2/CacheIndexContextIterator.h +++ b/netwerk/cache2/CacheIndexContextIterator.h @@ -26,7 +26,7 @@ private: nsCOMPtr mInfo; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheIndexIterator.cpp b/netwerk/cache2/CacheIndexIterator.cpp index ad43ec53a3..57e8601fa3 100644 --- a/netwerk/cache2/CacheIndexIterator.cpp +++ b/netwerk/cache2/CacheIndexIterator.cpp @@ -122,5 +122,5 @@ CacheIndexIterator::ReplaceRecord(CacheIndexRecord *aOldRecord, return false; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheIndexIterator.h b/netwerk/cache2/CacheIndexIterator.h index 1ca005c1ff..10c16098b2 100644 --- a/netwerk/cache2/CacheIndexIterator.h +++ b/netwerk/cache2/CacheIndexIterator.h @@ -54,7 +54,7 @@ protected: bool mAddNew; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheLog.cpp b/netwerk/cache2/CacheLog.cpp index 85741b48f8..ad0c230f76 100644 --- a/netwerk/cache2/CacheLog.cpp +++ b/netwerk/cache2/CacheLog.cpp @@ -26,5 +26,5 @@ PRLogModuleInfo* GetCache2Log() } #endif -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheLog.h b/netwerk/cache2/CacheLog.h index b6046b1eba..6a0e8a4ce0 100644 --- a/netwerk/cache2/CacheLog.h +++ b/netwerk/cache2/CacheLog.h @@ -17,7 +17,7 @@ extern PRLogModuleInfo* GetCache2Log(); #define LOG(x) #endif /* PR_LOGGING */ -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheObserver.cpp b/netwerk/cache2/CacheObserver.cpp index 48092f243e..3fc94b79de 100644 --- a/netwerk/cache2/CacheObserver.cpp +++ b/netwerk/cache2/CacheObserver.cpp @@ -326,7 +326,7 @@ void CacheObserver::ParentDirOverride(nsIFile** aDir) sSelf->mCacheParentDirectoryOverride->Clone(aDir); } -namespace { // anon +namespace { class CacheStorageEvictHelper { @@ -401,7 +401,7 @@ CacheStorageEvictHelper::ClearStorage(bool const aPrivate, return NS_OK; } -} // anon +} // namespace // static bool const CacheObserver::EntryIsTooBig(int64_t aSize, bool aUsingDisk) @@ -501,5 +501,5 @@ CacheObserver::Observe(nsISupports* aSubject, return NS_OK; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheObserver.h b/netwerk/cache2/CacheObserver.h index 4c86ef03d3..43dd410b75 100644 --- a/netwerk/cache2/CacheObserver.h +++ b/netwerk/cache2/CacheObserver.h @@ -96,7 +96,7 @@ private: nsCOMPtr mCacheParentDirectoryOverride; }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheStorage.cpp b/netwerk/cache2/CacheStorage.cpp index c420193bb2..e862adb729 100644 --- a/netwerk/cache2/CacheStorage.cpp +++ b/netwerk/cache2/CacheStorage.cpp @@ -216,5 +216,5 @@ nsresult CacheStorage::ChooseApplicationCache(nsIURI* aURI, return NS_OK; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheStorage.h b/netwerk/cache2/CacheStorage.h index f9072d7395..be0f805e19 100644 --- a/netwerk/cache2/CacheStorage.h +++ b/netwerk/cache2/CacheStorage.h @@ -69,7 +69,7 @@ public: bool LookupAppCache() const { return mLookupAppCache; } }; -} // net -} // mozilla +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cache2/CacheStorageService.cpp b/netwerk/cache2/CacheStorageService.cpp index 642b8a33e8..b110cded94 100644 --- a/netwerk/cache2/CacheStorageService.cpp +++ b/netwerk/cache2/CacheStorageService.cpp @@ -43,7 +43,7 @@ void AppendMemoryStorageID(nsAutoCString &key) key.Append('M'); } -} +} // namespace // Not defining as static or class member of CacheStorageService since // it would otherwise need to include CacheEntry.h and that then would @@ -169,7 +169,7 @@ void CacheStorageService::ShutdownBackground() // Internal management methods -namespace { // anon +namespace { // WalkCacheRunnable // Base class for particular storage entries visiting @@ -524,7 +524,7 @@ PLDHashOperator CollectContexts(const nsACString& aKey, return PL_DHASH_NEXT; } -} // anon +} // namespace void CacheStorageService::DropPrivateBrowsingEntries() { @@ -540,7 +540,7 @@ void CacheStorageService::DropPrivateBrowsingEntries() DoomStorageEntries(keys[i], nullptr, true, nullptr); } -namespace { // anon +namespace { class CleaupCacheDirectoriesRunnable : public nsRunnable { @@ -627,7 +627,7 @@ NS_IMETHODIMP CleaupCacheDirectoriesRunnable::Run() return NS_OK; } -} // anon +} // namespace // static void CacheStorageService::CleaupCacheDirectories(uint32_t aVersion, uint32_t aActive) @@ -838,7 +838,7 @@ NS_IMETHODIMP CacheStorageService::GetIoTarget(nsIEventTarget** aEventTarget) // Methods used by CacheEntry for management of in-memory structures. -namespace { // anon +namespace { class FrecencyComparator { @@ -862,7 +862,7 @@ public: } }; -} // anon +} // namespace void CacheStorageService::RegisterEntry(CacheEntry* aEntry) @@ -1079,7 +1079,7 @@ void CacheStorageService::ForceEntryValidFor(nsACString &aCacheEntryKey, mForcedValidEntries.Put(aCacheEntryKey, validUntil); } -namespace { // anon +namespace { PLDHashOperator PruneForcedValidEntries( const nsACString& aKey, TimeStamp& aTimeStamp, void* aClosure) @@ -1092,7 +1092,7 @@ PLDHashOperator PruneForcedValidEntries( return PL_DHASH_NEXT; } -} // anon +} // namespace // Cleans out the old entries in mForcedValidEntries void CacheStorageService::ForcedValidEntriesPrune(TimeStamp &now) @@ -1486,7 +1486,7 @@ CacheStorageService::CheckStorageEntry(CacheStorage const* aStorage, return NS_OK; } -namespace { // anon +namespace { class CacheEntryDoomByKeyCallback : public CacheFileIOListener , public nsIRunnable @@ -1542,7 +1542,7 @@ NS_IMETHODIMP CacheEntryDoomByKeyCallback::Run() NS_IMPL_ISUPPORTS(CacheEntryDoomByKeyCallback, CacheFileIOListener, nsIRunnable); -} // anon +} // namespace nsresult CacheStorageService::DoomStorageEntry(CacheStorage const* aStorage, @@ -1880,7 +1880,7 @@ CacheStorageService::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) con return mallocSizeOf(this) + SizeOfExcludingThis(mallocSizeOf); } -namespace { // anon +namespace { class ReportStorageMemoryData { @@ -1937,7 +1937,7 @@ PLDHashOperator ReportStorageMemory(const nsACString& aKey, return PL_DHASH_NEXT; } -} // anon +} // namespace NS_IMETHODIMP CacheStorageService::CollectReports(nsIMemoryReporterCallback* aHandleReport, @@ -1988,5 +1988,5 @@ CacheStorageService::CollectReports(nsIMemoryReporterCallback* aHandleReport, return NS_OK; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/CacheStorageService.h b/netwerk/cache2/CacheStorageService.h index 570e8f4d22..51402026cb 100644 --- a/netwerk/cache2/CacheStorageService.h +++ b/netwerk/cache2/CacheStorageService.h @@ -369,8 +369,8 @@ void ProxyReleaseMainThread(nsCOMPtr &object) ProxyRelease(object, mainThread); } -} // net -} // mozilla +} // namespace net +} // namespace mozilla #define NS_CACHE_STORAGE_SERVICE_CID \ { 0xea70b098, 0x5014, 0x4e21, \ diff --git a/netwerk/cache2/OldWrappers.cpp b/netwerk/cache2/OldWrappers.cpp index 40e2ef50c2..8b877b2d8e 100644 --- a/netwerk/cache2/OldWrappers.cpp +++ b/netwerk/cache2/OldWrappers.cpp @@ -30,7 +30,7 @@ static uint32_t const CHECK_MULTITHREADED = nsICacheStorage::CHECK_MULTITHREADED namespace mozilla { namespace net { -namespace { // anon +namespace { // Fires the doom callback back on the main thread // after the cache I/O thread is looped. @@ -124,7 +124,7 @@ NS_IMETHODIMP DoomCallbackWrapper::OnCacheEntryDoomed(nsresult status) return NS_OK; } -} // anon +} // namespace // _OldVisitCallbackWrapper // Receives visit callbacks from the old API and forwards it to the new API @@ -489,7 +489,7 @@ NS_IMETHODIMP _OldCacheEntryWrapper::HasWriteAccess(bool aWriteAllowed_unused, b return NS_OK; } -namespace { // anon +namespace { class MetaDataVisitorWrapper : public nsICacheMetaDataVisitor { @@ -512,7 +512,7 @@ MetaDataVisitorWrapper::VisitMetaDataElement(char const * key, return mCB->OnMetaDataElement(key, value); } -} // anon +} // namespace NS_IMETHODIMP _OldCacheEntryWrapper::VisitMetaData(nsICacheEntryMetaDataVisitor* cb) { @@ -520,7 +520,7 @@ NS_IMETHODIMP _OldCacheEntryWrapper::VisitMetaData(nsICacheEntryMetaDataVisitor* return mOldDesc->VisitMetaData(w); } -namespace { // anon +namespace { nsresult GetCacheSessionNameForStoragePolicy( @@ -654,7 +654,7 @@ GetCacheSession(nsCSubstring const &aScheme, return NS_OK; } -} // anon +} // namespace NS_IMPL_ISUPPORTS_INHERITED(_OldCacheLoad, nsRunnable, nsICacheListener) @@ -1152,5 +1152,5 @@ nsresult _OldStorage::ChooseApplicationCache(nsCSubstring const &cacheKey, return NS_OK; } -} // net -} // mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/cache2/OldWrappers.h b/netwerk/cache2/OldWrappers.h index c56eda31db..b1979a8808 100644 --- a/netwerk/cache2/OldWrappers.h +++ b/netwerk/cache2/OldWrappers.h @@ -263,6 +263,7 @@ private: int64_t mSize; }; -}} +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/cookie/CookieServiceChild.cpp b/netwerk/cookie/CookieServiceChild.cpp index 18b49bb640..7c10222358 100644 --- a/netwerk/cookie/CookieServiceChild.cpp +++ b/netwerk/cookie/CookieServiceChild.cpp @@ -221,6 +221,6 @@ CookieServiceChild::SetCookieStringFromHttp(nsIURI *aHostURI, aServerTime, true); } -} -} +} // namespace net +} // namespace mozilla diff --git a/netwerk/cookie/CookieServiceChild.h b/netwerk/cookie/CookieServiceChild.h index 9b556615ee..bc6efedf41 100644 --- a/netwerk/cookie/CookieServiceChild.h +++ b/netwerk/cookie/CookieServiceChild.h @@ -60,8 +60,8 @@ protected: bool mThirdPartySession; }; -} -} +} // namespace net +} // namespace mozilla #endif // mozilla_net_CookieServiceChild_h__ diff --git a/netwerk/cookie/CookieServiceParent.cpp b/netwerk/cookie/CookieServiceParent.cpp index 7546690fa5..cc5e7c1303 100644 --- a/netwerk/cookie/CookieServiceParent.cpp +++ b/netwerk/cookie/CookieServiceParent.cpp @@ -146,6 +146,6 @@ CookieServiceParent::CloneProtocol(Channel* aChannel, return actor.forget(); } -} -} +} // namespace net +} // namespace mozilla diff --git a/netwerk/cookie/CookieServiceParent.h b/netwerk/cookie/CookieServiceParent.h index bbc092b166..74663771e7 100644 --- a/netwerk/cookie/CookieServiceParent.h +++ b/netwerk/cookie/CookieServiceParent.h @@ -52,8 +52,8 @@ protected: nsRefPtr mCookieService; }; -} -} +} // namespace net +} // namespace mozilla #endif // mozilla_net_CookieServiceParent_h diff --git a/netwerk/cookie/nsCookieService.cpp b/netwerk/cookie/nsCookieService.cpp index 6b545c09a4..e5218331f8 100644 --- a/netwerk/cookie/nsCookieService.cpp +++ b/netwerk/cookie/nsCookieService.cpp @@ -596,7 +596,7 @@ public: NS_IMPL_ISUPPORTS(AppClearDataObserver, nsIObserver) -} // anonymous namespace +} // namespace size_t nsCookieKey::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const @@ -4022,7 +4022,7 @@ struct GetCookiesForAppStruct { {} }; -} // anonymous namespace +} // namespace /* static */ PLDHashOperator nsCookieService::GetCookiesForApp(nsCookieEntry* entry, void* arg) diff --git a/netwerk/cookie/nsCookieService.h b/netwerk/cookie/nsCookieService.h index 1e486e912e..2a382fe90c 100644 --- a/netwerk/cookie/nsCookieService.h +++ b/netwerk/cookie/nsCookieService.h @@ -47,8 +47,8 @@ struct nsEnumerationData; namespace mozilla { namespace net { class CookieServiceParent; -} -} +} // namespace net +} // namespace mozilla // hash key class class nsCookieKey : public PLDHashEntryHdr diff --git a/netwerk/dns/ChildDNSService.h b/netwerk/dns/ChildDNSService.h index 9a0b4ceadf..bb0f5366e2 100644 --- a/netwerk/dns/ChildDNSService.h +++ b/netwerk/dns/ChildDNSService.h @@ -55,4 +55,5 @@ private: } // namespace net } // namespace mozilla + #endif // mozilla_net_ChildDNSService_h diff --git a/netwerk/dns/DNS.cpp b/netwerk/dns/DNS.cpp index 817dc1097f..78abe67156 100644 --- a/netwerk/dns/DNS.cpp +++ b/netwerk/dns/DNS.cpp @@ -328,5 +328,5 @@ AddrInfo::SizeOfIncludingThis(MallocSizeOf mallocSizeOf) const return n; } -} // namespace dns +} // namespace net } // namespace mozilla diff --git a/netwerk/dns/DNSListenerProxy.h b/netwerk/dns/DNSListenerProxy.h index e406731219..76761a7732 100644 --- a/netwerk/dns/DNSListenerProxy.h +++ b/netwerk/dns/DNSListenerProxy.h @@ -68,4 +68,5 @@ private: } // namespace net } // namespace mozilla + #endif // DNSListenerProxy_h__ diff --git a/netwerk/dns/DNSRequestChild.cpp b/netwerk/dns/DNSRequestChild.cpp index 85115f6c6e..16f83614fd 100644 --- a/netwerk/dns/DNSRequestChild.cpp +++ b/netwerk/dns/DNSRequestChild.cpp @@ -309,4 +309,5 @@ DNSRequestChild::Cancel(nsresult reason) } //------------------------------------------------------------------------------ -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/dns/DNSRequestChild.h b/netwerk/dns/DNSRequestChild.h index dc1e65aa3f..26d4ff98d7 100644 --- a/netwerk/dns/DNSRequestChild.h +++ b/netwerk/dns/DNSRequestChild.h @@ -16,7 +16,7 @@ namespace mozilla { namespace net { -class DNSRequestChild +class DNSRequestChild final : public PDNSRequestChild , public nsICancelable { @@ -57,4 +57,5 @@ protected: } // namespace net } // namespace mozilla + #endif // mozilla_net_DNSRequestChild_h diff --git a/netwerk/dns/DNSRequestParent.cpp b/netwerk/dns/DNSRequestParent.cpp index 656fabc4af..fc47c089f8 100644 --- a/netwerk/dns/DNSRequestParent.cpp +++ b/netwerk/dns/DNSRequestParent.cpp @@ -127,4 +127,5 @@ DNSRequestParent::OnLookupComplete(nsICancelable *request, -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/dns/DNSRequestParent.h b/netwerk/dns/DNSRequestParent.h index ef22899692..d217dbd4fe 100644 --- a/netwerk/dns/DNSRequestParent.h +++ b/netwerk/dns/DNSRequestParent.h @@ -46,4 +46,5 @@ private: } // namespace net } // namespace mozilla + #endif // mozilla_net_DNSRequestParent_h diff --git a/netwerk/dns/nsIDNService.h b/netwerk/dns/nsIDNService.h index a593248725..236a1f69b0 100644 --- a/netwerk/dns/nsIDNService.h +++ b/netwerk/dns/nsIDNService.h @@ -22,9 +22,9 @@ class nsIPrefBranch; #define kACEPrefixLen 4 -class nsIDNService : public nsIIDNService, - public nsIObserver, - public nsSupportsWeakReference +class nsIDNService final : public nsIIDNService, + public nsIObserver, + public nsSupportsWeakReference { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/ipc/ChannelEventQueue.cpp b/netwerk/ipc/ChannelEventQueue.cpp index 8f236da2ee..bf4d7529ac 100644 --- a/netwerk/ipc/ChannelEventQueue.cpp +++ b/netwerk/ipc/ChannelEventQueue.cpp @@ -76,5 +76,5 @@ ChannelEventQueue::RetargetDeliveryTo(nsIEventTarget* aTargetThread) return NS_OK; } -} -} +} // namespace net +} // namespace mozilla diff --git a/netwerk/ipc/ChannelEventQueue.h b/netwerk/ipc/ChannelEventQueue.h index 2410023512..392b95ffea 100644 --- a/netwerk/ipc/ChannelEventQueue.h +++ b/netwerk/ipc/ChannelEventQueue.h @@ -175,7 +175,7 @@ class MOZ_STACK_CLASS AutoEventEnqueuer nsRefPtr mEventQueue; }; -} -} +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/ipc/NeckoChild.cpp b/netwerk/ipc/NeckoChild.cpp index c3d0cb3b21..780f916f04 100644 --- a/netwerk/ipc/NeckoChild.cpp +++ b/netwerk/ipc/NeckoChild.cpp @@ -331,5 +331,6 @@ NeckoChild::RecvAppOfflineStatus(const uint32_t& aId, const bool& aOffline) return true; } -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/ipc/NeckoCommon.cpp b/netwerk/ipc/NeckoCommon.cpp index 3391f0da88..0b4b4dd883 100644 --- a/netwerk/ipc/NeckoCommon.cpp +++ b/netwerk/ipc/NeckoCommon.cpp @@ -13,7 +13,7 @@ namespace net { namespace NeckoCommonInternal { bool gSecurityDisabled = true; bool gRegisteredBool = false; -} +} // namespace NeckoCommonInternal } // namespace net } // namespace mozilla diff --git a/netwerk/ipc/NeckoCommon.h b/netwerk/ipc/NeckoCommon.h index 81ff7c4f16..c11d970e14 100644 --- a/netwerk/ipc/NeckoCommon.h +++ b/netwerk/ipc/NeckoCommon.h @@ -15,7 +15,8 @@ namespace mozilla { namespace dom { class TabChild; -}} +} // namespace dom +} // namespace mozilla #if defined(DEBUG) # define NECKO_ERRORS_ARE_FATAL_DEFAULT true @@ -103,7 +104,7 @@ IsNeckoChild() namespace NeckoCommonInternal { extern bool gSecurityDisabled; extern bool gRegisteredBool; -} +} // namespace NeckoCommonInternal // This should always return true unless xpcshell tests are being used inline bool diff --git a/netwerk/ipc/NeckoMessageUtils.h b/netwerk/ipc/NeckoMessageUtils.h index 975eb0b235..c894d3c0e5 100644 --- a/netwerk/ipc/NeckoMessageUtils.h +++ b/netwerk/ipc/NeckoMessageUtils.h @@ -186,6 +186,6 @@ struct ParamTraits } }; -} +} // namespace IPC #endif // mozilla_net_NeckoMessageUtils_h diff --git a/netwerk/ipc/NeckoParent.cpp b/netwerk/ipc/NeckoParent.cpp index 2fb30e1f5b..b9c7d4a2f6 100644 --- a/netwerk/ipc/NeckoParent.cpp +++ b/netwerk/ipc/NeckoParent.cpp @@ -749,7 +749,7 @@ CallbackMap() static std::map > sCallbackMap; return sCallbackMap; } -} // anonymous namespace +} // namespace NS_IMPL_ISUPPORTS(NeckoParent::NestedFrameAuthPrompt, nsIAuthPrompt2) @@ -864,4 +864,5 @@ NeckoParent::OfflineNotification(nsISupports *aSubject) return NS_OK; } -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/ipc/RemoteOpenFileChild.h b/netwerk/ipc/RemoteOpenFileChild.h index 97ae885015..d2fc0c87e7 100644 --- a/netwerk/ipc/RemoteOpenFileChild.h +++ b/netwerk/ipc/RemoteOpenFileChild.h @@ -20,7 +20,7 @@ namespace mozilla { namespace ipc { class FileDescriptor; -} +} // namespace ipc namespace net { diff --git a/netwerk/protocol/about/nsAboutCache.h b/netwerk/protocol/about/nsAboutCache.h index 3e0466490f..494fbdd6c2 100644 --- a/netwerk/protocol/about/nsAboutCache.h +++ b/netwerk/protocol/about/nsAboutCache.h @@ -17,8 +17,8 @@ #include "nsCOMPtr.h" #include "nsTArray.h" -class nsAboutCache : public nsIAboutModule - , public nsICacheStorageVisitor +class nsAboutCache final : public nsIAboutModule + , public nsICacheStorageVisitor { public: NS_DECL_ISUPPORTS diff --git a/netwerk/protocol/ftp/FTPChannelChild.h b/netwerk/protocol/ftp/FTPChannelChild.h index df13f9dcc7..8a4028e8b0 100644 --- a/netwerk/protocol/ftp/FTPChannelChild.h +++ b/netwerk/protocol/ftp/FTPChannelChild.h @@ -29,14 +29,14 @@ namespace net { // nsBaseChannel and have a new class that has only the common logic for // nsFTPChannel/FTPChannelChild. -class FTPChannelChild : public PFTPChannelChild - , public nsBaseChannel - , public nsIFTPChannel - , public nsIUploadChannel - , public nsIResumableChannel - , public nsIProxiedChannel - , public nsIChildChannel - , public nsIDivertableChannel +class FTPChannelChild final : public PFTPChannelChild + , public nsBaseChannel + , public nsIFTPChannel + , public nsIUploadChannel + , public nsIResumableChannel + , public nsIProxiedChannel + , public nsIChildChannel + , public nsIDivertableChannel { public: typedef ::nsIStreamListener nsIStreamListener; diff --git a/netwerk/protocol/ftp/nsFTPChannel.cpp b/netwerk/protocol/ftp/nsFTPChannel.cpp index 984dc0d1a9..6f056504a8 100644 --- a/netwerk/protocol/ftp/nsFTPChannel.cpp +++ b/netwerk/protocol/ftp/nsFTPChannel.cpp @@ -185,7 +185,7 @@ FTPEventSinkProxy::OnFTPControlLogRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace void nsFtpChannel::GetFTPEventSink(nsCOMPtr &aResult) diff --git a/netwerk/protocol/ftp/nsFTPChannel.h b/netwerk/protocol/ftp/nsFTPChannel.h index f697b3793b..30c4eca9bc 100644 --- a/netwerk/protocol/ftp/nsFTPChannel.h +++ b/netwerk/protocol/ftp/nsFTPChannel.h @@ -20,12 +20,12 @@ class nsIURI; -class nsFtpChannel : public nsBaseChannel, - public nsIFTPChannel, - public nsIUploadChannel, - public nsIResumableChannel, - public nsIProxiedChannel, - public nsIForcePendingChannel +class nsFtpChannel final : public nsBaseChannel, + public nsIFTPChannel, + public nsIUploadChannel, + public nsIResumableChannel, + public nsIProxiedChannel, + public nsIForcePendingChannel { public: NS_DECL_ISUPPORTS_INHERITED diff --git a/netwerk/protocol/http/ASpdySession.cpp b/netwerk/protocol/http/ASpdySession.cpp index d745260454..4be7ab5d7f 100644 --- a/netwerk/protocol/http/ASpdySession.cpp +++ b/netwerk/protocol/http/ASpdySession.cpp @@ -183,6 +183,7 @@ SpdyPushCache::RemovePushedStreamHttp2(nsCString key) mHashHttp2.Remove(key); return rv; } -} // namespace mozilla::net + +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/ASpdySession.h b/netwerk/protocol/http/ASpdySession.h index 4cfbc27391..857147994d 100644 --- a/netwerk/protocol/http/ASpdySession.h +++ b/netwerk/protocol/http/ASpdySession.h @@ -118,6 +118,7 @@ public: ALPNCallback ALPNCallbacks[kCount]; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // mozilla_net_ASpdySession_h diff --git a/netwerk/protocol/http/AlternateServices.cpp b/netwerk/protocol/http/AlternateServices.cpp index 77908a7c5e..f7c7e85305 100644 --- a/netwerk/protocol/http/AlternateServices.cpp +++ b/netwerk/protocol/http/AlternateServices.cpp @@ -523,5 +523,5 @@ AltSvcOverride::GetAllow1918(bool *allow) NS_IMPL_ISUPPORTS(AltSvcOverride, nsIInterfaceRequestor, nsISpeculativeConnectionOverrider) -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/AlternateServices.h b/netwerk/protocol/http/AlternateServices.h index 2fc160c3d0..4fd2c98815 100644 --- a/netwerk/protocol/http/AlternateServices.h +++ b/netwerk/protocol/http/AlternateServices.h @@ -130,6 +130,7 @@ private: nsRefPtrHashtable mHash; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // include guard diff --git a/netwerk/protocol/http/ConnectionDiagnostics.cpp b/netwerk/protocol/http/ConnectionDiagnostics.cpp index 174fa3fa25..503f634cef 100644 --- a/netwerk/protocol/http/ConnectionDiagnostics.cpp +++ b/netwerk/protocol/http/ConnectionDiagnostics.cpp @@ -250,5 +250,5 @@ nsHttpTransaction::PrintDiagnostics(nsCString &log) log.AppendPrintf(" classification = 0x%x\n", mClassification); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/Http2Compression.cpp b/netwerk/protocol/http/Http2Compression.cpp index dcf5ddc312..63a5afceba 100644 --- a/netwerk/protocol/http/Http2Compression.cpp +++ b/netwerk/protocol/http/Http2Compression.cpp @@ -1242,5 +1242,5 @@ Http2Compressor::SetMaxBufferSizeInternal(uint32_t maxBufferSize) return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/Http2Compression.h b/netwerk/protocol/http/Http2Compression.h index 029954f99b..6ca1175371 100644 --- a/netwerk/protocol/http/Http2Compression.h +++ b/netwerk/protocol/http/Http2Compression.h @@ -175,7 +175,7 @@ private: uint32_t mLowestBufferSizeWaiting; }; -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // mozilla_net_Http2Compression_Internal_h diff --git a/netwerk/protocol/http/Http2Push.cpp b/netwerk/protocol/http/Http2Push.cpp index 1446ca964d..14d4f8a62f 100644 --- a/netwerk/protocol/http/Http2Push.cpp +++ b/netwerk/protocol/http/Http2Push.cpp @@ -445,5 +445,5 @@ Http2PushTransactionBuffer::GetBufferedData(char *buf, return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/Http2Push.h b/netwerk/protocol/http/Http2Push.h index 071823c6ad..e4fd046c51 100644 --- a/netwerk/protocol/http/Http2Push.h +++ b/netwerk/protocol/http/Http2Push.h @@ -116,7 +116,7 @@ private: uint32_t mBufferedHTTP1Consumed; }; -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // mozilla_net_Http2Push_Internal_h diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index de0375f1b5..b9e60f04fe 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -3758,5 +3758,5 @@ Http2Session::SendPing() ResumeRecv(); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/Http2Session.h b/netwerk/protocol/http/Http2Session.h index 991637f3b5..91c9e92aec 100644 --- a/netwerk/protocol/http/Http2Session.h +++ b/netwerk/protocol/http/Http2Session.h @@ -492,7 +492,7 @@ private: nsDataHashtable mTunnelHash; }; -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // mozilla_net_Http2Session_h diff --git a/netwerk/protocol/http/Http2Stream.cpp b/netwerk/protocol/http/Http2Stream.cpp index 1b5e5be80e..8e1bcd1e07 100644 --- a/netwerk/protocol/http/Http2Stream.cpp +++ b/netwerk/protocol/http/Http2Stream.cpp @@ -1366,6 +1366,6 @@ Http2Stream::MapStreamToHttpConnection() mTransaction->ConnectionInfo()); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/Http2Stream.h b/netwerk/protocol/http/Http2Stream.h index 2a71a5682a..e5ab580ea9 100644 --- a/netwerk/protocol/http/Http2Stream.h +++ b/netwerk/protocol/http/Http2Stream.h @@ -322,7 +322,7 @@ private: bool mPlainTextTunnel; }; -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // mozilla_net_Http2Stream_h diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index f0614be69d..74c6d45189 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -1608,7 +1608,7 @@ private: NS_ConvertASCIItoUTF16 mCookie; }; -} // anonymous namespace +} // namespace NS_IMETHODIMP HttpBaseChannel::SetCookie(const char *aCookieHeader) @@ -2710,6 +2710,6 @@ HttpBaseChannel::GetPerformance() //------------------------------------------------------------------------------ -} // namespace net -} // namespace mozilla +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp index f51d20bd37..930eda50bd 100644 --- a/netwerk/protocol/http/HttpChannelChild.cpp +++ b/netwerk/protocol/http/HttpChannelChild.cpp @@ -54,7 +54,7 @@ static_assert(FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE == 250, "MAX_DESCRIPTORS_PER_MESSAGE mismatch!"); #endif -} +} // namespace // A stream listener interposed between the nsInputStreamPump used for intercepted channels // and this channel's original listener. This is only used to ensure the original listener @@ -2119,4 +2119,5 @@ HttpChannelChild::OverrideWithSynthesizedResponse(nsAutoPtr& } } -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp index 348b510444..8d527aed5c 100644 --- a/netwerk/protocol/http/HttpChannelParent.cpp +++ b/netwerk/protocol/http/HttpChannelParent.cpp @@ -1198,4 +1198,5 @@ HttpChannelParent::GetAuthPrompt(uint32_t aPromptReason, const nsIID& iid, return NS_OK; } -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/http/HttpChannelParent.h b/netwerk/protocol/http/HttpChannelParent.h index f45d841e31..7fd809cd62 100644 --- a/netwerk/protocol/http/HttpChannelParent.h +++ b/netwerk/protocol/http/HttpChannelParent.h @@ -29,19 +29,19 @@ namespace mozilla { namespace dom{ class TabParent; class PBrowserOrId; -} +} // namespace dom namespace net { class HttpChannelParentListener; -class HttpChannelParent : public PHttpChannelParent - , public nsIParentRedirectingChannel - , public nsIProgressEventSink - , public nsIInterfaceRequestor - , public ADivertableParentChannel - , public nsIAuthPromptProvider - , public DisconnectableParent +class HttpChannelParent final : public PHttpChannelParent + , public nsIParentRedirectingChannel + , public nsIProgressEventSink + , public nsIInterfaceRequestor + , public ADivertableParentChannel + , public nsIAuthPromptProvider + , public DisconnectableParent { virtual ~HttpChannelParent(); diff --git a/netwerk/protocol/http/HttpChannelParentListener.cpp b/netwerk/protocol/http/HttpChannelParentListener.cpp index 729bcdaf7e..b0a2573660 100644 --- a/netwerk/protocol/http/HttpChannelParentListener.cpp +++ b/netwerk/protocol/http/HttpChannelParentListener.cpp @@ -267,4 +267,5 @@ HttpChannelParentListener::DivertTo(nsIStreamListener* aListener) return ResumeForDiversion(); } -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/http/HttpChannelParentListener.h b/netwerk/protocol/http/HttpChannelParentListener.h index 9a5ccb7e4f..fcf5356125 100644 --- a/netwerk/protocol/http/HttpChannelParentListener.h +++ b/netwerk/protocol/http/HttpChannelParentListener.h @@ -19,10 +19,10 @@ namespace net { class HttpChannelParent; -class HttpChannelParentListener : public nsIInterfaceRequestor - , public nsIChannelEventSink - , public nsIRedirectResultListener - , public nsIStreamListener +class HttpChannelParentListener final : public nsIInterfaceRequestor + , public nsIChannelEventSink + , public nsIRedirectResultListener + , public nsIStreamListener { public: NS_DECL_ISUPPORTS diff --git a/netwerk/protocol/http/HttpInfo.h b/netwerk/protocol/http/HttpInfo.h index b7036debd0..e13ffff16c 100644 --- a/netwerk/protocol/http/HttpInfo.h +++ b/netwerk/protocol/http/HttpInfo.h @@ -19,6 +19,7 @@ public: static void GetHttpConnectionData(nsTArray *); }; -} } // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpInfo__ diff --git a/netwerk/protocol/http/NullHttpTransaction.cpp b/netwerk/protocol/http/NullHttpTransaction.cpp index 38ec1e1851..eaa528f060 100644 --- a/netwerk/protocol/http/NullHttpTransaction.cpp +++ b/netwerk/protocol/http/NullHttpTransaction.cpp @@ -326,6 +326,6 @@ NullHttpTransaction::PipelinePosition() return 1; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/NullHttpTransaction.h b/netwerk/protocol/http/NullHttpTransaction.h index 08f17fa9b6..b3e4be47e1 100644 --- a/netwerk/protocol/http/NullHttpTransaction.h +++ b/netwerk/protocol/http/NullHttpTransaction.h @@ -78,6 +78,7 @@ protected: NS_DEFINE_STATIC_IID_ACCESSOR(NullHttpTransaction, NS_NULLHTTPTRANSACTION_IID) -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // mozilla_net_NullHttpTransaction_h diff --git a/netwerk/protocol/http/PSpdyPush.h b/netwerk/protocol/http/PSpdyPush.h index dd835eca11..b0c9e2b7f6 100644 --- a/netwerk/protocol/http/PSpdyPush.h +++ b/netwerk/protocol/http/PSpdyPush.h @@ -62,7 +62,7 @@ private: nsDataHashtable mHashHttp2; }; -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // mozilla_net_SpdyPush_Public_h diff --git a/netwerk/protocol/http/SpdyPush31.cpp b/netwerk/protocol/http/SpdyPush31.cpp index 26b592415e..3f2e655c33 100644 --- a/netwerk/protocol/http/SpdyPush31.cpp +++ b/netwerk/protocol/http/SpdyPush31.cpp @@ -374,5 +374,5 @@ SpdyPush31TransactionBuffer::GetBufferedData(char *buf, return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/SpdyPush31.h b/netwerk/protocol/http/SpdyPush31.h index 4cda1ca6b6..e8ac9b4ce7 100644 --- a/netwerk/protocol/http/SpdyPush31.h +++ b/netwerk/protocol/http/SpdyPush31.h @@ -96,7 +96,7 @@ private: uint32_t mBufferedHTTP1Consumed; }; -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // mozilla_net_SpdyPush3_Internal_h diff --git a/netwerk/protocol/http/SpdySession31.cpp b/netwerk/protocol/http/SpdySession31.cpp index 782302d06c..280ddc5f45 100644 --- a/netwerk/protocol/http/SpdySession31.cpp +++ b/netwerk/protocol/http/SpdySession31.cpp @@ -3070,5 +3070,5 @@ SpdySession31::SendPing() gHttpHandler->ConnMgr()->ActivateTimeoutTick(); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/SpdySession31.h b/netwerk/protocol/http/SpdySession31.h index 3a517aa838..d6b95ff22e 100644 --- a/netwerk/protocol/http/SpdySession31.h +++ b/netwerk/protocol/http/SpdySession31.h @@ -422,6 +422,7 @@ private: nsDataHashtable mTunnelHash; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // mozilla_net_SpdySession31_h diff --git a/netwerk/protocol/http/SpdyStream31.cpp b/netwerk/protocol/http/SpdyStream31.cpp index fc7022f432..821ff651d8 100644 --- a/netwerk/protocol/http/SpdyStream31.cpp +++ b/netwerk/protocol/http/SpdyStream31.cpp @@ -1636,5 +1636,5 @@ SpdyStream31::MapStreamToHttpConnection() mTransaction->ConnectionInfo()); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/SpdyStream31.h b/netwerk/protocol/http/SpdyStream31.h index 7541b85f30..535fec2f58 100644 --- a/netwerk/protocol/http/SpdyStream31.h +++ b/netwerk/protocol/http/SpdyStream31.h @@ -277,6 +277,7 @@ private: bool mPlainTextTunnel; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // mozilla_net_SpdyStream31_h diff --git a/netwerk/protocol/http/TimingStruct.h b/netwerk/protocol/http/TimingStruct.h index 024b9072b5..5d8969b08b 100644 --- a/netwerk/protocol/http/TimingStruct.h +++ b/netwerk/protocol/http/TimingStruct.h @@ -26,6 +26,7 @@ struct ResourceTimingStruct : TimingStruct { TimeStamp redirectEnd; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/protocol/http/TunnelUtils.cpp b/netwerk/protocol/http/TunnelUtils.cpp index 75c78c696e..8a391a762a 100644 --- a/netwerk/protocol/http/TunnelUtils.cpp +++ b/netwerk/protocol/http/TunnelUtils.cpp @@ -1634,5 +1634,5 @@ NS_IMPL_ISUPPORTS(OutputStreamShim, nsIOutputStream, nsIAsyncOutputStream) NS_IMPL_ISUPPORTS(SocketInWrapper, nsIAsyncInputStream) NS_IMPL_ISUPPORTS(SocketOutWrapper, nsIAsyncOutputStream) -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/TunnelUtils.h b/netwerk/protocol/http/TunnelUtils.h index 61ccd08f32..690bacf4d8 100644 --- a/netwerk/protocol/http/TunnelUtils.h +++ b/netwerk/protocol/http/TunnelUtils.h @@ -240,6 +240,7 @@ private: nsRefPtr mDrivingTransaction; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // mozilla_net_TLSFilterTransaction_h diff --git a/netwerk/protocol/http/nsAHttpConnection.h b/netwerk/protocol/http/nsAHttpConnection.h index d858342c25..e82f7ff465 100644 --- a/netwerk/protocol/http/nsAHttpConnection.h +++ b/netwerk/protocol/http/nsAHttpConnection.h @@ -246,6 +246,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsAHttpConnection, NS_AHTTPCONNECTION_IID) (fwdObject)->SetSecurityCallbacks(aCallbacks); \ } -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsAHttpConnection_h__ diff --git a/netwerk/protocol/http/nsAHttpTransaction.h b/netwerk/protocol/http/nsAHttpTransaction.h index be4db3c5f9..e9f01f7615 100644 --- a/netwerk/protocol/http/nsAHttpTransaction.h +++ b/netwerk/protocol/http/nsAHttpTransaction.h @@ -282,6 +282,7 @@ public: #define NS_DECL_NSAHTTPSEGMENTWRITER \ nsresult OnWriteSegment(char *, uint32_t, uint32_t *) override; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsAHttpTransaction_h__ diff --git a/netwerk/protocol/http/nsHttp.cpp b/netwerk/protocol/http/nsHttp.cpp index 737968e08c..4fa2f630b1 100644 --- a/netwerk/protocol/http/nsHttp.cpp +++ b/netwerk/protocol/http/nsHttp.cpp @@ -463,5 +463,5 @@ ParsedHeaderValueListList::ParsedHeaderValueListList(const nsCString &fullHeader } } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttp.h b/netwerk/protocol/http/nsHttp.h index 0a14e4931a..bb55beaaa2 100644 --- a/netwerk/protocol/http/nsHttp.h +++ b/netwerk/protocol/http/nsHttp.h @@ -256,7 +256,7 @@ private: }; -} // namespace mozilla::net +} // namespace net } // namespace mozilla #endif // nsHttp_h__ diff --git a/netwerk/protocol/http/nsHttpActivityDistributor.cpp b/netwerk/protocol/http/nsHttpActivityDistributor.cpp index b71140f0b0..ab13509775 100644 --- a/netwerk/protocol/http/nsHttpActivityDistributor.cpp +++ b/netwerk/protocol/http/nsHttpActivityDistributor.cpp @@ -130,5 +130,6 @@ nsHttpActivityDistributor::RemoveObserver(nsIHttpActivityObserver *aObserver) return NS_OK; } -} // namespace mozilla::net + +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpActivityDistributor.h b/netwerk/protocol/http/nsHttpActivityDistributor.h index 08fa696859..4da59de7ae 100644 --- a/netwerk/protocol/http/nsHttpActivityDistributor.h +++ b/netwerk/protocol/http/nsHttpActivityDistributor.h @@ -29,6 +29,7 @@ protected: Mutex mLock; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpActivityDistributor_h__ diff --git a/netwerk/protocol/http/nsHttpAuthCache.cpp b/netwerk/protocol/http/nsHttpAuthCache.cpp index 9c2a8ef180..79f05e858d 100644 --- a/netwerk/protocol/http/nsHttpAuthCache.cpp +++ b/netwerk/protocol/http/nsHttpAuthCache.cpp @@ -609,5 +609,5 @@ nsHttpAuthNode::ClearAuthEntry(const char *realm) } } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpAuthCache.h b/netwerk/protocol/http/nsHttpAuthCache.h index 0e79b51f36..d6f9475aaa 100644 --- a/netwerk/protocol/http/nsHttpAuthCache.h +++ b/netwerk/protocol/http/nsHttpAuthCache.h @@ -255,6 +255,7 @@ private: nsRefPtr mObserver; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpAuthCache_h__ diff --git a/netwerk/protocol/http/nsHttpAuthManager.cpp b/netwerk/protocol/http/nsHttpAuthManager.cpp index 70634a59af..b6f73f1698 100644 --- a/netwerk/protocol/http/nsHttpAuthManager.cpp +++ b/netwerk/protocol/http/nsHttpAuthManager.cpp @@ -149,5 +149,5 @@ nsHttpAuthManager::ClearAll() return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpAuthManager.h b/netwerk/protocol/http/nsHttpAuthManager.h index 459c7f2bfd..261417c1dc 100644 --- a/netwerk/protocol/http/nsHttpAuthManager.h +++ b/netwerk/protocol/http/nsHttpAuthManager.h @@ -29,6 +29,7 @@ protected: nsHttpAuthCache *mPrivateAuthCache; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpAuthManager_h__ diff --git a/netwerk/protocol/http/nsHttpBasicAuth.cpp b/netwerk/protocol/http/nsHttpBasicAuth.cpp index 4938d8b3fd..b680c86435 100644 --- a/netwerk/protocol/http/nsHttpBasicAuth.cpp +++ b/netwerk/protocol/http/nsHttpBasicAuth.cpp @@ -97,5 +97,5 @@ nsHttpBasicAuth::GetAuthFlags(uint32_t *flags) return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpBasicAuth.h b/netwerk/protocol/http/nsHttpBasicAuth.h index 6a0b90dcb6..b824b1d5ac 100644 --- a/netwerk/protocol/http/nsHttpBasicAuth.h +++ b/netwerk/protocol/http/nsHttpBasicAuth.h @@ -26,6 +26,7 @@ private: virtual ~nsHttpBasicAuth(); }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // !nsHttpBasicAuth_h__ diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index 688f3f1ab7..5c91fc49a9 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -6781,4 +6781,5 @@ nsHttpChannel::OnPush(const nsACString &url, Http2PushedStream *pushedStream) return rv; } -} } // namespace mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h index 379ad14e5c..f9992b95aa 100644 --- a/netwerk/protocol/http/nsHttpChannel.h +++ b/netwerk/protocol/http/nsHttpChannel.h @@ -486,6 +486,7 @@ private: // cache telemetry }; NS_DEFINE_STATIC_IID_ACCESSOR(nsHttpChannel, NS_HTTPCHANNEL_IID) -} } // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpChannel_h__ diff --git a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp index b4ed5df2b8..6111742b85 100644 --- a/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp +++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp @@ -1380,5 +1380,5 @@ nsHttpChannelAuthProvider::GetCurrentPath(nsACString &path) NS_IMPL_ISUPPORTS(nsHttpChannelAuthProvider, nsICancelable, nsIHttpChannelAuthProvider, nsIAuthPromptCallback) -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpChannelAuthProvider.h b/netwerk/protocol/http/nsHttpChannelAuthProvider.h index 256706097d..f9a42d115e 100644 --- a/netwerk/protocol/http/nsHttpChannelAuthProvider.h +++ b/netwerk/protocol/http/nsHttpChannelAuthProvider.h @@ -151,6 +151,7 @@ private: nsRefPtr mHttpHandler; // keep gHttpHandler alive }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpChannelAuthProvider_h__ diff --git a/netwerk/protocol/http/nsHttpChunkedDecoder.cpp b/netwerk/protocol/http/nsHttpChunkedDecoder.cpp index c16929d4af..f80aec048a 100644 --- a/netwerk/protocol/http/nsHttpChunkedDecoder.cpp +++ b/netwerk/protocol/http/nsHttpChunkedDecoder.cpp @@ -163,5 +163,5 @@ nsHttpChunkedDecoder::ParseChunkRemaining(char *buf, return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpChunkedDecoder.h b/netwerk/protocol/http/nsHttpChunkedDecoder.h index 4bb77c18b5..64c8fbf648 100644 --- a/netwerk/protocol/http/nsHttpChunkedDecoder.h +++ b/netwerk/protocol/http/nsHttpChunkedDecoder.h @@ -50,6 +50,7 @@ private: bool mWaitEOF; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/protocol/http/nsHttpConnection.cpp b/netwerk/protocol/http/nsHttpConnection.cpp index 0d28d30e31..dd7dbeb12d 100644 --- a/netwerk/protocol/http/nsHttpConnection.cpp +++ b/netwerk/protocol/http/nsHttpConnection.cpp @@ -2241,5 +2241,5 @@ nsHttpConnection::CheckForTraffic(bool check) } } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpConnection.h b/netwerk/protocol/http/nsHttpConnection.h index 7a431fd782..bf4e0a44df 100644 --- a/netwerk/protocol/http/nsHttpConnection.h +++ b/netwerk/protocol/http/nsHttpConnection.h @@ -361,6 +361,7 @@ private: int64_t mContentBytesWritten0RTT; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpConnection_h__ diff --git a/netwerk/protocol/http/nsHttpConnectionInfo.cpp b/netwerk/protocol/http/nsHttpConnectionInfo.cpp index 7ee8340c0e..734b82b8e0 100644 --- a/netwerk/protocol/http/nsHttpConnectionInfo.cpp +++ b/netwerk/protocol/http/nsHttpConnectionInfo.cpp @@ -298,5 +298,5 @@ nsHttpConnectionInfo::HostIsLocalIPLiteral() const return IsIPAddrLocal(&netAddr); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpConnectionInfo.h b/netwerk/protocol/http/nsHttpConnectionInfo.h index fa51a55fa9..1c6344ffea 100644 --- a/netwerk/protocol/http/nsHttpConnectionInfo.h +++ b/netwerk/protocol/http/nsHttpConnectionInfo.h @@ -153,6 +153,7 @@ private: NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsHttpConnectionInfo) }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpConnectionInfo_h__ diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp index 714f54ad02..8d52309a8a 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp +++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp @@ -4003,5 +4003,5 @@ nsHttpConnectionMgr::MoveToWildCardConnEntry(nsHttpConnectionInfo *specificCI, } } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.h b/netwerk/protocol/http/nsHttpConnectionMgr.h index a766ab713c..0dc86f1e40 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.h +++ b/netwerk/protocol/http/nsHttpConnectionMgr.h @@ -31,8 +31,8 @@ struct HttpRetParams; //----------------------------------------------------------------------------- -class nsHttpConnectionMgr : public nsIObserver - , public AltSvcCache +class nsHttpConnectionMgr final : public nsIObserver + , public AltSvcCache { public: NS_DECL_THREADSAFE_ISUPPORTS @@ -727,6 +727,7 @@ private: nsCString mLogData; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // !nsHttpConnectionMgr_h__ diff --git a/netwerk/protocol/http/nsHttpDigestAuth.cpp b/netwerk/protocol/http/nsHttpDigestAuth.cpp index d1fa2ccac6..c112f0bbe1 100644 --- a/netwerk/protocol/http/nsHttpDigestAuth.cpp +++ b/netwerk/protocol/http/nsHttpDigestAuth.cpp @@ -695,7 +695,7 @@ nsHttpDigestAuth::AppendQuotedString(const nsACString & value, return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla // vim: ts=2 sw=2 diff --git a/netwerk/protocol/http/nsHttpDigestAuth.h b/netwerk/protocol/http/nsHttpDigestAuth.h index 47bdefeed2..fa15166768 100644 --- a/netwerk/protocol/http/nsHttpDigestAuth.h +++ b/netwerk/protocol/http/nsHttpDigestAuth.h @@ -89,6 +89,7 @@ class nsHttpDigestAuth final : public nsIHttpAuthenticator char mHashBuf[DIGEST_LENGTH]; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpDigestAuth_h__ diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 2b7d823d75..3146aa1f45 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -2191,5 +2191,5 @@ nsHttpsHandler::AllowPort(int32_t aPort, const char *aScheme, bool *_retval) return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpHandler.h b/netwerk/protocol/http/nsHttpHandler.h index 30d01d2381..c97d53431a 100644 --- a/netwerk/protocol/http/nsHttpHandler.h +++ b/netwerk/protocol/http/nsHttpHandler.h @@ -589,6 +589,7 @@ public: nsresult Init(); }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpHandler_h__ diff --git a/netwerk/protocol/http/nsHttpHeaderArray.cpp b/netwerk/protocol/http/nsHttpHeaderArray.cpp index f51fc14b90..380f8b33e9 100644 --- a/netwerk/protocol/http/nsHttpHeaderArray.cpp +++ b/netwerk/protocol/http/nsHttpHeaderArray.cpp @@ -235,5 +235,5 @@ nsHttpHeaderArray::Clear() mHeaders.Clear(); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpHeaderArray.h b/netwerk/protocol/http/nsHttpHeaderArray.h index 6684d29cd1..75e75aef0e 100644 --- a/netwerk/protocol/http/nsHttpHeaderArray.h +++ b/netwerk/protocol/http/nsHttpHeaderArray.h @@ -17,7 +17,7 @@ class nsIHttpHeaderVisitor; // without also including PHttpChannelParams.h namespace IPC { template struct ParamTraits; -} +} // namespace IPC namespace mozilla { namespace net { @@ -188,6 +188,7 @@ nsHttpHeaderArray::IsSuspectDuplicateHeader(nsHttpAtom header) return retval; } -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif diff --git a/netwerk/protocol/http/nsHttpNTLMAuth.cpp b/netwerk/protocol/http/nsHttpNTLMAuth.cpp index a4850aae70..6688a780a9 100644 --- a/netwerk/protocol/http/nsHttpNTLMAuth.cpp +++ b/netwerk/protocol/http/nsHttpNTLMAuth.cpp @@ -494,5 +494,5 @@ nsHttpNTLMAuth::GetAuthFlags(uint32_t *flags) return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpNTLMAuth.h b/netwerk/protocol/http/nsHttpNTLMAuth.h index 75541ed589..9bc1ef6f2e 100644 --- a/netwerk/protocol/http/nsHttpNTLMAuth.h +++ b/netwerk/protocol/http/nsHttpNTLMAuth.h @@ -25,6 +25,7 @@ private: bool mUseNative; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // !nsHttpNTLMAuth_h__ diff --git a/netwerk/protocol/http/nsHttpPipeline.cpp b/netwerk/protocol/http/nsHttpPipeline.cpp index b76d87511b..b8371c4062 100644 --- a/netwerk/protocol/http/nsHttpPipeline.cpp +++ b/netwerk/protocol/http/nsHttpPipeline.cpp @@ -912,5 +912,5 @@ nsHttpPipeline::FillSendBuf() return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpPipeline.h b/netwerk/protocol/http/nsHttpPipeline.h index 9ab37178a2..053e62d64b 100644 --- a/netwerk/protocol/http/nsHttpPipeline.h +++ b/netwerk/protocol/http/nsHttpPipeline.h @@ -99,6 +99,7 @@ private: bool mSuppressSendEvents; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpPipeline_h__ diff --git a/netwerk/protocol/http/nsHttpRequestHead.cpp b/netwerk/protocol/http/nsHttpRequestHead.cpp index 66835bffe9..aa58ce0211 100644 --- a/netwerk/protocol/http/nsHttpRequestHead.cpp +++ b/netwerk/protocol/http/nsHttpRequestHead.cpp @@ -107,5 +107,5 @@ nsHttpRequestHead::Flatten(nsACString &buf, bool pruneProxyHeaders) mHeaders.Flatten(buf, pruneProxyHeaders); } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpRequestHead.h b/netwerk/protocol/http/nsHttpRequestHead.h index a7ac6b31ba..64a66794f4 100644 --- a/netwerk/protocol/http/nsHttpRequestHead.h +++ b/netwerk/protocol/http/nsHttpRequestHead.h @@ -113,6 +113,7 @@ private: bool mHTTPS; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpRequestHead_h__ diff --git a/netwerk/protocol/http/nsHttpResponseHead.cpp b/netwerk/protocol/http/nsHttpResponseHead.cpp index e634036a2b..78a1b054d2 100644 --- a/netwerk/protocol/http/nsHttpResponseHead.cpp +++ b/netwerk/protocol/http/nsHttpResponseHead.cpp @@ -834,5 +834,5 @@ nsHttpResponseHead::ParsePragma(const char *val) mPragmaNoCache = true; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpResponseHead.h b/netwerk/protocol/http/nsHttpResponseHead.h index 831c664bab..db721c7300 100644 --- a/netwerk/protocol/http/nsHttpResponseHead.h +++ b/netwerk/protocol/http/nsHttpResponseHead.h @@ -14,7 +14,7 @@ // without also including PHttpChannelParams.h namespace IPC { template struct ParamTraits; -} +} // namespace IPC namespace mozilla { namespace net { @@ -143,6 +143,8 @@ private: friend struct IPC::ParamTraits; }; -}} // namespace mozilla::net + +} // namespace net +} // namespace mozilla #endif // nsHttpResponseHead_h__ diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index 6d5ae28da5..12691c2b1d 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -2281,5 +2281,5 @@ nsHttpTransaction::Finish0RTT(bool aRestart) return NS_OK; } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/http/nsHttpTransaction.h b/netwerk/protocol/http/nsHttpTransaction.h index d396ce4156..eaca498515 100644 --- a/netwerk/protocol/http/nsHttpTransaction.h +++ b/netwerk/protocol/http/nsHttpTransaction.h @@ -448,6 +448,7 @@ private: nsresult mTransportStatus; }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // nsHttpTransaction_h__ diff --git a/netwerk/protocol/rtsp/controller/RtspController.h b/netwerk/protocol/rtsp/controller/RtspController.h index f883c24cb0..86b2c41f4d 100644 --- a/netwerk/protocol/rtsp/controller/RtspController.h +++ b/netwerk/protocol/rtsp/controller/RtspController.h @@ -50,5 +50,7 @@ private: }; } + } // namespace mozilla::net + #endif diff --git a/netwerk/protocol/rtsp/controller/RtspControllerChild.h b/netwerk/protocol/rtsp/controller/RtspControllerChild.h index fffc8d3f8e..7263ad919b 100644 --- a/netwerk/protocol/rtsp/controller/RtspControllerChild.h +++ b/netwerk/protocol/rtsp/controller/RtspControllerChild.h @@ -90,6 +90,7 @@ class RtspControllerChild : public nsIStreamingProtocolController // receiving Stop command or OnDisconnected event. void StopPlayAndPauseTimer(); }; + } // namespace net } // namespace mozilla diff --git a/netwerk/protocol/rtsp/controller/RtspControllerParent.h b/netwerk/protocol/rtsp/controller/RtspControllerParent.h index c96678b07e..ee40b956d1 100644 --- a/netwerk/protocol/rtsp/controller/RtspControllerParent.h +++ b/netwerk/protocol/rtsp/controller/RtspControllerParent.h @@ -53,4 +53,5 @@ class RtspControllerParent : public PRtspControllerParent } // namespace net } // namespace mozilla + #endif // RtspControllerParent_h diff --git a/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp b/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp index 26dbe3f1ed..1ad0e99408 100644 --- a/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp +++ b/netwerk/protocol/rtsp/rtsp/RTSPSource.cpp @@ -772,4 +772,5 @@ bool RTSPSource::isLiveStream() { getDuration(&duration); return duration == 0; } + } // namespace android diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp index 620778546c..3cb87347e9 100644 --- a/netwerk/protocol/websocket/WebSocketChannel.cpp +++ b/netwerk/protocol/websocket/WebSocketChannel.cpp @@ -2145,7 +2145,7 @@ public: } }; -} // anonymous namespace +} // namespace void WebSocketChannel::CleanupConnection() @@ -3768,5 +3768,5 @@ WebSocketChannel::SaveNetworkStats(bool enforce) #endif } -} // namespace mozilla::net +} // namespace net } // namespace mozilla diff --git a/netwerk/protocol/websocket/WebSocketChannel.h b/netwerk/protocol/websocket/WebSocketChannel.h index b32824e368..2e803d4a75 100644 --- a/netwerk/protocol/websocket/WebSocketChannel.h +++ b/netwerk/protocol/websocket/WebSocketChannel.h @@ -305,6 +305,7 @@ protected: virtual ~WebSocketSSLChannel() {} }; -}} // namespace mozilla::net +} // namespace net +} // namespace mozilla #endif // mozilla_net_WebSocketChannel_h diff --git a/netwerk/protocol/websocket/WebSocketChannelChild.h b/netwerk/protocol/websocket/WebSocketChannelChild.h index 4839c5d7ec..0a32ecf3f2 100644 --- a/netwerk/protocol/websocket/WebSocketChannelChild.h +++ b/netwerk/protocol/websocket/WebSocketChannelChild.h @@ -17,8 +17,8 @@ namespace net { class ChannelEvent; class ChannelEventQueue; -class WebSocketChannelChild : public BaseWebSocketChannel, - public PWebSocketChild +class WebSocketChannelChild final : public BaseWebSocketChannel, + public PWebSocketChild { public: explicit WebSocketChannelChild(bool aSecure); diff --git a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp index 1d3ca64511..2845fc1827 100644 --- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp +++ b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp @@ -768,4 +768,5 @@ WyciwygChannelChild::GetCharsetAndSource(int32_t *aSource, nsACString & _retval) } //------------------------------------------------------------------------------ -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/wyciwyg/WyciwygChannelChild.h b/netwerk/protocol/wyciwyg/WyciwygChannelChild.h index db565e73c8..a89b5c5706 100644 --- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.h +++ b/netwerk/protocol/wyciwyg/WyciwygChannelChild.h @@ -36,9 +36,9 @@ enum WyciwygChannelChildState { // Header file contents -class WyciwygChannelChild : public PWyciwygChannelChild - , public nsIWyciwygChannel - , public PrivateBrowsingChannel +class WyciwygChannelChild final : public PWyciwygChannelChild + , public nsIWyciwygChannel + , public PrivateBrowsingChannel { public: NS_DECL_ISUPPORTS diff --git a/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp b/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp index 9f0b4f6bc2..d30f66a708 100644 --- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp +++ b/netwerk/protocol/wyciwyg/WyciwygChannelParent.cpp @@ -352,4 +352,5 @@ WyciwygChannelParent::GetInterface(const nsIID& uuid, void** result) } -}} // mozilla::net +} // namespace net +} // namespace mozilla diff --git a/netwerk/protocol/wyciwyg/WyciwygChannelParent.h b/netwerk/protocol/wyciwyg/WyciwygChannelParent.h index ea972e5a64..aa038260af 100644 --- a/netwerk/protocol/wyciwyg/WyciwygChannelParent.h +++ b/netwerk/protocol/wyciwyg/WyciwygChannelParent.h @@ -16,7 +16,7 @@ namespace mozilla { namespace dom { class PBrowserParent; -} +} // namespace dom namespace net { diff --git a/netwerk/protocol/wyciwyg/nsWyciwygChannel.h b/netwerk/protocol/wyciwyg/nsWyciwygChannel.h index 561d5772c5..d7c6b821dd 100644 --- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.h +++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.h @@ -29,10 +29,10 @@ extern PRLogModuleInfo * gWyciwygLog; //----------------------------------------------------------------------------- -class nsWyciwygChannel: public nsIWyciwygChannel, - public nsIStreamListener, - public nsICacheEntryOpenCallback, - public mozilla::net::PrivateBrowsingChannel +class nsWyciwygChannel final: public nsIWyciwygChannel, + public nsIStreamListener, + public nsICacheEntryOpenCallback, + public mozilla::net::PrivateBrowsingChannel { public: NS_DECL_THREADSAFE_ISUPPORTS diff --git a/netwerk/test/TestProtocols.cpp b/netwerk/test/TestProtocols.cpp index 92222ed980..307ba7189f 100644 --- a/netwerk/test/TestProtocols.cpp +++ b/netwerk/test/TestProtocols.cpp @@ -817,7 +817,7 @@ nsresult LoadURLFromConsole() return NS_OK; } -} // namespace +} // namespace TestProtocols using namespace TestProtocols; diff --git a/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp b/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp index ac10090b48..7adb7656cc 100644 --- a/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp +++ b/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp @@ -175,7 +175,7 @@ namespace { // Alias for nullptr to aid readability in the code below. static const char* byKey = nullptr; -} // unnamed namespcae +} // namespace class pkixocsp_VerifyEncodedResponse_successful : public pkixocsp_VerifyEncodedResponse diff --git a/startupcache/StartupCache.h b/startupcache/StartupCache.h index 677e44a317..6a8ae17569 100644 --- a/startupcache/StartupCache.h +++ b/startupcache/StartupCache.h @@ -228,4 +228,5 @@ class StartupCacheWrapper final } // namespace scache } // namespace mozilla + #endif //StartupCache_h_ diff --git a/startupcache/StartupCacheUtils.cpp b/startupcache/StartupCacheUtils.cpp index b85ff33882..e06c3011c8 100644 --- a/startupcache/StartupCacheUtils.cpp +++ b/startupcache/StartupCacheUtils.cpp @@ -246,5 +246,5 @@ PathifyURI(nsIURI *in, nsACString &out) return NS_OK; } -} -} +} // namespace scache +} // namespace mozilla diff --git a/startupcache/StartupCacheUtils.h b/startupcache/StartupCacheUtils.h index e4023d86ab..1226d1668c 100644 --- a/startupcache/StartupCacheUtils.h +++ b/startupcache/StartupCacheUtils.h @@ -36,6 +36,7 @@ NewBufferFromStorageStream(nsIStorageStream *storageStream, NS_EXPORT nsresult PathifyURI(nsIURI *in, nsACString &out); -} -} +} // namespace scache +} // namespace mozilla + #endif //nsStartupCacheUtils_h_ diff --git a/startupcache/test/TestStartupCache.cpp b/startupcache/test/TestStartupCache.cpp index 122950c82b..928b039d2a 100644 --- a/startupcache/test/TestStartupCache.cpp +++ b/startupcache/test/TestStartupCache.cpp @@ -42,8 +42,8 @@ NewObjectOutputWrappedStorageStream(nsIObjectOutputStream **wrapperStream, NS_IMPORT nsresult NewBufferFromStorageStream(nsIStorageStream *storageStream, char** buffer, uint32_t* len); -} -} +} // namespace scache +} // namespace mozilla using namespace mozilla::scache; diff --git a/testing/gtest/mozilla/GTestRunner.cpp b/testing/gtest/mozilla/GTestRunner.cpp index 8774eb7ce7..2a083190b7 100644 --- a/testing/gtest/mozilla/GTestRunner.cpp +++ b/testing/gtest/mozilla/GTestRunner.cpp @@ -95,4 +95,4 @@ public: } } InitRunGTest; -} +} // namespace mozilla diff --git a/testing/gtest/mozilla/GTestRunner.h b/testing/gtest/mozilla/GTestRunner.h index 14bf988120..6c0af0cdb4 100644 --- a/testing/gtest/mozilla/GTestRunner.h +++ b/testing/gtest/mozilla/GTestRunner.h @@ -7,4 +7,4 @@ namespace mozilla { extern int (*RunGTest)(); -} +} // namespace mozilla diff --git a/testing/gtest/mozilla/SanityTest.cpp b/testing/gtest/mozilla/SanityTest.cpp index b5c2971eed..614c9d30d7 100644 --- a/testing/gtest/mozilla/SanityTest.cpp +++ b/testing/gtest/mozilla/SanityTest.cpp @@ -19,7 +19,7 @@ public: TestMock() {} MOCK_METHOD0(MockedCall, void()); }; -} +} // namespace TEST(MozillaGMockSanity, Runs) { TestMock mockedClass; EXPECT_CALL(mockedClass, MockedCall()) diff --git a/toolkit/components/ctypes/ctypes.cpp b/toolkit/components/ctypes/ctypes.cpp index cf7d3de5f6..05c70e906a 100644 --- a/toolkit/components/ctypes/ctypes.cpp +++ b/toolkit/components/ctypes/ctypes.cpp @@ -128,8 +128,8 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -} -} +} // namespace ctypes +} // namespace mozilla NS_DEFINE_NAMED_CID(JSCTYPES_CID); diff --git a/toolkit/components/ctypes/ctypes.h b/toolkit/components/ctypes/ctypes.h index 19e8b2a398..b72f22c1c0 100644 --- a/toolkit/components/ctypes/ctypes.h +++ b/toolkit/components/ctypes/ctypes.h @@ -24,7 +24,7 @@ private: ~Module(); }; -} -} +} // namespace ctypes +} // namespace mozilla #endif diff --git a/toolkit/components/downloads/SQLFunctions.cpp b/toolkit/components/downloads/SQLFunctions.cpp index 7540d39b7a..57fa8ca1ba 100644 --- a/toolkit/components/downloads/SQLFunctions.cpp +++ b/toolkit/components/downloads/SQLFunctions.cpp @@ -142,5 +142,5 @@ GenerateGUIDFunction::OnFunctionCall(mozIStorageValueArray *aArguments, return NS_OK; } -} // namespace mozilla } // namespace downloads +} // namespace mozilla diff --git a/toolkit/components/downloads/nsDownloadManager.cpp b/toolkit/components/downloads/nsDownloadManager.cpp index 8c63f1392d..0ddfb884ef 100644 --- a/toolkit/components/downloads/nsDownloadManager.cpp +++ b/toolkit/components/downloads/nsDownloadManager.cpp @@ -1718,7 +1718,7 @@ private: nsCOMPtr mResult; nsCOMPtr mCallback; }; -} // anonymous namespace +} // namespace NS_IMETHODIMP nsDownloadManager::GetDownloadByGUID(const nsACString& aGUID, diff --git a/toolkit/components/filewatcher/NativeFileWatcherWin.cpp b/toolkit/components/filewatcher/NativeFileWatcherWin.cpp index 316fcb5c80..defdb31d68 100644 --- a/toolkit/components/filewatcher/NativeFileWatcherWin.cpp +++ b/toolkit/components/filewatcher/NativeFileWatcherWin.cpp @@ -1230,7 +1230,7 @@ NativeFileWatcherIOTask::MakeResourcePath( return NS_OK; } -} // anonymous namespace +} // namespace // The NativeFileWatcherService component diff --git a/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp b/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp index 1c1fe72368..e9e63a041f 100644 --- a/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp +++ b/toolkit/components/finalizationwitness/FinalizationWitnessService.cpp @@ -168,7 +168,7 @@ static const JSFunctionSpec sWitnessClassFunctions[] = { JS_FS_END }; -} +} // namespace NS_IMPL_ISUPPORTS(FinalizationWitnessService, nsIFinalizationWitnessService) diff --git a/toolkit/components/osfile/NativeOSFileInternals.cpp b/toolkit/components/osfile/NativeOSFileInternals.cpp index fcdfce5329..5f9282a1bd 100644 --- a/toolkit/components/osfile/NativeOSFileInternals.cpp +++ b/toolkit/components/osfile/NativeOSFileInternals.cpp @@ -856,7 +856,7 @@ protected: nsRefPtr mResult; }; -} // osfile +} // namespace // The OS.File service diff --git a/toolkit/components/perf/PerfMeasurement.cpp b/toolkit/components/perf/PerfMeasurement.cpp index 5f4a97991e..b0d9c86e57 100644 --- a/toolkit/components/perf/PerfMeasurement.cpp +++ b/toolkit/components/perf/PerfMeasurement.cpp @@ -95,8 +95,8 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -} -} +} // namespace jsperf +} // namespace mozilla NS_DEFINE_NAMED_CID(JSPERF_CID); diff --git a/toolkit/components/perf/PerfMeasurement.h b/toolkit/components/perf/PerfMeasurement.h index 51dae35876..b158d16852 100644 --- a/toolkit/components/perf/PerfMeasurement.h +++ b/toolkit/components/perf/PerfMeasurement.h @@ -24,7 +24,7 @@ private: ~Module(); }; -} -} +} // namespace jsperf +} // namespace mozilla #endif diff --git a/toolkit/components/places/AsyncFaviconHelpers.cpp b/toolkit/components/places/AsyncFaviconHelpers.cpp index 5f4411314f..b0c231e6de 100644 --- a/toolkit/components/places/AsyncFaviconHelpers.cpp +++ b/toolkit/components/places/AsyncFaviconHelpers.cpp @@ -356,7 +356,7 @@ OptimizeIconSize(IconData& aIcon, return NS_OK; } -} // Anonymous namespace. +} // namespace //////////////////////////////////////////////////////////////////////////////// diff --git a/toolkit/components/places/Database.cpp b/toolkit/components/places/Database.cpp index 72e1c80d11..9ca63047d2 100644 --- a/toolkit/components/places/Database.cpp +++ b/toolkit/components/places/Database.cpp @@ -325,7 +325,7 @@ CreateRoot(nsCOMPtr& aDBConn, } -} // Anonymous namespace +} // namespace //////////////////////////////////////////////////////////////////////////////// //// Database diff --git a/toolkit/components/places/History.cpp b/toolkit/components/places/History.cpp index f042f25911..03cf67a633 100644 --- a/toolkit/components/places/History.cpp +++ b/toolkit/components/places/History.cpp @@ -1953,7 +1953,7 @@ StoreAndNotifyEmbedVisit(VisitData& aPlace, (void)NS_DispatchToMainThread(event); } -} // anonymous namespace +} // namespace //////////////////////////////////////////////////////////////////////////////// //// History diff --git a/toolkit/components/places/SQLFunctions.h b/toolkit/components/places/SQLFunctions.h index d42f5f3c86..f7619bf635 100644 --- a/toolkit/components/places/SQLFunctions.h +++ b/toolkit/components/places/SQLFunctions.h @@ -325,6 +325,6 @@ public: } // namespace places -} // namespace storage +} // namespace mozilla #endif // mozilla_places_SQLFunctions_h_ diff --git a/toolkit/components/places/nsAnnoProtocolHandler.cpp b/toolkit/components/places/nsAnnoProtocolHandler.cpp index 769bb8ceba..78670bb6dd 100644 --- a/toolkit/components/places/nsAnnoProtocolHandler.cpp +++ b/toolkit/components/places/nsAnnoProtocolHandler.cpp @@ -200,7 +200,7 @@ NS_IMPL_ISUPPORTS_INHERITED( nsIRequestObserver ) -} // anonymous namespace +} // namespace //////////////////////////////////////////////////////////////////////////////// //// nsAnnoProtocolHandler diff --git a/toolkit/components/places/nsNavBookmarks.cpp b/toolkit/components/places/nsNavBookmarks.cpp index e74b84fc08..a105824a78 100644 --- a/toolkit/components/places/nsNavBookmarks.cpp +++ b/toolkit/components/places/nsNavBookmarks.cpp @@ -130,7 +130,7 @@ private: DataType mData; }; -} // Anonymous namespace. +} // namespace nsNavBookmarks::nsNavBookmarks() diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp index dbe6bd77f5..6d166ef433 100644 --- a/toolkit/components/places/nsNavHistory.cpp +++ b/toolkit/components/places/nsNavHistory.cpp @@ -226,7 +226,7 @@ protected: nsNavHistory& mNavHistory; }; -} // anonymouse namespace +} // namespace // Queries rows indexes to bind or get values, if adding a new one, be sure to @@ -578,7 +578,7 @@ private: PRTime mLastVisitDate; }; -} // anonymous namespace +} // namespace void nsNavHistory::DispatchFrecencyChangedNotification(const nsACString& aSpec, @@ -1006,7 +1006,7 @@ public: } }; -} // anonymous namespace +} // namespace nsresult nsNavHistory::invalidateFrecencies(const nsCString& aPlaceIdsQueryString) @@ -3173,7 +3173,7 @@ public: } }; -} // anonymous namespace +} // namespace nsresult nsNavHistory::DecayFrecency() @@ -4433,7 +4433,7 @@ void ParseSearchTermsFromQueries(const nsCOMArray& aQueries, } } -} // anonymous namespace +} // namespace nsresult @@ -4499,7 +4499,7 @@ public: } }; -} // anonymous namespace +} // namespace nsresult nsNavHistory::FixInvalidFrecencies() diff --git a/toolkit/components/places/nsNavHistoryQuery.cpp b/toolkit/components/places/nsNavHistoryQuery.cpp index fa82c5dd7b..09536e3fb0 100644 --- a/toolkit/components/places/nsNavHistoryQuery.cpp +++ b/toolkit/components/places/nsNavHistoryQuery.cpp @@ -246,7 +246,7 @@ namespace PlacesFolderConversion { return NS_OK; } -} +} // namespace PlacesFolderConversion // nsNavHistory::QueryStringToQueries // diff --git a/toolkit/components/places/tests/cpp/test_IHistory.cpp b/toolkit/components/places/tests/cpp/test_IHistory.cpp index ecf7339579..2c3f7a80d9 100644 --- a/toolkit/components/places/tests/cpp/test_IHistory.cpp +++ b/toolkit/components/places/tests/cpp/test_IHistory.cpp @@ -140,7 +140,7 @@ test_wait_checkpoint() namespace test_unvisited_does_not_notify { nsCOMPtr testURI; nsRefPtr testLink; -} +} // namespace test_unvisited_does_not_notify void test_unvisited_does_not_notify_part1() { @@ -372,7 +372,7 @@ namespace test_observer_topic_dispatched_helpers { statusObserver, nsIObserver ) -} +} // namespace test_observer_topic_dispatched_helpers void test_observer_topic_dispatched() { diff --git a/toolkit/components/reflect/reflect.cpp b/toolkit/components/reflect/reflect.cpp index f2dd8bcbc7..91ed8cbde9 100644 --- a/toolkit/components/reflect/reflect.cpp +++ b/toolkit/components/reflect/reflect.cpp @@ -52,8 +52,8 @@ Module::Call(nsIXPConnectWrappedNative* wrapper, return NS_OK; } -} -} +} // namespace reflect +} // namespace mozilla NS_DEFINE_NAMED_CID(JSREFLECT_CID); diff --git a/toolkit/components/reflect/reflect.h b/toolkit/components/reflect/reflect.h index 870ffb8c1a..6f5237104c 100644 --- a/toolkit/components/reflect/reflect.h +++ b/toolkit/components/reflect/reflect.h @@ -24,7 +24,7 @@ private: ~Module(); }; -} -} +} // namespace reflect +} // namespace mozilla #endif diff --git a/toolkit/components/startup/StartupTimeline.h b/toolkit/components/startup/StartupTimeline.h index 4694cbc3ed..3345135cd3 100644 --- a/toolkit/components/startup/StartupTimeline.h +++ b/toolkit/components/startup/StartupTimeline.h @@ -94,7 +94,7 @@ private: static NS_EXTERNAL_VIS_(const char *) sStartupTimelineDesc[MAX_EVENT_ID]; }; -} +} // namespace mozilla #endif /* mozilla_StartupTimeline */ diff --git a/toolkit/components/telemetry/ProcessedStack.h b/toolkit/components/telemetry/ProcessedStack.h index ae8a5fe34c..2bda550072 100644 --- a/toolkit/components/telemetry/ProcessedStack.h +++ b/toolkit/components/telemetry/ProcessedStack.h @@ -59,4 +59,5 @@ GetStackAndModules(const std::vector &aPCs); } // namespace Telemetry } // namespace mozilla + #endif // ProcessedStack_h__ diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index f7d3fc7c1a..a07e581168 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -13,6 +13,7 @@ #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" #include "mozilla/Likely.h" +#include "mozilla/MathAlgorithms.h" #include "base/histogram.h" #include "base/pickle.h" @@ -55,6 +56,7 @@ #include "plstr.h" #include "nsAppDirectoryServiceDefs.h" #include "mozilla/BackgroundHangMonitor.h" +#include "mozilla/ThreadHangStats.h" #include "mozilla/ProcessedStack.h" #include "mozilla/Mutex.h" #include "mozilla/FileUtils.h" @@ -3250,7 +3252,7 @@ TelemetryImpl::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) return n; } -} // anonymous namespace +} // namespace namespace mozilla { void @@ -3569,6 +3571,41 @@ SetProfileDir(nsIFile* aProfD) sTelemetryIOObserver->AddPath(profDirPath, NS_LITERAL_STRING("{profile}")); } + +void +TimeHistogram::Add(PRIntervalTime aTime) +{ + uint32_t timeMs = PR_IntervalToMilliseconds(aTime); + size_t index = mozilla::FloorLog2(timeMs); + operator[](index)++; +} + +uint32_t +HangHistogram::GetHash(const HangStack& aStack) +{ + uint32_t hash = 0; + for (const char* const* label = aStack.begin(); + label != aStack.end(); label++) { + /* We only need to hash the pointer instead of the text content + because we are assuming constant pointers */ + hash = AddToHash(hash, *label); + } + return hash; +} + +bool +HangHistogram::operator==(const HangHistogram& aOther) const +{ + if (mHash != aOther.mHash) { + return false; + } + if (mStack.length() != aOther.mStack.length()) { + return false; + } + return PodEqual(mStack.begin(), aOther.mStack.begin(), mStack.length()); +} + + } // namespace Telemetry } // namespace mozilla diff --git a/toolkit/components/telemetry/Telemetry.h b/toolkit/components/telemetry/Telemetry.h index 1671561a14..4100974819 100644 --- a/toolkit/components/telemetry/Telemetry.h +++ b/toolkit/components/telemetry/Telemetry.h @@ -14,12 +14,12 @@ namespace base { class Histogram; -} +} // namespace base namespace mozilla { namespace HangMonitor { class HangAnnotations; -} +} // namespace HangMonitor namespace Telemetry { #include "TelemetryHistogramEnums.h" @@ -247,4 +247,5 @@ void WriteFailedProfileLock(nsIFile* aProfileDir); } // namespace Telemetry } // namespace mozilla + #endif // Telemetry_h__ diff --git a/toolkit/components/telemetry/ThreadHangStats.h b/toolkit/components/telemetry/ThreadHangStats.h index 859e52eafc..eaf43edc8d 100644 --- a/toolkit/components/telemetry/ThreadHangStats.h +++ b/toolkit/components/telemetry/ThreadHangStats.h @@ -194,4 +194,5 @@ public: } // namespace Telemetry } // namespace mozilla + #endif // mozilla_BackgroundHangTelemetry_h diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build index dcebf5946c..dbac078ed2 100644 --- a/toolkit/components/telemetry/moz.build +++ b/toolkit/components/telemetry/moz.build @@ -15,6 +15,7 @@ XPIDL_MODULE = 'telemetry' EXPORTS.mozilla += [ 'ProcessedStack.h', 'Telemetry.h', + 'ThreadHangStats.h', ] SOURCES += [ diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp index 99d80973e6..6302e32341 100644 --- a/toolkit/components/terminator/nsTerminator.cpp +++ b/toolkit/components/terminator/nsTerminator.cpp @@ -313,7 +313,7 @@ static ShutdownStep sShutdownSteps[] = { ShutdownStep("xpcom-shutdown"), }; -} // anonymous namespace +} // namespace NS_IMPL_ISUPPORTS(nsTerminator, nsIObserver) diff --git a/toolkit/components/terminator/nsTerminator.h b/toolkit/components/terminator/nsTerminator.h index 9dc845eff8..4c23740a56 100644 --- a/toolkit/components/terminator/nsTerminator.h +++ b/toolkit/components/terminator/nsTerminator.h @@ -35,7 +35,7 @@ private: int32_t mCurrentStep; }; -} +} // namespace mozilla #define NS_TOOLKIT_TERMINATOR_CID { 0x2e59cc70, 0xf83a, 0x412f, \ { 0x89, 0xd4, 0x45, 0x38, 0x85, 0x83, 0x72, 0x17 } } diff --git a/toolkit/devtools/server/nsJSInspector.cpp b/toolkit/devtools/server/nsJSInspector.cpp index 46b2830249..c39781483a 100644 --- a/toolkit/devtools/server/nsJSInspector.cpp +++ b/toolkit/devtools/server/nsJSInspector.cpp @@ -123,8 +123,8 @@ nsJSInspector::GetLastNestRequestor(JS::MutableHandle out) return NS_OK; } -} -} +} // namespace jsinspector +} // namespace mozilla NS_DEFINE_NAMED_CID(JSINSPECTOR_CID); diff --git a/toolkit/devtools/server/nsJSInspector.h b/toolkit/devtools/server/nsJSInspector.h index 31f4173b56..4e60b04287 100644 --- a/toolkit/devtools/server/nsJSInspector.h +++ b/toolkit/devtools/server/nsJSInspector.h @@ -33,7 +33,7 @@ private: JS::Heap mLastRequestor; }; -} -} +} // namespace jsinspector +} // namespace mozilla #endif diff --git a/toolkit/mozapps/extensions/AddonPathService.cpp b/toolkit/mozapps/extensions/AddonPathService.cpp index 3681de016b..9240439047 100644 --- a/toolkit/mozapps/extensions/AddonPathService.cpp +++ b/toolkit/mozapps/extensions/AddonPathService.cpp @@ -220,4 +220,4 @@ MapURIToAddonID(nsIURI* aURI) return AddonPathService::FindAddonId(filePath); } -} +} // namespace mozilla diff --git a/toolkit/xre/EventTracer.cpp b/toolkit/xre/EventTracer.cpp index 9e4927d4d0..71a5424005 100644 --- a/toolkit/xre/EventTracer.cpp +++ b/toolkit/xre/EventTracer.cpp @@ -264,4 +264,4 @@ void ShutdownEventTracing() CleanUpWidgetTracing(); } -} // namespace mozilla +} // namespace mozilla diff --git a/toolkit/xre/EventTracer.h b/toolkit/xre/EventTracer.h index 67fa6661dd..886b624e0a 100644 --- a/toolkit/xre/EventTracer.h +++ b/toolkit/xre/EventTracer.h @@ -18,6 +18,6 @@ bool InitEventTracing(bool aLog); // Must be called from the same thread that called InitEventTracing. void ShutdownEventTracing(); -} // namespace mozilla +} // namespace mozilla #endif /* XRE_EVENTTRACER_H_ */ diff --git a/toolkit/xre/MacAutoreleasePool.h b/toolkit/xre/MacAutoreleasePool.h index 580e37da43..7668957f19 100644 --- a/toolkit/xre/MacAutoreleasePool.h +++ b/toolkit/xre/MacAutoreleasePool.h @@ -26,6 +26,6 @@ private: void operator=(const MacAutoreleasePool&); }; -} +} // namespace mozilla #endif // MacAutoreleasePool_h_ diff --git a/toolkit/xre/MacLaunchHelper.mm b/toolkit/xre/MacLaunchHelper.mm index e11aa4e2af..8d922c728b 100644 --- a/toolkit/xre/MacLaunchHelper.mm +++ b/toolkit/xre/MacLaunchHelper.mm @@ -33,7 +33,7 @@ cpu_type_t cpu_i386_types[2] = { cpu_type_t cpu_x64_86_types[2] = { CPU_TYPE_X86_64, CPU_TYPE_ANY }; -} +} // namespace void LaunchChildMac(int aArgc, char** aArgv, uint32_t aRestartType, pid_t *pid) diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index 691bff0838..f12c79fce3 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -232,7 +232,7 @@ extern "C" MFBT_API bool IsSignalHandlingBroken(); namespace mozilla { int (*RunGTest)() = 0; -} +} // namespace mozilla using namespace mozilla; using mozilla::unused; @@ -1623,7 +1623,7 @@ private: nsresult mRv; }; -} // anonymous namespace +} // namespace static ReturnAbortOnError ProfileLockedDialog(nsIFile* aProfileDir, nsIFile* aProfileLocalDir, @@ -3044,7 +3044,7 @@ XREMain::XRE_mainInit(bool* aExitFlag) namespace mozilla { ShutdownChecksMode gShutdownChecks = SCM_NOTHING; -} +} // namespace mozilla static void SetShutdownChecks() { // Set default first. On debug builds we crash. On nightly and local diff --git a/toolkit/xre/nsAppRunner.h b/toolkit/xre/nsAppRunner.h index 7f56986d68..9480020a6f 100644 --- a/toolkit/xre/nsAppRunner.h +++ b/toolkit/xre/nsAppRunner.h @@ -112,8 +112,8 @@ WinLaunchChild(const wchar_t *exePath, int argc, namespace mozilla { namespace startup { extern GeckoProcessType sChildProcessType; -} -} +} // namespace startup +} // namespace mozilla /** * Set up platform specific error handling such as suppressing DLL load dialog diff --git a/toolkit/xre/nsCommandLineServiceMac.h b/toolkit/xre/nsCommandLineServiceMac.h index 4679acd34b..f21596856e 100644 --- a/toolkit/xre/nsCommandLineServiceMac.h +++ b/toolkit/xre/nsCommandLineServiceMac.h @@ -15,6 +15,6 @@ namespace CommandLineServiceMac { // SetupMacCommandLine. Returns false if no command line is // being set up or the addition fails for any other reason. bool AddURLToCurrentCommandLine(const char* aURL); -} +} // namespace CommandLineServiceMac #endif // nsCommandLineServiceMac_h_ diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index bf2f74758d..b7f3877aff 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -217,8 +217,8 @@ XRE_ChildProcessTypeToString(GeckoProcessType aProcessType) namespace mozilla { namespace startup { GeckoProcessType sChildProcessType = GeckoProcessType_Default; -} -} +} // namespace startup +} // namespace mozilla void XRE_SetProcessType(const char* aProcessTypeString) @@ -733,7 +733,8 @@ TestShellParent* GetOrCreateTestShellParent() } return tsp; } -} + +} // namespace bool XRE_SendTestShellCommand(JSContext* aCx, diff --git a/uriloader/exthandler/ExternalHelperAppParent.h b/uriloader/exthandler/ExternalHelperAppParent.h index 039e1be078..270b8af8ae 100644 --- a/uriloader/exthandler/ExternalHelperAppParent.h +++ b/uriloader/exthandler/ExternalHelperAppParent.h @@ -13,7 +13,7 @@ namespace IPC { class URI; -} +} // namespace IPC namespace mozilla { diff --git a/uriloader/prefetch/OfflineCacheUpdateChild.cpp b/uriloader/prefetch/OfflineCacheUpdateChild.cpp index d94b242f91..db1d1c23f9 100644 --- a/uriloader/prefetch/OfflineCacheUpdateChild.cpp +++ b/uriloader/prefetch/OfflineCacheUpdateChild.cpp @@ -533,5 +533,5 @@ OfflineCacheUpdateChild::RecvFinish(const bool &succeeded, return true; } -} -} +} // namespace docshell +} // namespace mozilla diff --git a/uriloader/prefetch/OfflineCacheUpdateChild.h b/uriloader/prefetch/OfflineCacheUpdateChild.h index 3edf383e61..f99b66e948 100644 --- a/uriloader/prefetch/OfflineCacheUpdateChild.h +++ b/uriloader/prefetch/OfflineCacheUpdateChild.h @@ -88,7 +88,7 @@ private: uint64_t mByteProgress; }; -} -} +} // namespace docshell +} // namespace mozilla #endif diff --git a/uriloader/prefetch/OfflineCacheUpdateGlue.cpp b/uriloader/prefetch/OfflineCacheUpdateGlue.cpp index bfcb253931..96e59a18e4 100644 --- a/uriloader/prefetch/OfflineCacheUpdateGlue.cpp +++ b/uriloader/prefetch/OfflineCacheUpdateGlue.cpp @@ -221,5 +221,5 @@ OfflineCacheUpdateGlue::ApplicationCacheAvailable(nsIApplicationCache *aApplicat return NS_OK; } -} -} +} // namespace docshell +} // namespace mozilla diff --git a/uriloader/prefetch/OfflineCacheUpdateGlue.h b/uriloader/prefetch/OfflineCacheUpdateGlue.h index b4a9b96ca9..fdd51af4b0 100644 --- a/uriloader/prefetch/OfflineCacheUpdateGlue.h +++ b/uriloader/prefetch/OfflineCacheUpdateGlue.h @@ -74,7 +74,7 @@ private: nsCOMPtr mDocumentURI; }; -} -} +} // namespace docshell +} // namespace mozilla #endif diff --git a/uriloader/prefetch/OfflineCacheUpdateParent.cpp b/uriloader/prefetch/OfflineCacheUpdateParent.cpp index ea4e58cc97..44102bb43d 100644 --- a/uriloader/prefetch/OfflineCacheUpdateParent.cpp +++ b/uriloader/prefetch/OfflineCacheUpdateParent.cpp @@ -265,5 +265,5 @@ OfflineCacheUpdateParent::GetAppId(uint32_t *aAppId) return NS_OK; } -} // docshell -} // mozilla +} // namespace docshell +} // namespace mozilla diff --git a/uriloader/prefetch/nsOfflineCacheUpdate.cpp b/uriloader/prefetch/nsOfflineCacheUpdate.cpp index 0eb02d0d50..2a7c0dadfd 100644 --- a/uriloader/prefetch/nsOfflineCacheUpdate.cpp +++ b/uriloader/prefetch/nsOfflineCacheUpdate.cpp @@ -80,7 +80,7 @@ private: char **mValues; }; -namespace { // anon +namespace { nsresult DropReferenceFromURL(nsIURI * aURI) @@ -109,7 +109,7 @@ LogToConsole(const char * message, nsOfflineCacheUpdateItem * item = nullptr) } } -} // anon namespace +} // namespace //----------------------------------------------------------------------------- // nsManifestCheck diff --git a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp index 9f4b6f9d2b..d3f7b2ee7c 100644 --- a/uriloader/prefetch/nsOfflineCacheUpdateService.cpp +++ b/uriloader/prefetch/nsOfflineCacheUpdateService.cpp @@ -89,7 +89,7 @@ PRLogModuleInfo *gOfflineCacheUpdateLog; #undef LOG_ENABLED #define LOG_ENABLED() PR_LOG_TEST(gOfflineCacheUpdateLog, 4) -namespace { // anon +namespace { nsresult GetAppIDAndInBrowserFromWindow(nsIDOMWindow *aWindow, @@ -119,7 +119,7 @@ GetAppIDAndInBrowserFromWindow(nsIDOMWindow *aWindow, return NS_OK; } -} // anon +} // namespace //----------------------------------------------------------------------------- // nsOfflineCachePendingUpdate diff --git a/widget/BasicEvents.h b/widget/BasicEvents.h index 5495ccd17e..99ad37020b 100644 --- a/widget/BasicEvents.h +++ b/widget/BasicEvents.h @@ -462,7 +462,7 @@ namespace IPC { template struct ParamTraits; -} +} // namespace IPC namespace mozilla { diff --git a/widget/ContentHelper.cpp b/widget/ContentHelper.cpp index 5233bda55c..8f019502bb 100644 --- a/widget/ContentHelper.cpp +++ b/widget/ContentHelper.cpp @@ -90,5 +90,5 @@ ContentHelper::GetAllowedTouchBehavior(nsIWidget* aWidget, const nsIntPoint& aPo return behavior; } -} -} +} // namespace widget +} // namespace mozilla diff --git a/widget/ContentHelper.h b/widget/ContentHelper.h index ba9aca1f97..acd41b52b3 100644 --- a/widget/ContentHelper.h +++ b/widget/ContentHelper.h @@ -33,7 +33,7 @@ public: static TouchBehaviorFlags GetAllowedTouchBehavior(nsIWidget* aWidget, const nsIntPoint& aPoint); }; -} -} +} // namespace widget +} // namespace mozilla #endif /*__mozilla_widget_ContentHelper_h__ */ \ No newline at end of file diff --git a/widget/FontRange.h b/widget/FontRange.h index e2de0f4a14..15cb4a01da 100644 --- a/widget/FontRange.h +++ b/widget/FontRange.h @@ -22,6 +22,6 @@ struct FontRange gfxFloat mFontSize; // in device pixels }; -} +} // namespace mozilla #endif // mozilla_FontRange_h_ diff --git a/widget/GfxDriverInfo.h b/widget/GfxDriverInfo.h index 5bb1422fc5..79e7c5da54 100644 --- a/widget/GfxDriverInfo.h +++ b/widget/GfxDriverInfo.h @@ -274,7 +274,7 @@ ParseDriverVersion(const nsAString& aVersion, uint64_t *aNumericVersion) #endif } -} -} +} // namespace widget +} // namespace mozilla #endif /*__mozilla_widget_GfxDriverInfo_h__ */ diff --git a/widget/GfxInfoBase.h b/widget/GfxInfoBase.h index 8b882a3b7c..29cb480ebf 100644 --- a/widget/GfxInfoBase.h +++ b/widget/GfxInfoBase.h @@ -107,7 +107,7 @@ private: }; -} -} +} // namespace widget +} // namespace mozilla #endif /* __mozilla_widget_GfxInfoBase_h__ */ diff --git a/widget/GfxInfoCollector.h b/widget/GfxInfoCollector.h index 32b2dce6c3..9436b23335 100644 --- a/widget/GfxInfoCollector.h +++ b/widget/GfxInfoCollector.h @@ -88,7 +88,7 @@ class GfxInfoCollector : public GfxInfoCollectorBase }; -} -} +} // namespace widget +} // namespace mozilla #endif diff --git a/widget/GfxInfoWebGL.h b/widget/GfxInfoWebGL.h index 8be8bf9434..f18be14f0d 100644 --- a/widget/GfxInfoWebGL.h +++ b/widget/GfxInfoWebGL.h @@ -21,7 +21,7 @@ protected: GfxInfoWebGL() { } }; -} -} +} // namespace widget +} // namespace mozilla #endif diff --git a/widget/InputData.h b/widget/InputData.h index 967fb18277..bc30a80c71 100644 --- a/widget/InputData.h +++ b/widget/InputData.h @@ -20,11 +20,11 @@ namespace mozilla { namespace dom { class Touch; -} +} // namespace dom namespace gfx { class Matrix4x4; -} +} // namespace gfx enum InputType { @@ -507,6 +507,6 @@ public: ParentLayerPoint mLocalOrigin; }; -} +} // namespace mozilla #endif // InputData_h__ diff --git a/widget/PluginWidgetProxy.cpp b/widget/PluginWidgetProxy.cpp index 4249aa150f..a2c1009884 100644 --- a/widget/PluginWidgetProxy.cpp +++ b/widget/PluginWidgetProxy.cpp @@ -150,5 +150,5 @@ PluginWidgetProxy::SetFocus(bool aRaise) return NS_OK; } -} // namespace widget -} // namespace mozilla +} // namespace widget +} // namespace mozilla diff --git a/widget/PluginWidgetProxy.h b/widget/PluginWidgetProxy.h index 3989465e9a..428b75bd0f 100644 --- a/widget/PluginWidgetProxy.h +++ b/widget/PluginWidgetProxy.h @@ -18,7 +18,7 @@ namespace mozilla { namespace plugins { class PluginWidgetChild; -} +} // namespace plugins namespace widget { class PluginWidgetProxy final : public PuppetWidget @@ -65,6 +65,7 @@ private: nsCOMPtr mParent; }; -} // namespace widget -} // namespace mozilla +} // namespace widget +} // namespace mozilla + #endif diff --git a/widget/PuppetWidget.cpp b/widget/PuppetWidget.cpp index 984b2edcd8..20acb70b24 100644 --- a/widget/PuppetWidget.cpp +++ b/widget/PuppetWidget.cpp @@ -1126,5 +1126,5 @@ PuppetScreenManager::GetSystemDefaultScale(float *aDefaultScale) return NS_OK; } -} // namespace widget -} // namespace mozilla +} // namespace widget +} // namespace mozilla diff --git a/widget/PuppetWidget.h b/widget/PuppetWidget.h index 864e6d81d7..a11da70fda 100644 --- a/widget/PuppetWidget.h +++ b/widget/PuppetWidget.h @@ -30,7 +30,7 @@ namespace mozilla { namespace dom { class TabChild; -} +} // namespace dom namespace widget { @@ -351,7 +351,7 @@ protected: nsCOMPtr mOneScreen; }; -} // namespace widget -} // namespace mozilla +} // namespace widget +} // namespace mozilla #endif // mozilla_widget_PuppetWidget_h__ diff --git a/widget/ScreenProxy.h b/widget/ScreenProxy.h index c237816aa4..1747f905ff 100644 --- a/widget/ScreenProxy.h +++ b/widget/ScreenProxy.h @@ -66,5 +66,6 @@ private: } // namespace widget } // namespace mozilla + #endif diff --git a/widget/WidgetTraceEvent.h b/widget/WidgetTraceEvent.h index f920e103d6..d6e8f2c97b 100644 --- a/widget/WidgetTraceEvent.h +++ b/widget/WidgetTraceEvent.h @@ -22,6 +22,6 @@ bool FireAndWaitForTracerEvent(); // Signal that the event has been received by the event loop. void SignalTracerThread(); -} +} // namespace mozilla #endif // WIDGET_PUBLIC_WIDGETTRACEEVENT_H_ diff --git a/widget/cocoa/VibrancyManager.h b/widget/cocoa/VibrancyManager.h index c317f088ff..40d50a3c15 100644 --- a/widget/cocoa/VibrancyManager.h +++ b/widget/cocoa/VibrancyManager.h @@ -115,6 +115,6 @@ protected: nsClassHashtable mVibrantRegions; }; -} +} // namespace mozilla #endif // VibrancyManager_h diff --git a/widget/cocoa/WidgetTraceEvent.mm b/widget/cocoa/WidgetTraceEvent.mm index ff51fc04e9..7023a17ba0 100644 --- a/widget/cocoa/WidgetTraceEvent.mm +++ b/widget/cocoa/WidgetTraceEvent.mm @@ -19,7 +19,7 @@ Mutex* sMutex = NULL; CondVar* sCondVar = NULL; bool sTracerProcessed = false; -} +} // namespace namespace mozilla { diff --git a/widget/cocoa/nsChildView.h b/widget/cocoa/nsChildView.h index 3d88077a8f..e6aa017c54 100644 --- a/widget/cocoa/nsChildView.h +++ b/widget/cocoa/nsChildView.h @@ -40,15 +40,15 @@ class nsCocoaWindow; namespace { class GLPresenter; class RectTextureImage; -} +} // namespace namespace mozilla { class VibrancyManager; namespace layers { class GLManager; class APZCTreeManager; -} -} +} // namespace layers +} // namespace mozilla @interface NSEvent (Undocumented) diff --git a/widget/cocoa/nsCocoaUtils.h b/widget/cocoa/nsCocoaUtils.h index 48fe03f756..8787be2b51 100644 --- a/widget/cocoa/nsCocoaUtils.h +++ b/widget/cocoa/nsCocoaUtils.h @@ -49,8 +49,8 @@ class nsIWidget; namespace mozilla { namespace gfx { class SourceSurface; -} -} +} // namespace gfx +} // namespace mozilla // Used to retain a Cocoa object for the remainder of a method's execution. class nsAutoRetainCocoaObject { diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm index 33c358fc64..8a0a324c5f 100644 --- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -45,8 +45,8 @@ namespace mozilla { namespace layers { class LayerManager; -} -} +} // namespace layers +} // namespace mozilla using namespace mozilla::layers; using namespace mozilla::widget; using namespace mozilla; diff --git a/widget/cocoa/nsMenuUtilsX.h b/widget/cocoa/nsMenuUtilsX.h index 2a99af4858..af22774567 100644 --- a/widget/cocoa/nsMenuUtilsX.h +++ b/widget/cocoa/nsMenuUtilsX.h @@ -26,6 +26,6 @@ namespace nsMenuUtilsX NSMenuItem* GetStandardEditMenuItem(); // returned object is not retained bool NodeIsHiddenOrCollapsed(nsIContent* inContent); int CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuObjectX* aChild); -} +} // namespace nsMenuUtilsX #endif // nsMenuUtilsX_h_ diff --git a/widget/cocoa/nsWidgetFactory.mm b/widget/cocoa/nsWidgetFactory.mm index 342096c12f..af6090d574 100644 --- a/widget/cocoa/nsWidgetFactory.mm +++ b/widget/cocoa/nsWidgetFactory.mm @@ -86,8 +86,8 @@ namespace mozilla { namespace widget { // This constructor should really be shared with all platforms. NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init) -} -} +} // namespace widget +} // namespace mozilla NS_DEFINE_NAMED_CID(NS_WINDOW_CID); NS_DEFINE_NAMED_CID(NS_POPUP_CID); diff --git a/widget/gonk/GeckoTouchDispatcher.h b/widget/gonk/GeckoTouchDispatcher.h index 4d31818b5e..bdb355851b 100644 --- a/widget/gonk/GeckoTouchDispatcher.h +++ b/widget/gonk/GeckoTouchDispatcher.h @@ -86,4 +86,5 @@ private: }; } // namespace mozilla + #endif // GECKO_TOUCH_INPUT_DISPATCHER_h diff --git a/widget/gonk/GonkMemoryPressureMonitoring.cpp b/widget/gonk/GonkMemoryPressureMonitoring.cpp index ac018c046a..cf6d0cbe72 100644 --- a/widget/gonk/GonkMemoryPressureMonitoring.cpp +++ b/widget/gonk/GonkMemoryPressureMonitoring.cpp @@ -273,7 +273,7 @@ private: NS_IMPL_ISUPPORTS(MemoryPressureWatcher, nsIRunnable, nsIObserver); -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/widget/gonk/GonkPermission.h b/widget/gonk/GonkPermission.h index 5e40b2a277..d34fcd8ac1 100644 --- a/widget/gonk/GonkPermission.h +++ b/widget/gonk/GonkPermission.h @@ -80,5 +80,7 @@ private: GonkPermissionService(): android::BnPermissionController() {} nsTArray mGrantArray; }; + } // namespace mozilla + #endif // GONKPERMISSION_H diff --git a/widget/gonk/OrientationObserver.cpp b/widget/gonk/OrientationObserver.cpp index dd70293fa6..187ed337eb 100644 --- a/widget/gonk/OrientationObserver.cpp +++ b/widget/gonk/OrientationObserver.cpp @@ -153,7 +153,7 @@ ConvertToDomOrientation(uint32_t aRotation, ScreenOrientation *aResult) // should be on the main thread. static StaticAutoPtr sOrientationSensorObserver; -} // Anonymous namespace +} // namespace OrientationObserver* OrientationObserver::GetInstance() diff --git a/widget/gonk/ProcessOrientation.h b/widget/gonk/ProcessOrientation.h index d565e7fde4..d6d4bc3b6c 100644 --- a/widget/gonk/ProcessOrientation.h +++ b/widget/gonk/ProcessOrientation.h @@ -107,4 +107,5 @@ private: }; } // namespace mozilla + #endif diff --git a/widget/gonk/WidgetTraceEvent.cpp b/widget/gonk/WidgetTraceEvent.cpp index 48e5b47391..ac14cfa0af 100644 --- a/widget/gonk/WidgetTraceEvent.cpp +++ b/widget/gonk/WidgetTraceEvent.cpp @@ -92,5 +92,5 @@ namespace mozilla { return sTracerRunnable->Signal(); } } -} // namespace mozilla +} // namespace mozilla diff --git a/widget/gonk/libdisplay/GonkDisplayICS.cpp b/widget/gonk/libdisplay/GonkDisplayICS.cpp index 5a302662fa..c99de00de2 100644 --- a/widget/gonk/libdisplay/GonkDisplayICS.cpp +++ b/widget/gonk/libdisplay/GonkDisplayICS.cpp @@ -68,7 +68,7 @@ frameBufferWatcher(void *) return nullptr; } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp index 20367a5de3..810b2b1cfb 100644 --- a/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp +++ b/widget/gonk/nativewindow/GonkBufferQueueLL/GonkBufferQueueConsumer.cpp @@ -555,4 +555,5 @@ GonkBufferQueueConsumer::getSlotFromTextureClientLocked(GonkBufferSlot::TextureC ALOGE("getSlotFromBufferLocked: unknown TextureClient: %p", client); return BAD_VALUE; } + } // namespace android diff --git a/widget/gtk/WidgetTraceEvent.cpp b/widget/gtk/WidgetTraceEvent.cpp index 248d599797..f21cf37243 100644 --- a/widget/gtk/WidgetTraceEvent.cpp +++ b/widget/gtk/WidgetTraceEvent.cpp @@ -75,4 +75,4 @@ void SignalTracerThread() } } -} // namespace mozilla +} // namespace mozilla diff --git a/widget/nsBaseDragService.h b/widget/nsBaseDragService.h index d27d0950e0..8b8114a383 100644 --- a/widget/nsBaseDragService.h +++ b/widget/nsBaseDragService.h @@ -30,8 +30,8 @@ class nsICanvasElementExternal; namespace mozilla { namespace gfx { class SourceSurface; -} -} +} // namespace gfx +} // namespace mozilla /** * XP DragService wrapper base class diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index d3c5ad1074..254469b1a0 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -40,10 +40,10 @@ namespace mozilla { class CompositorVsyncDispatcher; namespace dom { class TabChild; -} +} // namespace dom namespace plugins { class PluginWidgetChild; -} +} // namespace plugins namespace layers { class Composer2D; class Compositor; diff --git a/widget/nsIdleService.cpp b/widget/nsIdleService.cpp index 85fe94ff71..a7993bc720 100644 --- a/widget/nsIdleService.cpp +++ b/widget/nsIdleService.cpp @@ -382,7 +382,7 @@ nsIdleServiceDaily::DailyCallback(nsITimer* aTimer, void* aClosure) namespace { nsIdleService* gIdleService; -} +} // namespace already_AddRefed nsIdleService::GetInstance() diff --git a/widget/windows/WidgetTraceEvent.cpp b/widget/windows/WidgetTraceEvent.cpp index 1485e759db..aaee0c1b99 100644 --- a/widget/windows/WidgetTraceEvent.cpp +++ b/widget/windows/WidgetTraceEvent.cpp @@ -129,4 +129,4 @@ bool FireAndWaitForTracerEvent() return true; } -} // namespace mozilla +} // namespace mozilla diff --git a/widget/windows/WindowHook.cpp b/widget/windows/WindowHook.cpp index 8e87a3a55e..b2a3167d31 100644 --- a/widget/windows/WindowHook.cpp +++ b/widget/windows/WindowHook.cpp @@ -123,6 +123,7 @@ WindowHook::CallbackData::Invoke(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar return false; return cb(context, hWnd, msg, wParam, lParam, aResult); } + } // namespace widget } // namespace mozilla diff --git a/widget/windows/nsColorPicker.cpp b/widget/windows/nsColorPicker.cpp index f6a4d679c5..65bb945e76 100644 --- a/widget/windows/nsColorPicker.cpp +++ b/widget/windows/nsColorPicker.cpp @@ -89,7 +89,7 @@ BGRIntToRGBString(DWORD color, nsAString& aResult) aResult.Append(ToHexString(g)); aResult.Append(ToHexString(b)); } -} // anonymous namespace +} // namespace static AsyncColorChooser* gColorChooser; diff --git a/xpcom/base/AvailableMemoryTracker.cpp b/xpcom/base/AvailableMemoryTracker.cpp index e98018548f..1cfb97625c 100644 --- a/xpcom/base/AvailableMemoryTracker.cpp +++ b/xpcom/base/AvailableMemoryTracker.cpp @@ -477,7 +477,7 @@ nsMemoryPressureWatcher::Observe(nsISupports* aSubject, const char* aTopic, return NS_OK; } -} // anonymous namespace +} // namespace namespace mozilla { namespace AvailableMemoryTracker { diff --git a/xpcom/base/CycleCollectedJSRuntime.h b/xpcom/base/CycleCollectedJSRuntime.h index b09dacc150..eae7c0f26d 100644 --- a/xpcom/base/CycleCollectedJSRuntime.h +++ b/xpcom/base/CycleCollectedJSRuntime.h @@ -22,7 +22,7 @@ class nsIRunnable; namespace js { struct Class; -} +} // namespace js namespace mozilla { diff --git a/xpcom/base/ErrorNames.h b/xpcom/base/ErrorNames.h index 1862c0f679..5a7d2bd039 100644 --- a/xpcom/base/ErrorNames.h +++ b/xpcom/base/ErrorNames.h @@ -19,6 +19,6 @@ namespace mozilla { // "NS_ERROR_GENERATE_FAILURE(, )". void GetErrorName(nsresult rv, nsACString& name); -} +} // namespace mozilla #endif // mozilla_ErrorNames_h diff --git a/xpcom/base/nsAlgorithm.h b/xpcom/base/nsAlgorithm.h index a9a6f6e4aa..ceaa3ace33 100644 --- a/xpcom/base/nsAlgorithm.h +++ b/xpcom/base/nsAlgorithm.h @@ -45,7 +45,7 @@ clamped(const T& aA, const T& aMin, const T& aMax) return XPCOM_MIN(XPCOM_MAX(aA, aMin), aMax); } -} +} // namespace mozilla template inline uint32_t diff --git a/xpcom/base/nsConsoleService.cpp b/xpcom/base/nsConsoleService.cpp index a12d30a5f4..ef67d0ea32 100644 --- a/xpcom/base/nsConsoleService.cpp +++ b/xpcom/base/nsConsoleService.cpp @@ -162,7 +162,7 @@ LogMessageRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace // nsIConsoleService methods NS_IMETHODIMP diff --git a/xpcom/base/nsMemoryInfoDumper.cpp b/xpcom/base/nsMemoryInfoDumper.cpp index ec0be76d0d..a9315d492e 100644 --- a/xpcom/base/nsMemoryInfoDumper.cpp +++ b/xpcom/base/nsMemoryInfoDumper.cpp @@ -130,7 +130,7 @@ private: NS_IMPL_ISUPPORTS_INHERITED(GCAndCCLogDumpRunnable, nsRunnable, nsIDumpGCAndCCLogsCallback) -} // anonymous namespace +} // namespace #if defined(MOZ_SUPPORTS_RT_SIGNALS) // { namespace { @@ -188,7 +188,7 @@ void doGCCCDump(const uint8_t aRecvSig) NS_DispatchToMainThread(runnable); } -} // anonymous namespace +} // namespace #endif // MOZ_SUPPORTS_RT_SIGNALS } #if defined(MOZ_SUPPORTS_FIFO) // { @@ -258,7 +258,7 @@ OnFifoEnabledChange(const char* /*unused*/, void* /*unused*/) } } -} // anonymous namespace +} // namespace #endif // MOZ_SUPPORTS_FIFO } NS_IMPL_ISUPPORTS(nsMemoryInfoDumper, nsIMemoryInfoDumper) diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp index 7ead5fc38d..6a2a5080d4 100644 --- a/xpcom/base/nsMemoryReporterManager.cpp +++ b/xpcom/base/nsMemoryReporterManager.cpp @@ -2077,7 +2077,7 @@ private: uint32_t mRemainingIters; }; -} // anonymous namespace +} // namespace NS_IMETHODIMP nsMemoryReporterManager::MinimizeMemoryUsage(nsIRunnable* aCallback) @@ -2242,7 +2242,7 @@ DEFINE_REGISTER_SIZE_OF_TAB(NonJS); #undef GET_MEMORY_REPORTER_MANAGER -} +} // namespace mozilla #if defined(MOZ_DMD) diff --git a/xpcom/base/nsMemoryReporterManager.h b/xpcom/base/nsMemoryReporterManager.h index a48caad2ff..925f192b7d 100644 --- a/xpcom/base/nsMemoryReporterManager.h +++ b/xpcom/base/nsMemoryReporterManager.h @@ -19,8 +19,8 @@ class nsITimer; namespace mozilla { namespace dom { class MemoryReport; -} -} +} // namespace dom +} // namespace mozilla class nsMemoryReporterManager final : public nsIMemoryReporterManager { diff --git a/xpcom/base/nsMessageLoop.cpp b/xpcom/base/nsMessageLoop.cpp index e3f67aa8c1..968bfee63d 100644 --- a/xpcom/base/nsMessageLoop.cpp +++ b/xpcom/base/nsMessageLoop.cpp @@ -141,7 +141,7 @@ MessageLoopTimerCallback::Notify(nsITimer* aTimer) NS_IMPL_ISUPPORTS(MessageLoopTimerCallback, nsITimerCallback) -} // anonymous namespace +} // namespace NS_IMPL_ISUPPORTS(nsMessageLoop, nsIMessageLoop) diff --git a/xpcom/build/BinaryPath.h b/xpcom/build/BinaryPath.h index 155f38c233..afe3f6adac 100644 --- a/xpcom/build/BinaryPath.h +++ b/xpcom/build/BinaryPath.h @@ -181,6 +181,6 @@ public: } }; -} +} // namespace mozilla #endif /* mozilla_BinaryPath_h */ diff --git a/xpcom/build/IOInterposer.cpp b/xpcom/build/IOInterposer.cpp index 08d612dbf2..0cec259300 100644 --- a/xpcom/build/IOInterposer.cpp +++ b/xpcom/build/IOInterposer.cpp @@ -357,7 +357,7 @@ public: // List of observers registered static StaticAutoPtr sMasterList; static ThreadLocal sThreadLocalData; -} // anonymous namespace +} // namespace IOInterposeObserver::Observation::Observation(Operation aOperation, const char* aReference, diff --git a/xpcom/build/MainThreadIOLogger.cpp b/xpcom/build/MainThreadIOLogger.cpp index 174861947a..0ca942cb9f 100644 --- a/xpcom/build/MainThreadIOLogger.cpp +++ b/xpcom/build/MainThreadIOLogger.cpp @@ -201,7 +201,7 @@ MainThreadIOLoggerImpl::Observe(Observation& aObservation) lock.Notify(); } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/xpcom/build/NSPRInterposer.cpp b/xpcom/build/NSPRInterposer.cpp index b7f75a8c6e..8b69c19c38 100644 --- a/xpcom/build/NSPRInterposer.cpp +++ b/xpcom/build/NSPRInterposer.cpp @@ -98,7 +98,7 @@ interposedFileInfo64(PRFileDesc* aFd, PRFileInfo64* aInfo) return sFileInfo64Fn(aFd, aInfo); } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/xpcom/build/PoisonIOInterposerBase.cpp b/xpcom/build/PoisonIOInterposerBase.cpp index f97e3dd1cd..36396442fd 100644 --- a/xpcom/build/PoisonIOInterposerBase.cpp +++ b/xpcom/build/PoisonIOInterposerBase.cpp @@ -206,7 +206,7 @@ getDebugFileIDs() } -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/xpcom/build/PoisonIOInterposerMac.cpp b/xpcom/build/PoisonIOInterposerMac.cpp index 9ca59eacd5..2618b864d8 100644 --- a/xpcom/build/PoisonIOInterposerMac.cpp +++ b/xpcom/build/PoisonIOInterposerMac.cpp @@ -323,7 +323,7 @@ FuncData* Functions[] = { const int NumFunctions = ArrayLength(Functions); -} // anonymous namespace +} // namespace /******************************** IO Poisoning ********************************/ diff --git a/xpcom/build/PoisonIOInterposerWin.cpp b/xpcom/build/PoisonIOInterposerWin.cpp index 5e45183ac2..262e6c89a2 100644 --- a/xpcom/build/PoisonIOInterposerWin.cpp +++ b/xpcom/build/PoisonIOInterposerWin.cpp @@ -423,7 +423,7 @@ InterposedNtQueryFullAttributesFile( aFileInformation); } -} // anonymous namespace +} // namespace /******************************** IO Poisoning ********************************/ diff --git a/xpcom/build/ServiceList.h b/xpcom/build/ServiceList.h index 8e4efe1a98..43e60c8550 100644 --- a/xpcom/build/ServiceList.h +++ b/xpcom/build/ServiceList.h @@ -43,6 +43,6 @@ MOZ_SERVICE(HistoryService, IHistory, "@mozilla.org/browser/history;1") #ifdef MOZ_USE_NAMESPACE -} +} // namespace mozilla #endif #endif // !defined(MOZILLA_XPCOMRT_API) diff --git a/xpcom/build/nsXPCOM.h b/xpcom/build/nsXPCOM.h index c0331aea31..da62b6a722 100644 --- a/xpcom/build/nsXPCOM.h +++ b/xpcom/build/nsXPCOM.h @@ -34,7 +34,7 @@ DECL_CLASS(nsIDebug); #ifdef __cplusplus namespace mozilla { struct Module; -} +} // namespace mozilla #endif /** diff --git a/xpcom/build/nsXULAppAPI.h b/xpcom/build/nsXULAppAPI.h index b10911519a..0d407cdcc8 100644 --- a/xpcom/build/nsXULAppAPI.h +++ b/xpcom/build/nsXULAppAPI.h @@ -378,7 +378,7 @@ namespace mozilla { namespace gmp { class GMPLoader; } // namespace gmp -} // namepsace mozilla +} // namespace mozilla XRE_API(nsresult, XRE_InitChildProcess, (int aArgc, diff --git a/xpcom/build/perfprobe.cpp b/xpcom/build/perfprobe.cpp index 900f2b5974..9eb99f3fe3 100644 --- a/xpcom/build/perfprobe.cpp +++ b/xpcom/build/perfprobe.cpp @@ -243,5 +243,5 @@ ProbeManager::StopSession() return NS_OK; } -} // namespace probes -} // namespace mozilla +} // namespace probes +} // namespace mozilla diff --git a/xpcom/build/perfprobe.h b/xpcom/build/perfprobe.h index b46a93cdc8..e7245a1401 100644 --- a/xpcom/build/perfprobe.h +++ b/xpcom/build/perfprobe.h @@ -197,7 +197,7 @@ protected: PVOID aBuffer); // Sets |mSessionHandle| }; -} // namespace probes -} // namespace mozilla +} // namespace probes +} // namespace mozilla #endif //mozilla_perfprobe_h diff --git a/xpcom/components/ManifestParser.cpp b/xpcom/components/ManifestParser.cpp index b1780204a9..939f09669d 100644 --- a/xpcom/components/ManifestParser.cpp +++ b/xpcom/components/ManifestParser.cpp @@ -167,7 +167,7 @@ struct AutoPR_smprintf_free char* mBuf; }; -} // anonymous namespace +} // namespace /** * If we are pre-loading XPTs, this method may do nothing because the @@ -461,7 +461,7 @@ struct CachedDirective char* argv[4]; }; -} // anonymous namespace +} // namespace /** diff --git a/xpcom/components/Module.h b/xpcom/components/Module.h index 19dbbe86a3..0b38f50360 100644 --- a/xpcom/components/Module.h +++ b/xpcom/components/Module.h @@ -114,7 +114,7 @@ struct Module UnloadFuncPtr unloadProc; }; -} // namespace +} // namespace mozilla #if defined(MOZILLA_INTERNAL_API) # define NSMODULE_NAME(_name) _name##_NSModule diff --git a/xpcom/components/nsCategoryManager.cpp b/xpcom/components/nsCategoryManager.cpp index 09f14f7a8a..a553b303d1 100644 --- a/xpcom/components/nsCategoryManager.cpp +++ b/xpcom/components/nsCategoryManager.cpp @@ -564,7 +564,7 @@ CategoryNotificationRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace void diff --git a/xpcom/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp index 075465c187..47ec2755e3 100644 --- a/xpcom/components/nsComponentManager.cpp +++ b/xpcom/components/nsComponentManager.cpp @@ -250,7 +250,7 @@ private: bool mLocked; }; -} // anonymous namespace +} // namespace #if !defined(MOZILLA_XPCOMRT_API) // this is safe to call during InitXPCOM diff --git a/xpcom/components/nsNativeModuleLoader.h b/xpcom/components/nsNativeModuleLoader.h index f4da312137..88e1490f3f 100644 --- a/xpcom/components/nsNativeModuleLoader.h +++ b/xpcom/components/nsNativeModuleLoader.h @@ -12,7 +12,7 @@ namespace mozilla { class FileLocation; -} +} // namespace mozilla class nsNativeModuleLoader final { diff --git a/xpcom/glue/FileUtils.h b/xpcom/glue/FileUtils.h index 510432473b..f6242c9d8d 100644 --- a/xpcom/glue/FileUtils.h +++ b/xpcom/glue/FileUtils.h @@ -210,4 +210,5 @@ bool ReadSysFile(const char* aFilename, bool* aVal); #endif /* (MOZ_WIDGET_GONK || DEBUG) && XP_UNIX */ } // namespace mozilla + #endif diff --git a/xpcom/glue/nsISupportsImpl.h b/xpcom/glue/nsISupportsImpl.h index 8e842c31ab..fd201e5c03 100644 --- a/xpcom/glue/nsISupportsImpl.h +++ b/xpcom/glue/nsISupportsImpl.h @@ -81,7 +81,7 @@ struct HasDangerousPublicDestructor : IsDestructibleFallbackImpl::Selector::type { }; - } + } // namespace mozilla # define MOZ_IS_DESTRUCTIBLE(X) (mozilla::IsDestructibleFallback::value) #endif @@ -375,7 +375,7 @@ private: // but could break pre-existing code that assumes sequential consistency. Atomic mValue; }; -} +} // namespace mozilla #endif /////////////////////////////////////////////////////////////////////////////// diff --git a/xpcom/glue/nsMemory.h b/xpcom/glue/nsMemory.h index ac3495fb9a..0f36283ff0 100644 --- a/xpcom/glue/nsMemory.h +++ b/xpcom/glue/nsMemory.h @@ -132,7 +132,7 @@ struct AlignmentTestStruct char c; T t; }; -} +} // namespace mozilla #define NS_ALIGNMENT_OF(t_) \ (sizeof(mozilla::AlignmentTestStruct) - sizeof(t_)) diff --git a/xpcom/glue/nsTArray.h b/xpcom/glue/nsTArray.h index 7c7b654648..a867b7f8ff 100644 --- a/xpcom/glue/nsTArray.h +++ b/xpcom/glue/nsTArray.h @@ -38,8 +38,8 @@ class nsIntRegion; namespace mozilla { namespace layers { struct TileClient; -} -} +} // namespace layers +} // namespace mozilla // // nsTArray is a resizable array class, like std::vector. // @@ -310,8 +310,8 @@ struct nsTArray_SafeElementAtHelper, Derived> namespace mozilla { namespace dom { template class OwningNonNull; -} -} +} // namespace dom +} // namespace mozilla template struct nsTArray_SafeElementAtHelper, Derived> diff --git a/xpcom/glue/nsThreadUtils.cpp b/xpcom/glue/nsThreadUtils.cpp index 9346bd1b55..af88a8763c 100644 --- a/xpcom/glue/nsThreadUtils.cpp +++ b/xpcom/glue/nsThreadUtils.cpp @@ -292,7 +292,7 @@ nsNameThreadRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace void NS_SetThreadName(nsIThread* aThread, const nsACString& aName) diff --git a/xpcom/glue/tests/gtest/TestArray.cpp b/xpcom/glue/tests/gtest/TestArray.cpp index e8fe371dcd..546769197f 100644 --- a/xpcom/glue/tests/gtest/TestArray.cpp +++ b/xpcom/glue/tests/gtest/TestArray.cpp @@ -90,7 +90,7 @@ void FillArray(nsISupportsArray* aArray, int32_t aCount) } } -} +} // namespace TestArray using namespace TestArray; diff --git a/xpcom/glue/tests/gtest/TestFileUtils.cpp b/xpcom/glue/tests/gtest/TestFileUtils.cpp index 8630d94154..d78a5329c4 100644 --- a/xpcom/glue/tests/gtest/TestFileUtils.cpp +++ b/xpcom/glue/tests/gtest/TestFileUtils.cpp @@ -279,4 +279,4 @@ TEST(ReadSysFile, Bool) { #endif /* ReadSysFile_PRESENT */ -} +} // namespace mozilla diff --git a/xpcom/glue/tests/gtest/TestThreadUtils.cpp b/xpcom/glue/tests/gtest/TestThreadUtils.cpp index 221ec01e17..908a5a075e 100644 --- a/xpcom/glue/tests/gtest/TestThreadUtils.cpp +++ b/xpcom/glue/tests/gtest/TestThreadUtils.cpp @@ -251,7 +251,7 @@ class ThreadUtilsRefCountedDerived class ThreadUtilsNonRefCounted {}; -} // namespace TestThreadUtils; +} // namespace TestThreadUtils TEST(ThreadUtils, main) { diff --git a/xpcom/io/Base64.cpp b/xpcom/io/Base64.cpp index afa28656b6..fa5b07a1e5 100644 --- a/xpcom/io/Base64.cpp +++ b/xpcom/io/Base64.cpp @@ -226,7 +226,7 @@ EncodeInputStream(nsIInputStream* aInputStream, return NS_OK; } -} // namespace (anonymous) +} // namespace namespace mozilla { diff --git a/xpcom/io/FileUtilsWin.cpp b/xpcom/io/FileUtilsWin.cpp index 09d3f9daf6..6781264ecf 100644 --- a/xpcom/io/FileUtilsWin.cpp +++ b/xpcom/io/FileUtilsWin.cpp @@ -28,7 +28,7 @@ struct ScopedMappedViewTraits }; typedef mozilla::Scoped ScopedMappedView; -} // anonymous namespace +} // namespace namespace mozilla { diff --git a/xpcom/io/SnappyFrameUtils.cpp b/xpcom/io/SnappyFrameUtils.cpp index c3b5976deb..1973152102 100644 --- a/xpcom/io/SnappyFrameUtils.cpp +++ b/xpcom/io/SnappyFrameUtils.cpp @@ -67,7 +67,7 @@ uint32_t MaskChecksum(uint32_t aValue) return ((aValue >> 15) | (aValue << 17)) + 0xa282ead8; } -} // anonymous namespace +} // namespace namespace mozilla { namespace detail { diff --git a/xpcom/io/nsPipe3.cpp b/xpcom/io/nsPipe3.cpp index c5258c09d7..fdcdc15067 100644 --- a/xpcom/io/nsPipe3.cpp +++ b/xpcom/io/nsPipe3.cpp @@ -70,7 +70,7 @@ enum SegmentChangeResult SegmentDeleted }; -} // anonymous namespace +} // namespace //----------------------------------------------------------------------------- @@ -139,7 +139,7 @@ struct nsPipeReadState //----------------------------------------------------------------------------- // an input end of a pipe (maintained as a list of refs within the pipe) -class nsPipeInputStream +class nsPipeInputStream final : public nsIAsyncInputStream , public nsISeekableStream , public nsISearchableInputStream diff --git a/xpcom/libxpcomrt/XPCOMRTStubs.cpp b/xpcom/libxpcomrt/XPCOMRTStubs.cpp index 09edcd7ad7..15b92f842d 100644 --- a/xpcom/libxpcomrt/XPCOMRTStubs.cpp +++ b/xpcom/libxpcomrt/XPCOMRTStubs.cpp @@ -21,7 +21,7 @@ class nsCString; namespace base { class Histogram; -} +} // namespace base namespace mozilla { namespace Telemetry { @@ -43,5 +43,5 @@ base::Histogram* GetKeyedHistogramById(ID id, const nsAString&) return nullptr; } -} // Telemetry -} // mozilla +} // namespace Telemetry +} // namespace mozilla diff --git a/xpcom/reflect/xptinfo/ShimInterfaceInfo.h b/xpcom/reflect/xptinfo/ShimInterfaceInfo.h index ebc86f19c4..f025297aaa 100644 --- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.h +++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.h @@ -21,8 +21,8 @@ namespace mozilla { namespace dom { struct ConstantSpec; struct NativePropertyHooks; -} -} +} // namespace dom +} // namespace mozilla class ShimInterfaceInfo final : public nsIInterfaceInfo { diff --git a/xpcom/reflect/xptinfo/XPTInterfaceInfoManager.h b/xpcom/reflect/xptinfo/XPTInterfaceInfoManager.h index 2ad966a169..e72153ad21 100644 --- a/xpcom/reflect/xptinfo/XPTInterfaceInfoManager.h +++ b/xpcom/reflect/xptinfo/XPTInterfaceInfoManager.h @@ -114,6 +114,6 @@ private: Mutex mResolveLock; }; -} +} // namespace mozilla #endif diff --git a/xpcom/tests/TestHashtables.cpp b/xpcom/tests/TestHashtables.cpp index 06e7d7fbbd..ba9ab1e19d 100644 --- a/xpcom/tests/TestHashtables.cpp +++ b/xpcom/tests/TestHashtables.cpp @@ -366,7 +366,7 @@ nsIEnum2(nsISupports* aKey, uint32_t& aData, void* userArg) { return PL_DHASH_NEXT; } -} +} // namespace TestHashtables using namespace TestHashtables; diff --git a/xpcom/tests/TestTArray.cpp b/xpcom/tests/TestTArray.cpp index 80d359a879..7fcb5c71f7 100644 --- a/xpcom/tests/TestTArray.cpp +++ b/xpcom/tests/TestTArray.cpp @@ -1199,7 +1199,7 @@ static const struct Test { { nullptr, nullptr } }; -} +} // namespace TestTArray using namespace TestTArray; diff --git a/xpcom/tests/gtest/TestCRT.cpp b/xpcom/tests/gtest/TestCRT.cpp index 9f944d21e5..6ef264758c 100644 --- a/xpcom/tests/gtest/TestCRT.cpp +++ b/xpcom/tests/gtest/TestCRT.cpp @@ -81,4 +81,4 @@ TEST(CRT, main) } } -} +} // namespace TestCRT diff --git a/xpcom/tests/gtest/TestExpirationTracker.cpp b/xpcom/tests/gtest/TestExpirationTracker.cpp index 1c4ff70a1d..948a403316 100644 --- a/xpcom/tests/gtest/TestExpirationTracker.cpp +++ b/xpcom/tests/gtest/TestExpirationTracker.cpp @@ -181,4 +181,4 @@ TEST(ExpirationTracker, main) } } -} +} // namespace TestExpirationTracker diff --git a/xpcom/tests/gtest/TestPipes.cpp b/xpcom/tests/gtest/TestPipes.cpp index 3ef5a22bca..e0f5168664 100644 --- a/xpcom/tests/gtest/TestPipes.cpp +++ b/xpcom/tests/gtest/TestPipes.cpp @@ -422,7 +422,7 @@ static void TestPipe2(uint32_t aNumBytes, testing::ConsumeAndValidateStream(reader, inputData); } -} // anonymous namespace +} // namespace TEST(Pipes, Blocking_32k) { @@ -601,7 +601,7 @@ static void TestPipeClone(uint32_t aTotalBytes, } } -} // anonymous namespace +} // namespace TEST(Pipes, Clone_BeforeWrite_ReadAtEnd) { @@ -851,7 +851,7 @@ TestCloseDuringRead(uint32_t aSegmentSize, uint32_t aDataSize) ASSERT_EQ(NS_BASE_STREAM_CLOSED, rv); } -} // anonymous namespace +} // namespace TEST(Pipes, Close_During_Read_Partial_Segment) { diff --git a/xpcom/tests/gtest/TestSnappyStreams.cpp b/xpcom/tests/gtest/TestSnappyStreams.cpp index f869ba4c8f..99f41120b8 100644 --- a/xpcom/tests/gtest/TestSnappyStreams.cpp +++ b/xpcom/tests/gtest/TestSnappyStreams.cpp @@ -98,7 +98,7 @@ static void TestUncompressCorrupt(const char* aCorruptData, ASSERT_EQ(NS_ERROR_CORRUPTED_CONTENT, rv); } -} // anonymous namespace +} // namespace TEST(SnappyStream, Compress_32k) { diff --git a/xpcom/tests/gtest/TestStorageStream.cpp b/xpcom/tests/gtest/TestStorageStream.cpp index f7c9280709..1647e94f56 100644 --- a/xpcom/tests/gtest/TestStorageStream.cpp +++ b/xpcom/tests/gtest/TestStorageStream.cpp @@ -22,7 +22,7 @@ WriteData(nsIOutputStream* aOut, nsTArray& aData, uint32_t aNumBytes, aDataWritten.Append(aData.Elements(), aNumBytes); } -} // anonymous namespace +} // namespace TEST(StorageStreams, Main) { // generate some test data we will write in 4k chunks to the stream diff --git a/xpcom/tests/gtest/TestStringStream.cpp b/xpcom/tests/gtest/TestStringStream.cpp index 785c65a2d8..5c7f2e79f2 100644 --- a/xpcom/tests/gtest/TestStringStream.cpp +++ b/xpcom/tests/gtest/TestStringStream.cpp @@ -48,7 +48,7 @@ static void TestStringStreamClone(uint32_t aNumBytes) testing::ConsumeAndValidateStream(clone, inputString); } -} // anonymous namespace +} // namespace TEST(StringStream, Simple_4k) { diff --git a/xpcom/tests/gtest/TestStrings.cpp b/xpcom/tests/gtest/TestStrings.cpp index 084a9c637a..1860b1f057 100644 --- a/xpcom/tests/gtest/TestStrings.cpp +++ b/xpcom/tests/gtest/TestStrings.cpp @@ -977,4 +977,4 @@ TEST(Strings, todouble) test_todouble_helper(NS_LITERAL_STRING("foo"), 0, false); } -} +} // namespace TestStrings diff --git a/xpcom/tests/gtest/TestUTF.cpp b/xpcom/tests/gtest/TestUTF.cpp index ae267eddf7..2ca41c5545 100644 --- a/xpcom/tests/gtest/TestUTF.cpp +++ b/xpcom/tests/gtest/TestUTF.cpp @@ -120,4 +120,4 @@ TEST(UTF, Hash16) #endif } -} +} // namespace TestUTF diff --git a/xpcom/threads/BackgroundHangMonitor.cpp b/xpcom/threads/BackgroundHangMonitor.cpp index a8474084d1..50ed264aba 100644 --- a/xpcom/threads/BackgroundHangMonitor.cpp +++ b/xpcom/threads/BackgroundHangMonitor.cpp @@ -8,8 +8,10 @@ #include "mozilla/BackgroundHangMonitor.h" #include "mozilla/LinkedList.h" #include "mozilla/Monitor.h" +#include "mozilla/Move.h" #include "mozilla/Preferences.h" #include "mozilla/StaticPtr.h" +#include "mozilla/ThreadHangStats.h" #include "mozilla/ThreadLocal.h" #ifdef MOZ_NUWA_PROCESS #include "ipc/Nuwa.h" @@ -17,6 +19,7 @@ #include "prinrval.h" #include "prthread.h" +#include "ThreadStackHelper.h" #include "nsIObserverService.h" #include "nsIObserver.h" #include "mozilla/Services.h" @@ -142,8 +145,6 @@ public: (void)!sTlsKey.init(); } - // Name of the thread - const nsAutoCString mThreadName; // Hang timeout in ticks const PRIntervalTime mTimeout; // PermaHang timeout in ticks @@ -156,6 +157,12 @@ public: bool mHanging; // Is the thread in a waiting state bool mWaiting; + // Platform-specific helper to get hang stacks + ThreadStackHelper mStackHelper; + // Stack of current hang + Telemetry::HangStack mHangStack; + // Statistics for telemetry + Telemetry::ThreadHangStats mStats; // Annotations for the current hang UniquePtr mAnnotations; // Annotators registered for this thread @@ -166,7 +173,7 @@ public: uint32_t aMaxTimeoutMs); // Report a hang; aManager->mLock IS locked - void ReportHang(PRIntervalTime aHangTime) const; + void ReportHang(PRIntervalTime aHangTime); // Report a permanent hang; aManager->mLock IS locked void ReportPermaHang(); // Called by BackgroundHangMonitor::NotifyActivity @@ -292,6 +299,7 @@ BackgroundHangManager::RunMonitorThread() if (MOZ_LIKELY(!currentThread->mHanging)) { if (MOZ_UNLIKELY(hangTime >= currentThread->mTimeout)) { // A hang started + currentThread->mStackHelper.GetStack(currentThread->mHangStack); currentThread->mHangStart = interval; currentThread->mHanging = true; currentThread->mAnnotations = @@ -329,40 +337,11 @@ BackgroundHangManager::RunMonitorThread() } } -bool -BackgroundHangMonitor::RegisterAnnotator(HangMonitor::Annotator& aAnnotator) -{ -#ifdef MOZ_ENABLE_BACKGROUND_HANG_MONITOR - BackgroundHangThread* thisThread = BackgroundHangThread::FindThread(); - if (!thisThread) { - return false; - } - return thisThread->mAnnotators.Register(aAnnotator); -#else - return false; -#endif -} - -bool -BackgroundHangMonitor::UnregisterAnnotator(HangMonitor::Annotator& aAnnotator) -{ -#ifdef MOZ_ENABLE_BACKGROUND_HANG_MONITOR - BackgroundHangThread* thisThread = BackgroundHangThread::FindThread(); - if (!thisThread) { - return false; - } - return thisThread->mAnnotators.Unregister(aAnnotator); -#else - return false; -#endif -} - BackgroundHangThread::BackgroundHangThread(const char* aName, uint32_t aTimeoutMs, uint32_t aMaxTimeoutMs) : mManager(BackgroundHangManager::sInstance) , mThreadID(PR_GetCurrentThread()) - , mThreadName(aName) , mTimeout(aTimeoutMs == BackgroundHangMonitor::kNoTimeout ? PR_INTERVAL_NO_TIMEOUT : PR_MillisecondsToInterval(aTimeoutMs)) @@ -373,6 +352,7 @@ BackgroundHangThread::BackgroundHangThread(const char* aName, , mHangStart(mInterval) , mHanging(false) , mWaiting(true) + , mStats(aName) { if (sTlsKey.initialized()) { sTlsKey.set(this); @@ -401,10 +381,30 @@ BackgroundHangThread::~BackgroundHangThread() } void -BackgroundHangThread::ReportHang(PRIntervalTime aHangTime) const +BackgroundHangThread::ReportHang(PRIntervalTime aHangTime) { // Recovered from a hang; called on the monitor thread // mManager->mLock IS locked + + // Remove unwanted "js::RunScript" frame from the stack + for (const char** f = &mHangStack.back(); f >= mHangStack.begin(); f--) { + if (!mHangStack.IsInBuffer(*f) && !strcmp(*f, "js::RunScript")) { + mHangStack.erase(f); + } + } + + Telemetry::HangHistogram newHistogram(Move(mHangStack)); + for (Telemetry::HangHistogram* oldHistogram = mStats.mHangs.begin(); + oldHistogram != mStats.mHangs.end(); oldHistogram++) { + if (newHistogram == *oldHistogram) { + // New histogram matches old one + oldHistogram->Add(aHangTime, Move(mAnnotations)); + return; + } + } + // Add new histogram + newHistogram.Add(aHangTime, Move(mAnnotations)); + mStats.mHangs.append(Move(newHistogram)); } void @@ -429,6 +429,7 @@ BackgroundHangThread::NotifyActivity() mManager->Wakeup(); } else { PRIntervalTime duration = intervalNow - mInterval; + mStats.mActivity.Add(duration); if (MOZ_UNLIKELY(duration >= mTimeout)) { /* Wake up the manager thread to tell it that a hang ended */ mManager->Wakeup(); @@ -513,6 +514,7 @@ BackgroundHangMonitor::Startup() if (!strcmp(NS_STRINGIFY(MOZ_UPDATE_CHANNEL), "beta")) { if (XRE_IsParentProcess()) { // cached ClientID hasn't been read yet + ThreadStackHelper::Startup(); BackgroundHangThread::Startup(); BackgroundHangManager::sInstance = new BackgroundHangManager(); @@ -548,6 +550,7 @@ BackgroundHangMonitor::Shutdown() BackgroundHangManager::sInstance->Shutdown(); BackgroundHangManager::sInstance = nullptr; BackgroundHangManager::sDisabled = true; + ThreadStackHelper::Shutdown(); #endif } @@ -631,4 +634,52 @@ BackgroundHangMonitor::Allow() #endif } +bool +BackgroundHangMonitor::RegisterAnnotator(HangMonitor::Annotator& aAnnotator) +{ +#ifdef MOZ_ENABLE_BACKGROUND_HANG_MONITOR + BackgroundHangThread* thisThread = BackgroundHangThread::FindThread(); + if (!thisThread) { + return false; + } + return thisThread->mAnnotators.Register(aAnnotator); +#else + return false; +#endif +} + +bool +BackgroundHangMonitor::UnregisterAnnotator(HangMonitor::Annotator& aAnnotator) +{ +#ifdef MOZ_ENABLE_BACKGROUND_HANG_MONITOR + BackgroundHangThread* thisThread = BackgroundHangThread::FindThread(); + if (!thisThread) { + return false; + } + return thisThread->mAnnotators.Unregister(aAnnotator); +#else + return false; +#endif +} + +/* Because we are iterating through the BackgroundHangThread linked list, + we need to take a lock. Using MonitorAutoLock as a base class makes + sure all of that is taken care of for us. */ +BackgroundHangMonitor::ThreadHangStatsIterator::ThreadHangStatsIterator() + : MonitorAutoLock(BackgroundHangManager::sInstance->mLock) + , mThread(BackgroundHangManager::sInstance->mHangThreads.getFirst()) +{ +} + +Telemetry::ThreadHangStats* +BackgroundHangMonitor::ThreadHangStatsIterator::GetNext() +{ + if (!mThread) { + return nullptr; + } + Telemetry::ThreadHangStats* stats = &mThread->mStats; + mThread = mThread->getNext(); + return stats; +} + } // namespace mozilla diff --git a/xpcom/threads/BackgroundHangMonitor.h b/xpcom/threads/BackgroundHangMonitor.h index c332339015..edb29f15ea 100644 --- a/xpcom/threads/BackgroundHangMonitor.h +++ b/xpcom/threads/BackgroundHangMonitor.h @@ -8,6 +8,7 @@ #define mozilla_BackgroundHangMonitor_h #include "mozilla/HangAnnotations.h" +#include "mozilla/Monitor.h" #include "mozilla/RefPtr.h" #include "nsString.h" @@ -16,6 +17,10 @@ namespace mozilla { +namespace Telemetry { +class ThreadHangStats; +} // namespace Telemetry + class BackgroundHangThread; class BackgroundHangManager; @@ -115,6 +120,44 @@ private: public: static const uint32_t kNoTimeout = 0; + /** + * ThreadHangStatsIterator is used to iterate through the ThreadHangStats + * associated with each active monitored thread. Because of an internal + * lock while this object is alive, a thread must use only one instance + * of this class at a time and must iterate through the list as fast as + * possible. The following example shows using the iterator: + * + * { + * // Scope the iter variable so it's destroyed as soon as we're done + * BackgroundHangMonitor::ThreadHangStatsIterator iter; + * for (ThreadHangStats* histogram = iter.GetNext(); + * histogram; histogram = iter.GetNext()) { + * // Process histogram + * } + * } + */ + class ThreadHangStatsIterator : public MonitorAutoLock + { + private: + BackgroundHangThread* mThread; + + ThreadHangStatsIterator(const ThreadHangStatsIterator&); + ThreadHangStatsIterator& operator=(const ThreadHangStatsIterator&); + + public: + /** + * Create an ThreadHangStatsIterator instance and take the internal lock. + * Internal lock is released on destruction. + */ + ThreadHangStatsIterator(); + + /** + * Get the next item in the list; the first call returns the first item. + * Returns nullptr at the end of the list. + */ + Telemetry::ThreadHangStats* GetNext(); + }; + /** * Enable hang monitoring. * Must return before using BackgroundHangMonitor. diff --git a/xpcom/threads/ThreadStackHelper.cpp b/xpcom/threads/ThreadStackHelper.cpp new file mode 100644 index 0000000000..7d97518d37 --- /dev/null +++ b/xpcom/threads/ThreadStackHelper.cpp @@ -0,0 +1,870 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 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/. */ + +#include "ThreadStackHelper.h" +#include "MainThreadUtils.h" +#include "nsJSPrincipals.h" +#include "nsScriptSecurityManager.h" +#include "jsfriendapi.h" +#include "prprf.h" +#ifdef MOZ_THREADSTACKHELPER_NATIVE +#include "shared-libraries.h" +#endif + +#include "mozilla/Assertions.h" +#include "mozilla/Attributes.h" +#include "mozilla/IntegerPrintfMacros.h" +#include "mozilla/Move.h" +#include "mozilla/Scoped.h" +#include "mozilla/UniquePtr.h" +#include "mozilla/MemoryChecking.h" + +#ifdef MOZ_THREADSTACKHELPER_NATIVE +#include "google_breakpad/processor/call_stack.h" +#include "google_breakpad/processor/basic_source_line_resolver.h" +#include "google_breakpad/processor/stack_frame_cpu.h" +#include "processor/basic_code_module.h" +#include "processor/basic_code_modules.h" +#endif + +#if defined(MOZ_THREADSTACKHELPER_X86) +#include "processor/stackwalker_x86.h" +#elif defined(MOZ_THREADSTACKHELPER_X64) +#include "processor/stackwalker_amd64.h" +#elif defined(MOZ_THREADSTACKHELPER_ARM) +#include "processor/stackwalker_arm.h" +#endif + +#if defined(MOZ_VALGRIND) +# include +#endif + +#include +#include +#include + +#ifdef XP_LINUX +#ifdef ANDROID +// Android NDK doesn't contain ucontext.h; use Breakpad's copy. +# include "common/android/include/sys/ucontext.h" +#else +# include +#endif +#include +#include +#endif + +#if defined(XP_LINUX) || defined(XP_MACOSX) +#include +#endif + +#ifdef ANDROID +#ifndef SYS_gettid +#define SYS_gettid __NR_gettid +#endif +#if defined(__arm__) && !defined(__NR_rt_tgsigqueueinfo) +// Some NDKs don't define this constant even though the kernel supports it. +#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) +#endif +#ifndef SYS_rt_tgsigqueueinfo +#define SYS_rt_tgsigqueueinfo __NR_rt_tgsigqueueinfo +#endif +#endif + +#ifdef MOZ_THREADSTACKHELPER_NATIVE +#if defined(MOZ_THREADSTACKHELPER_X86) || \ + defined(MOZ_THREADSTACKHELPER_X64) || \ + defined(MOZ_THREADSTACKHELPER_ARM) +// On these architectures, the stack grows downwards (toward lower addresses). +#define MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN +#else +#error "Unsupported architecture" +#endif +#endif // MOZ_THREADSTACKHELPER_NATIVE + +namespace mozilla { + +void +ThreadStackHelper::Startup() +{ +#if defined(XP_LINUX) + MOZ_ASSERT(NS_IsMainThread()); + if (!sInitialized) { + // TODO: centralize signal number allocation + sFillStackSignum = SIGRTMIN + 4; + if (sFillStackSignum > SIGRTMAX) { + // Leave uninitialized + MOZ_ASSERT(false); + return; + } + struct sigaction sigact = {}; + sigact.sa_sigaction = FillStackHandler; + sigemptyset(&sigact.sa_mask); + sigact.sa_flags = SA_SIGINFO | SA_RESTART; + MOZ_ALWAYS_TRUE(!::sigaction(sFillStackSignum, &sigact, nullptr)); + } + sInitialized++; +#endif +} + +void +ThreadStackHelper::Shutdown() +{ +#if defined(XP_LINUX) + MOZ_ASSERT(NS_IsMainThread()); + if (sInitialized == 1) { + struct sigaction sigact = {}; + sigact.sa_handler = SIG_DFL; + MOZ_ALWAYS_TRUE(!::sigaction(sFillStackSignum, &sigact, nullptr)); + } + sInitialized--; +#endif +} + +ThreadStackHelper::ThreadStackHelper() + : mStackToFill(nullptr) +#ifdef MOZ_THREADSTACKHELPER_PSEUDO + , mPseudoStack(mozilla_get_pseudo_stack()) +#ifdef MOZ_THREADSTACKHELPER_NATIVE + , mContextToFill(nullptr) +#endif + , mMaxStackSize(Stack::sMaxInlineStorage) + , mMaxBufferSize(0) +#endif +{ +#if defined(XP_LINUX) + MOZ_ALWAYS_TRUE(!::sem_init(&mSem, 0, 0)); + mThreadID = ::syscall(SYS_gettid); +#elif defined(XP_WIN) + mInitialized = !!::DuplicateHandle( + ::GetCurrentProcess(), ::GetCurrentThread(), + ::GetCurrentProcess(), &mThreadID, + THREAD_SUSPEND_RESUME +#ifdef MOZ_THREADSTACKHELPER_NATIVE + | THREAD_GET_CONTEXT | THREAD_QUERY_INFORMATION +#endif + , FALSE, 0); + MOZ_ASSERT(mInitialized); +#elif defined(XP_MACOSX) + mThreadID = mach_thread_self(); +#endif + +#ifdef MOZ_THREADSTACKHELPER_NATIVE + GetThreadStackBase(); +#endif +} + +ThreadStackHelper::~ThreadStackHelper() +{ +#if defined(XP_LINUX) + MOZ_ALWAYS_TRUE(!::sem_destroy(&mSem)); +#elif defined(XP_WIN) + if (mInitialized) { + MOZ_ALWAYS_TRUE(!!::CloseHandle(mThreadID)); + } +#endif +} + +#ifdef MOZ_THREADSTACKHELPER_NATIVE +void ThreadStackHelper::GetThreadStackBase() +{ + mThreadStackBase = 0; + +#if defined(XP_LINUX) + void* stackAddr; + size_t stackSize; + ::pthread_t pthr = ::pthread_self(); + ::pthread_attr_t pthr_attr; + NS_ENSURE_TRUE_VOID(!::pthread_getattr_np(pthr, &pthr_attr)); + if (!::pthread_attr_getstack(&pthr_attr, &stackAddr, &stackSize)) { +#ifdef MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN + mThreadStackBase = intptr_t(stackAddr) + stackSize; +#else + mThreadStackBase = intptr_t(stackAddr); +#endif + } + MOZ_ALWAYS_TRUE(!::pthread_attr_destroy(&pthr_attr)); + +#elif defined(XP_WIN) + ::MEMORY_BASIC_INFORMATION meminfo = {}; + NS_ENSURE_TRUE_VOID(::VirtualQuery(&meminfo, &meminfo, sizeof(meminfo))); +#ifdef MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN + mThreadStackBase = intptr_t(meminfo.BaseAddress) + meminfo.RegionSize; +#else + mThreadStackBase = intptr_t(meminfo.AllocationBase); +#endif + +#elif defined(XP_MACOSX) + ::pthread_t pthr = ::pthread_self(); + mThreadStackBase = intptr_t(::pthread_get_stackaddr_np(pthr)); + +#else + #error "Unsupported platform" +#endif // platform +} +#endif // MOZ_THREADSTACKHELPER_NATIVE + +namespace { +template +class ScopedSetPtr +{ +private: + T*& mPtr; +public: + ScopedSetPtr(T*& p, T* val) : mPtr(p) { mPtr = val; } + ~ScopedSetPtr() { mPtr = nullptr; } +}; +} // namespace + +void +ThreadStackHelper::GetStack(Stack& aStack) +{ + // Always run PrepareStackBuffer first to clear aStack + if (!PrepareStackBuffer(aStack)) { + // Skip and return empty aStack + return; + } + + ScopedSetPtr stackPtr(mStackToFill, &aStack); + +#if defined(XP_LINUX) + if (!sInitialized) { + MOZ_ASSERT(false); + return; + } + siginfo_t uinfo = {}; + uinfo.si_signo = sFillStackSignum; + uinfo.si_code = SI_QUEUE; + uinfo.si_pid = getpid(); + uinfo.si_uid = getuid(); + uinfo.si_value.sival_ptr = this; + if (::syscall(SYS_rt_tgsigqueueinfo, uinfo.si_pid, + mThreadID, sFillStackSignum, &uinfo)) { + // rt_tgsigqueueinfo was added in Linux 2.6.31. + // Could have failed because the syscall did not exist. + return; + } + MOZ_ALWAYS_TRUE(!::sem_wait(&mSem)); + +#elif defined(XP_WIN) + if (!mInitialized) { + MOZ_ASSERT(false); + return; + } + if (::SuspendThread(mThreadID) == DWORD(-1)) { + MOZ_ASSERT(false); + return; + } + + FillStackBuffer(); + FillThreadContext(); + + MOZ_ALWAYS_TRUE(::ResumeThread(mThreadID) != DWORD(-1)); + +#elif defined(XP_MACOSX) +# if defined(MOZ_VALGRIND) && defined(RUNNING_ON_VALGRIND) + if (RUNNING_ON_VALGRIND) { + /* thread_suspend and thread_resume sometimes hang runs on Valgrind, + for unknown reasons. So, just avoid them. See bug 1100911. */ + return; + } +# endif + + if (::thread_suspend(mThreadID) != KERN_SUCCESS) { + MOZ_ASSERT(false); + return; + } + + FillStackBuffer(); + FillThreadContext(); + + MOZ_ALWAYS_TRUE(::thread_resume(mThreadID) == KERN_SUCCESS); + +#endif +} + +#ifdef MOZ_THREADSTACKHELPER_NATIVE +class ThreadStackHelper::CodeModulesProvider + : public google_breakpad::CodeModules +{ +private: + typedef google_breakpad::CodeModule CodeModule; + typedef google_breakpad::BasicCodeModule BasicCodeModule; + + const SharedLibraryInfo mLibs; + mutable ScopedDeletePtr mModule; + +public: + CodeModulesProvider() : mLibs(SharedLibraryInfo::GetInfoForSelf()) {} + virtual ~CodeModulesProvider() {} + + virtual unsigned int module_count() const + { + return mLibs.GetSize(); + } + + virtual const CodeModule* GetModuleForAddress(uint64_t aAddress) const + { + MOZ_CRASH("Not implemented"); + } + + virtual const CodeModule* GetMainModule() const + { + return nullptr; + } + + virtual const CodeModule* GetModuleAtSequence(unsigned int aSequence) const + { + MOZ_CRASH("Not implemented"); + } + + virtual const CodeModule* GetModuleAtIndex(unsigned int aIndex) const + { + const SharedLibrary& lib = mLibs.GetEntry(aIndex); + mModule = new BasicCodeModule(lib.GetStart(), lib.GetEnd() - lib.GetStart(), + lib.GetName(), lib.GetBreakpadId(), + lib.GetName(), lib.GetBreakpadId(), ""); + // Keep mModule valid until the next GetModuleAtIndex call. + return mModule; + } + + virtual const CodeModules* Copy() const + { + MOZ_CRASH("Not implemented"); + } +}; + +class ThreadStackHelper::ThreadContext final + : public google_breakpad::MemoryRegion +{ +public: +#if defined(MOZ_THREADSTACKHELPER_X86) + typedef MDRawContextX86 Context; +#elif defined(MOZ_THREADSTACKHELPER_X64) + typedef MDRawContextAMD64 Context; +#elif defined(MOZ_THREADSTACKHELPER_ARM) + typedef MDRawContextARM Context; +#endif + // Limit copied stack to 4kB + static const size_t kMaxStackSize = 0x1000; + // Limit unwound stack to 32 frames + static const unsigned int kMaxStackFrames = 32; + // Whether this structure contains valid data + bool mValid; + // Processor context + Context mContext; + // Stack area + UniquePtr mStack; + // Start of stack area + uintptr_t mStackBase; + // Size of stack area + size_t mStackSize; + // End of stack area + const void* mStackEnd; + + ThreadContext() + : mValid(false) + , mStackBase(0) + , mStackSize(0) + , mStackEnd(nullptr) {} + virtual ~ThreadContext() {} + + virtual uint64_t GetBase() const { return uint64_t(mStackBase); } + virtual uint32_t GetSize() const { return mStackSize; } + virtual bool GetMemoryAtAddress(uint64_t aAddress, uint8_t* aValue) const + { + return GetMemoryAtAddressInternal(aAddress, aValue); + } + virtual bool GetMemoryAtAddress(uint64_t aAddress, uint16_t* aValue) const + { + return GetMemoryAtAddressInternal(aAddress, aValue); + } + virtual bool GetMemoryAtAddress(uint64_t aAddress, uint32_t* aValue) const + { + return GetMemoryAtAddressInternal(aAddress, aValue); + } + virtual bool GetMemoryAtAddress(uint64_t aAddress, uint64_t* aValue) const + { + return GetMemoryAtAddressInternal(aAddress, aValue); + } + +private: + template + bool GetMemoryAtAddressInternal(uint64_t aAddress, T* aValue) const + { + const intptr_t offset = intptr_t(aAddress) - intptr_t(GetBase()); + if (offset < 0 || uintptr_t(offset) > (GetSize() - sizeof(T))) { + return false; + } + *aValue = *reinterpret_cast(&mStack[offset]); + return true; + } +}; +#endif // MOZ_THREADSTACKHELPER_NATIVE + +void +ThreadStackHelper::GetNativeStack(Stack& aStack) +{ +#ifdef MOZ_THREADSTACKHELPER_NATIVE + ThreadContext context; + context.mStack = MakeUnique(ThreadContext::kMaxStackSize); + + ScopedSetPtr contextPtr(mContextToFill, &context); + + // Get pseudostack first and fill the thread context. + GetStack(aStack); + NS_ENSURE_TRUE_VOID(context.mValid); + + CodeModulesProvider modulesProvider; + google_breakpad::BasicCodeModules modules(&modulesProvider); + google_breakpad::BasicSourceLineResolver resolver; + google_breakpad::StackFrameSymbolizer symbolizer(nullptr, &resolver); + +#if defined(MOZ_THREADSTACKHELPER_X86) + google_breakpad::StackwalkerX86 stackWalker( + nullptr, &context.mContext, &context, &modules, &symbolizer); +#elif defined(MOZ_THREADSTACKHELPER_X64) + google_breakpad::StackwalkerAMD64 stackWalker( + nullptr, &context.mContext, &context, &modules, &symbolizer); +#elif defined(MOZ_THREADSTACKHELPER_ARM) + google_breakpad::StackwalkerARM stackWalker( + nullptr, &context.mContext, -1, &context, &modules, &symbolizer); +#else + #error "Unsupported architecture" +#endif + + google_breakpad::CallStack callStack; + std::vector modules_without_symbols; + + google_breakpad::Stackwalker::set_max_frames(ThreadContext::kMaxStackFrames); + google_breakpad::Stackwalker:: + set_max_frames_scanned(ThreadContext::kMaxStackFrames); + + NS_ENSURE_TRUE_VOID(stackWalker.Walk(&callStack, &modules_without_symbols)); + + const std::vector& frames(*callStack.frames()); + for (intptr_t i = frames.size() - 1; i >= 0; i--) { + const google_breakpad::StackFrame& frame = *frames[i]; + if (!frame.module) { + continue; + } + const string& module = frame.module->code_file(); +#if defined(XP_LINUX) || defined(XP_MACOSX) + const char PATH_SEP = '/'; +#elif defined(XP_WIN) + const char PATH_SEP = '\\'; +#endif + const char* const module_basename = strrchr(module.c_str(), PATH_SEP); + const char* const module_name = module_basename ? + module_basename + 1 : module.c_str(); + + char buffer[0x100]; + size_t len = 0; + if (!frame.function_name.empty()) { + len = PR_snprintf(buffer, sizeof(buffer), "%s:%s", + module_name, frame.function_name.c_str()); + } else { + len = PR_snprintf(buffer, sizeof(buffer), "%s:0x%p", + module_name, (intptr_t) + (frame.instruction - frame.module->base_address())); + } + if (len) { + aStack.AppendViaBuffer(buffer, len); + } + } +#endif // MOZ_THREADSTACKHELPER_NATIVE +} + +#ifdef XP_LINUX + +int ThreadStackHelper::sInitialized; +int ThreadStackHelper::sFillStackSignum; + +void +ThreadStackHelper::FillStackHandler(int aSignal, siginfo_t* aInfo, + void* aContext) +{ + ThreadStackHelper* const helper = + reinterpret_cast(aInfo->si_value.sival_ptr); + helper->FillStackBuffer(); + helper->FillThreadContext(aContext); + ::sem_post(&helper->mSem); +} + +#endif // XP_LINUX + +bool +ThreadStackHelper::PrepareStackBuffer(Stack& aStack) +{ + // Return false to skip getting the stack and return an empty stack + aStack.clear(); +#ifdef MOZ_THREADSTACKHELPER_PSEUDO + /* Normally, provided the profiler is enabled, it would be an error if we + don't have a pseudostack here (the thread probably forgot to call + profiler_register_thread). However, on B2G, profiling secondary threads + may be disabled despite profiler being enabled. This is by-design and + is not an error. */ +#ifdef MOZ_WIDGET_GONK + if (!mPseudoStack) { + return false; + } +#endif + MOZ_ASSERT(mPseudoStack); + if (!aStack.reserve(mMaxStackSize) || + !aStack.reserve(aStack.capacity()) || // reserve up to the capacity + !aStack.EnsureBufferCapacity(mMaxBufferSize)) { + return false; + } + return true; +#else + return false; +#endif +} + +#ifdef MOZ_THREADSTACKHELPER_PSEUDO + +namespace { + +bool +IsChromeJSScript(JSScript* aScript) +{ + // May be called from another thread or inside a signal handler. + // We assume querying the script is safe but we must not manipulate it. + + nsIScriptSecurityManager* const secman = + nsScriptSecurityManager::GetScriptSecurityManager(); + NS_ENSURE_TRUE(secman, false); + + JSPrincipals* const principals = JS_GetScriptPrincipals(aScript); + return secman->IsSystemPrincipal(nsJSPrincipals::get(principals)); +} + +// Get the full path after the URI scheme, if the URI matches the scheme. +// For example, GetFullPathForScheme("a://b/c/d/e", "a://") returns "b/c/d/e". +template +const char* +GetFullPathForScheme(const char* filename, const char (&scheme)[LEN]) { + // Account for the null terminator included in LEN. + if (!strncmp(filename, scheme, LEN - 1)) { + return filename + LEN - 1; + } + return nullptr; +} + +// Get the full path after a URI component, if the URI contains the component. +// For example, GetPathAfterComponent("a://b/c/d/e", "/c/") returns "d/e". +template +const char* +GetPathAfterComponent(const char* filename, const char (&component)[LEN]) { + const char* found = nullptr; + const char* next = strstr(filename, component); + while (next) { + // Move 'found' to end of the component, after the separator '/'. + // 'LEN - 1' accounts for the null terminator included in LEN, + found = next + LEN - 1; + // Resume searching before the separator '/'. + next = strstr(found - 1, component); + } + return found; +} + +} // namespace + +const char* +ThreadStackHelper::AppendJSEntry(const volatile StackEntry* aEntry, + intptr_t& aAvailableBufferSize, + const char* aPrevLabel) +{ + // May be called from another thread or inside a signal handler. + // We assume querying the script is safe but we must not manupulate it. + // Also we must not allocate any memory from heap. + MOZ_ASSERT(aEntry->isJs()); + MOZ_ASSERT(aEntry->script()); + + const char* label; + if (IsChromeJSScript(aEntry->script())) { + const char* filename = JS_GetScriptFilename(aEntry->script()); + const unsigned lineno = JS_PCToLineNumber(aEntry->script(), aEntry->pc()); + MOZ_ASSERT(filename); + + char buffer[128]; // Enough to fit longest js file name from the tree + + // Some script names are in the form "foo -> bar -> baz". + // Here we find the origin of these redirected scripts. + const char* basename = GetPathAfterComponent(filename, " -> "); + if (basename) { + filename = basename; + } + + basename = GetFullPathForScheme(filename, "chrome://"); + if (!basename) { + basename = GetFullPathForScheme(filename, "resource://"); + } + if (!basename) { + // If the (add-on) script is located under the {profile}/extensions + // directory, extract the path after the /extensions/ part. + basename = GetPathAfterComponent(filename, "/extensions/"); + } + if (!basename) { + // Only keep the file base name for paths outside the above formats. + basename = strrchr(filename, '/'); + basename = basename ? basename + 1 : filename; + // Look for Windows path separator as well. + filename = strrchr(basename, '\\'); + if (filename) { + basename = filename + 1; + } + } + + size_t len = PR_snprintf(buffer, sizeof(buffer), "%s:%u", basename, lineno); + if (len < sizeof(buffer)) { + if (mStackToFill->IsSameAsEntry(aPrevLabel, buffer)) { + return aPrevLabel; + } + + // Keep track of the required buffer size + aAvailableBufferSize -= (len + 1); + if (aAvailableBufferSize >= 0) { + // Buffer is big enough. + return mStackToFill->InfallibleAppendViaBuffer(buffer, len); + } + // Buffer is not big enough; fall through to using static label below. + } + // snprintf failed or buffer is not big enough. + label = "(chrome script)"; + } else { + label = "(content script)"; + } + + if (mStackToFill->IsSameAsEntry(aPrevLabel, label)) { + return aPrevLabel; + } + mStackToFill->infallibleAppend(label); + return label; +} + +#endif // MOZ_THREADSTACKHELPER_PSEUDO + +void +ThreadStackHelper::FillStackBuffer() +{ + MOZ_ASSERT(mStackToFill->empty()); + +#ifdef MOZ_THREADSTACKHELPER_PSEUDO + size_t reservedSize = mStackToFill->capacity(); + size_t reservedBufferSize = mStackToFill->AvailableBufferSize(); + intptr_t availableBufferSize = intptr_t(reservedBufferSize); + + // Go from front to back + const volatile StackEntry* entry = mPseudoStack->mStack; + const volatile StackEntry* end = entry + mPseudoStack->stackSize(); + // Deduplicate identical, consecutive frames + const char* prevLabel = nullptr; + for (; reservedSize-- && entry != end; entry++) { + /* We only accept non-copy labels, including js::RunScript, + because we only want static labels in the hang stack. */ + if (entry->isCopyLabel()) { + continue; + } + if (entry->isJs()) { + prevLabel = AppendJSEntry(entry, availableBufferSize, prevLabel); + continue; + } +#ifdef MOZ_THREADSTACKHELPER_NATIVE + if (mContextToFill) { + mContextToFill->mStackEnd = entry->stackAddress(); + } +#endif + const char* const label = entry->label(); + if (mStackToFill->IsSameAsEntry(prevLabel, label)) { + // Avoid duplicate labels to save space in the stack. + continue; + } + mStackToFill->infallibleAppend(label); + prevLabel = label; + } + + // end != entry if we exited early due to not enough reserved frames. + // Expand the number of reserved frames for next time. + mMaxStackSize = mStackToFill->capacity() + (end - entry); + + // availableBufferSize < 0 if we needed a larger buffer than we reserved. + // Calculate a new reserve size for next time. + if (availableBufferSize < 0) { + mMaxBufferSize = reservedBufferSize - availableBufferSize; + } +#endif +} + +MOZ_ASAN_BLACKLIST void +ThreadStackHelper::FillThreadContext(void* aContext) +{ +#ifdef MOZ_THREADSTACKHELPER_NATIVE + if (!mContextToFill) { + return; + } + +#if defined(XP_LINUX) + const ucontext_t& context = *reinterpret_cast(aContext); +#if defined(MOZ_THREADSTACKHELPER_X86) + mContextToFill->mContext.context_flags = MD_CONTEXT_X86_FULL; + mContextToFill->mContext.edi = context.uc_mcontext.gregs[REG_EDI]; + mContextToFill->mContext.esi = context.uc_mcontext.gregs[REG_ESI]; + mContextToFill->mContext.ebx = context.uc_mcontext.gregs[REG_EBX]; + mContextToFill->mContext.edx = context.uc_mcontext.gregs[REG_EDX]; + mContextToFill->mContext.ecx = context.uc_mcontext.gregs[REG_ECX]; + mContextToFill->mContext.eax = context.uc_mcontext.gregs[REG_EAX]; + mContextToFill->mContext.ebp = context.uc_mcontext.gregs[REG_EBP]; + mContextToFill->mContext.eip = context.uc_mcontext.gregs[REG_EIP]; + mContextToFill->mContext.eflags = context.uc_mcontext.gregs[REG_EFL]; + mContextToFill->mContext.esp = context.uc_mcontext.gregs[REG_ESP]; +#elif defined(MOZ_THREADSTACKHELPER_X64) + mContextToFill->mContext.context_flags = MD_CONTEXT_AMD64_FULL; + mContextToFill->mContext.eflags = uint32_t(context.uc_mcontext.gregs[REG_EFL]); + mContextToFill->mContext.rax = context.uc_mcontext.gregs[REG_RAX]; + mContextToFill->mContext.rcx = context.uc_mcontext.gregs[REG_RCX]; + mContextToFill->mContext.rdx = context.uc_mcontext.gregs[REG_RDX]; + mContextToFill->mContext.rbx = context.uc_mcontext.gregs[REG_RBX]; + mContextToFill->mContext.rsp = context.uc_mcontext.gregs[REG_RSP]; + mContextToFill->mContext.rbp = context.uc_mcontext.gregs[REG_RBP]; + mContextToFill->mContext.rsi = context.uc_mcontext.gregs[REG_RSI]; + mContextToFill->mContext.rdi = context.uc_mcontext.gregs[REG_RDI]; + memcpy(&mContextToFill->mContext.r8, + &context.uc_mcontext.gregs[REG_R8], 8 * sizeof(int64_t)); + mContextToFill->mContext.rip = context.uc_mcontext.gregs[REG_RIP]; +#elif defined(MOZ_THREADSTACKHELPER_ARM) + mContextToFill->mContext.context_flags = MD_CONTEXT_ARM_FULL; + memcpy(&mContextToFill->mContext.iregs[0], + &context.uc_mcontext.arm_r0, 17 * sizeof(int32_t)); +#else + #error "Unsupported architecture" +#endif // architecture + +#elif defined(XP_WIN) + // Breakpad context struct is based off of the Windows CONTEXT struct, + // so we assume they are the same; do some sanity checks to make sure. + static_assert(sizeof(ThreadContext::Context) == sizeof(::CONTEXT), + "Context struct mismatch"); + static_assert(offsetof(ThreadContext::Context, context_flags) == + offsetof(::CONTEXT, ContextFlags), + "Context struct mismatch"); + mContextToFill->mContext.context_flags = CONTEXT_FULL; + NS_ENSURE_TRUE_VOID(::GetThreadContext(mThreadID, + reinterpret_cast<::CONTEXT*>(&mContextToFill->mContext))); + +#elif defined(XP_MACOSX) +#if defined(MOZ_THREADSTACKHELPER_X86) + const thread_state_flavor_t flavor = x86_THREAD_STATE32; + x86_thread_state32_t state = {}; + mach_msg_type_number_t count = x86_THREAD_STATE32_COUNT; +#elif defined(MOZ_THREADSTACKHELPER_X64) + const thread_state_flavor_t flavor = x86_THREAD_STATE64; + x86_thread_state64_t state = {}; + mach_msg_type_number_t count = x86_THREAD_STATE64_COUNT; +#elif defined(MOZ_THREADSTACKHELPER_ARM) + const thread_state_flavor_t flavor = ARM_THREAD_STATE; + arm_thread_state_t state = {}; + mach_msg_type_number_t count = ARM_THREAD_STATE_COUNT; +#endif + NS_ENSURE_TRUE_VOID(KERN_SUCCESS == ::thread_get_state( + mThreadID, flavor, reinterpret_cast(&state), &count)); +#if __DARWIN_UNIX03 +#define GET_REGISTER(s, r) ((s).__##r) +#else +#define GET_REGISTER(s, r) ((s).r) +#endif +#if defined(MOZ_THREADSTACKHELPER_X86) + mContextToFill->mContext.context_flags = MD_CONTEXT_X86_FULL; + mContextToFill->mContext.edi = GET_REGISTER(state, edi); + mContextToFill->mContext.esi = GET_REGISTER(state, esi); + mContextToFill->mContext.ebx = GET_REGISTER(state, ebx); + mContextToFill->mContext.edx = GET_REGISTER(state, edx); + mContextToFill->mContext.ecx = GET_REGISTER(state, ecx); + mContextToFill->mContext.eax = GET_REGISTER(state, eax); + mContextToFill->mContext.ebp = GET_REGISTER(state, ebp); + mContextToFill->mContext.eip = GET_REGISTER(state, eip); + mContextToFill->mContext.eflags = GET_REGISTER(state, eflags); + mContextToFill->mContext.esp = GET_REGISTER(state, esp); +#elif defined(MOZ_THREADSTACKHELPER_X64) + mContextToFill->mContext.context_flags = MD_CONTEXT_AMD64_FULL; + mContextToFill->mContext.eflags = uint32_t(GET_REGISTER(state, rflags)); + mContextToFill->mContext.rax = GET_REGISTER(state, rax); + mContextToFill->mContext.rcx = GET_REGISTER(state, rcx); + mContextToFill->mContext.rdx = GET_REGISTER(state, rdx); + mContextToFill->mContext.rbx = GET_REGISTER(state, rbx); + mContextToFill->mContext.rsp = GET_REGISTER(state, rsp); + mContextToFill->mContext.rbp = GET_REGISTER(state, rbp); + mContextToFill->mContext.rsi = GET_REGISTER(state, rsi); + mContextToFill->mContext.rdi = GET_REGISTER(state, rdi); + memcpy(&mContextToFill->mContext.r8, + &GET_REGISTER(state, r8), 8 * sizeof(int64_t)); + mContextToFill->mContext.rip = GET_REGISTER(state, rip); +#elif defined(MOZ_THREADSTACKHELPER_ARM) + mContextToFill->mContext.context_flags = MD_CONTEXT_ARM_FULL; + memcpy(mContextToFill->mContext.iregs, + GET_REGISTER(state, r), 17 * sizeof(int32_t)); +#else + #error "Unsupported architecture" +#endif // architecture +#undef GET_REGISTER + +#else + #error "Unsupported platform" +#endif // platform + + intptr_t sp = 0; +#if defined(MOZ_THREADSTACKHELPER_X86) + sp = mContextToFill->mContext.esp; +#elif defined(MOZ_THREADSTACKHELPER_X64) + sp = mContextToFill->mContext.rsp; +#elif defined(MOZ_THREADSTACKHELPER_ARM) + sp = mContextToFill->mContext.iregs[13]; +#else + #error "Unsupported architecture" +#endif // architecture + NS_ENSURE_TRUE_VOID(sp); + NS_ENSURE_TRUE_VOID(mThreadStackBase); + + size_t stackSize = std::min(intptr_t(ThreadContext::kMaxStackSize), + std::abs(sp - mThreadStackBase)); + + if (mContextToFill->mStackEnd) { + // Limit the start of stack to a certain location if specified. + stackSize = std::min(intptr_t(stackSize), + std::abs(sp - intptr_t(mContextToFill->mStackEnd))); + } + +#ifndef MOZ_THREADSTACKHELPER_STACK_GROWS_DOWN + // If if the stack grows upwards, and we need to recalculate our + // stack copy's base address. Subtract sizeof(void*) so that the + // location pointed to by sp is included. + sp -= stackSize - sizeof(void*); +#endif + +#ifndef MOZ_ASAN + memcpy(mContextToFill->mStack.get(), reinterpret_cast(sp), stackSize); + // Valgrind doesn't care about the access outside the stack frame, but + // the presence of uninitialised values on the stack does cause it to + // later report a lot of false errors when Breakpad comes to unwind it. + // So mark the extracted data as defined. + MOZ_MAKE_MEM_DEFINED(mContextToFill->mStack.get(), stackSize); +#else + // ASan will flag memcpy for access outside of stack frames, + // so roll our own memcpy here. + intptr_t* dst = reinterpret_cast(&mContextToFill->mStack[0]); + const intptr_t* src = reinterpret_cast(sp); + for (intptr_t len = stackSize; len > 0; len -= sizeof(*src)) { + *(dst++) = *(src++); + } +#endif + + mContextToFill->mStackBase = uintptr_t(sp); + mContextToFill->mStackSize = stackSize; + mContextToFill->mValid = true; +#endif // MOZ_THREADSTACKHELPER_NATIVE +} + +} // namespace mozilla diff --git a/xpcom/threads/ThreadStackHelper.h b/xpcom/threads/ThreadStackHelper.h new file mode 100644 index 0000000000..b334f2fa23 --- /dev/null +++ b/xpcom/threads/ThreadStackHelper.h @@ -0,0 +1,148 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 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/. */ + +#ifndef mozilla_ThreadStackHelper_h +#define mozilla_ThreadStackHelper_h + +#include "mozilla/ThreadHangStats.h" + +#include "GeckoProfiler.h" + +#include + +#if defined(XP_LINUX) +#include +#include +#include +#elif defined(XP_WIN) +#include +#elif defined(XP_MACOSX) +#include +#endif + +// Support pseudostack on these platforms. +#if defined(XP_LINUX) || defined(XP_WIN) || defined(XP_MACOSX) +# ifdef MOZ_ENABLE_PROFILER_SPS +# define MOZ_THREADSTACKHELPER_PSEUDO +# endif +#endif + +#ifdef MOZ_THREADSTACKHELPER_PSEUDO +# define MOZ_THREADSTACKHELPER_NATIVE +# if defined(__i386__) || defined(_M_IX86) +# define MOZ_THREADSTACKHELPER_X86 +# elif defined(__x86_64__) || defined(_M_X64) +# define MOZ_THREADSTACKHELPER_X64 +# elif defined(__arm__) || defined(_M_ARM) +# define MOZ_THREADSTACKHELPER_ARM +# else + // Unsupported architecture +# undef MOZ_THREADSTACKHELPER_NATIVE +# endif +#endif + +namespace mozilla { + +/** + * ThreadStackHelper is used to retrieve the profiler pseudo-stack of a + * thread, as an alternative of using the profiler to take a profile. + * The target thread first declares an ThreadStackHelper instance; + * then another thread can call ThreadStackHelper::GetStack to retrieve + * the pseudo-stack of the target thread at that instant. + * + * Only non-copying labels are included in the stack, which means labels + * with custom text and markers are not included. + */ +class ThreadStackHelper +{ +public: + typedef Telemetry::HangStack Stack; + +private: + Stack* mStackToFill; +#ifdef MOZ_THREADSTACKHELPER_PSEUDO + const PseudoStack* const mPseudoStack; +#ifdef MOZ_THREADSTACKHELPER_NATIVE + class CodeModulesProvider; + class ThreadContext; + // Set to non-null if GetStack should get the thread context. + ThreadContext* mContextToFill; + intptr_t mThreadStackBase; +#endif + size_t mMaxStackSize; + size_t mMaxBufferSize; +#endif + + bool PrepareStackBuffer(Stack& aStack); + void FillStackBuffer(); + void FillThreadContext(void* aContext = nullptr); +#ifdef MOZ_THREADSTACKHELPER_PSEUDO + const char* AppendJSEntry(const volatile StackEntry* aEntry, + intptr_t& aAvailableBufferSize, + const char* aPrevLabel); +#endif +#ifdef MOZ_THREADSTACKHELPER_NATIVE + void GetThreadStackBase(); +#endif + +public: + /** + * Initialize ThreadStackHelper. Must be called from main thread. + */ + static void Startup(); + /** + * Uninitialize ThreadStackHelper. Must be called from main thread. + */ + static void Shutdown(); + + /** + * Create a ThreadStackHelper instance targeting the current thread. + */ + ThreadStackHelper(); + + ~ThreadStackHelper(); + + /** + * Retrieve the current pseudostack of the thread associated + * with this ThreadStackHelper. + * + * @param aStack Stack instance to be filled. + */ + void GetStack(Stack& aStack); + + /** + * Retrieve the current native stack of the thread associated + * with this ThreadStackHelper. + * + * @param aNativeStack Stack instance to be filled. + */ + void GetNativeStack(Stack& aStack); + +#if defined(XP_LINUX) +private: + static int sInitialized; + static int sFillStackSignum; + + static void FillStackHandler(int aSignal, siginfo_t* aInfo, void* aContext); + + sem_t mSem; + pid_t mThreadID; + +#elif defined(XP_WIN) +private: + bool mInitialized; + HANDLE mThreadID; + +#elif defined(XP_MACOSX) +private: + thread_act_t mThreadID; + +#endif +}; + +} // namespace mozilla + +#endif // mozilla_ThreadStackHelper_h diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index 114d94801a..78c5aa8774 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -77,7 +77,7 @@ TimerObserverRunnable::Run() return NS_OK; } -} // anonymous namespace +} // namespace nsresult TimerThread::Init() diff --git a/xpcom/threads/TimerThread.h b/xpcom/threads/TimerThread.h index 6dbd939ef9..6443542406 100644 --- a/xpcom/threads/TimerThread.h +++ b/xpcom/threads/TimerThread.h @@ -22,7 +22,7 @@ namespace mozilla { class TimeStamp; -} +} // namespace mozilla class TimerThread final : public nsIRunnable diff --git a/xpcom/threads/moz.build b/xpcom/threads/moz.build index 35c452b60b..60780c2305 100644 --- a/xpcom/threads/moz.build +++ b/xpcom/threads/moz.build @@ -48,6 +48,7 @@ UNIFIED_SOURCES += [ 'nsThreadManager.cpp', 'nsThreadPool.cpp', 'nsTimerImpl.cpp', + 'ThreadStackHelper.cpp', 'TimerThread.cpp', ] @@ -56,6 +57,7 @@ MSVC_ENABLE_PGO = True LOCAL_INCLUDES += [ '../build', '/caps', + '/tools/profiler', ] # BHR disabled for Release builds because of bug 965392. diff --git a/xpcom/threads/nsTimerImpl.cpp b/xpcom/threads/nsTimerImpl.cpp index af658c813c..1f3315ab21 100644 --- a/xpcom/threads/nsTimerImpl.cpp +++ b/xpcom/threads/nsTimerImpl.cpp @@ -108,7 +108,7 @@ public: void Free(void* aPtr); }; -} // anonymous namespace +} // namespace class nsTimerEvent : public nsRunnable { @@ -212,7 +212,7 @@ TimerEventAllocator::Free(void* aPtr) mFirstFree = entry; } -} // anonymous namespace +} // namespace NS_IMPL_QUERY_INTERFACE(nsTimerImpl, nsITimer) NS_IMPL_ADDREF(nsTimerImpl) diff --git a/xpfe/appshell/nsXULWindow.h b/xpfe/appshell/nsXULWindow.h index c08530d927..33d1fa565d 100644 --- a/xpfe/appshell/nsXULWindow.h +++ b/xpfe/appshell/nsXULWindow.h @@ -37,8 +37,8 @@ namespace mozilla { namespace dom { class Element; -} -} +} // namespace dom +} // namespace mozilla // nsXULWindow