Merge m-i to m-c, a=merge
authorPhil Ringnalda <philringnalda@gmail.com>
Sat, 28 Mar 2015 11:44:16 -0700
changeset 266612 1de31c749653eebf70f9da9e765c39fc8a1f4188
parent 266500 575de67826f463574a4238391cf9a78cf0637d78 (current diff)
parent 266611 bcb0b42f9068ad85685a47c00680018a9fb20258 (diff)
child 266613 e16dc56f90d5c2e0e338876545542cf01f597e8d
push id830
push userraliiev@mozilla.com
push dateFri, 19 Jun 2015 19:24:37 +0000
treeherdermozilla-release@932614382a68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge m-i to m-c, a=merge
dom/base/Navigator.h
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/mobileconnection/MobileConnection.cpp
dom/mobileconnection/MobileConnection.h
dom/plugins/ipc/COMMessageFilter.cpp
dom/plugins/ipc/COMMessageFilter.h
dom/plugins/ipc/PluginModuleChild.cpp
js/src/jsexn.cpp
--- a/accessible/base/NotificationController.h
+++ b/accessible/base/NotificationController.h
@@ -81,17 +81,17 @@ private:
   Callback mCallback;
   nsRefPtr<Arg> mArg;
 };
 
 /**
  * Used to process notifications from core for the document accessible.
  */
 class NotificationController final : public EventQueue,
-                                         public nsARefreshObserver
+                                     public nsARefreshObserver
 {
 public:
   NotificationController(DocAccessible* aDocument, nsIPresShell* aPresShell);
 
   NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override;
   NS_IMETHOD_(MozExternalRefCountType) Release(void) override;
 
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(NotificationController)
--- a/accessible/base/nsAccessibilityService.h
+++ b/accessible/base/nsAccessibilityService.h
@@ -59,20 +59,20 @@ struct MarkupMapInfo {
   a11y::role role;
   MarkupAttrInfo attrs[4];
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 class nsAccessibilityService final : public mozilla::a11y::DocManager,
-                                         public mozilla::a11y::FocusManager,
-                                         public mozilla::a11y::SelectionManager,
-                                         public nsIAccessibilityService,
-                                         public nsIObserver
+                                     public mozilla::a11y::FocusManager,
+                                     public mozilla::a11y::SelectionManager,
+                                     public nsIAccessibilityService,
+                                     public nsIObserver
 {
 public:
   typedef mozilla::a11y::Accessible Accessible;
   typedef mozilla::a11y::DocAccessible DocAccessible;
 
 protected:
   virtual ~nsAccessibilityService();
 
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -1284,20 +1284,22 @@ DocAccessible::ContentInserted(nsIConten
 {
   // Ignore content insertions until we constructed accessible tree. Otherwise
   // schedule tree update on content insertion after layout.
   if (mNotificationController && HasLoadState(eTreeConstructed)) {
     // Update the whole tree of this document accessible when the container is
     // null (document element is inserted or removed).
     Accessible* container = aContainerNode ?
       GetAccessibleOrContainer(aContainerNode) : this;
-
-    mNotificationController->ScheduleContentInsertion(container,
-                                                      aStartChildNode,
-                                                      aEndChildNode);
+    if (container) {
+      // Ignore notification if the container node is no longer in the DOM tree.
+      mNotificationController->ScheduleContentInsertion(container,
+                                                        aStartChildNode,
+                                                        aEndChildNode);
+    }
   }
 }
 
 void
 DocAccessible::RecreateAccessible(nsIContent* aContent)
 {
 #ifdef A11Y_LOG
   if (logging::IsEnabled(logging::eTree)) {
--- a/accessible/windows/msaa/IUnknownImpl.h
+++ b/accessible/windows/msaa/IUnknownImpl.h
@@ -46,23 +46,23 @@ private:
 };
 
 } // namespace a11y
 } // namespace mozilla
 
 #define DECL_IUNKNOWN                                                          \
 public:                                                                        \
   virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void**);            \
-  virtual ULONG STDMETHODCALLTYPE AddRef() final                           \
+  virtual ULONG STDMETHODCALLTYPE AddRef() final                               \
   {                                                                            \
     MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");                       \
     ++mRefCnt;                                                                 \
     return mRefCnt;                                                            \
   }                                                                            \
-  virtual ULONG STDMETHODCALLTYPE Release() final                          \
+  virtual ULONG STDMETHODCALLTYPE Release() final                              \
   {                                                                            \
      MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");                          \
      --mRefCnt;                                                                \
      if (mRefCnt)                                                              \
        return mRefCnt;                                                         \
                                                                                \
      delete this;                                                              \
      return 0;                                                                 \
--- a/accessible/windows/uia/uiaRawElmProvider.h
+++ b/accessible/windows/uia/uiaRawElmProvider.h
@@ -16,17 +16,17 @@ namespace mozilla {
 namespace a11y {
 
 class AccessibleWrap;
 
 /**
  * IRawElementProviderSimple implementation (maintains IAccessibleEx approach).
  */
 class uiaRawElmProvider final : public IAccessibleEx,
-                                    public IRawElementProviderSimple
+                                public IRawElementProviderSimple
 {
 public:
   uiaRawElmProvider(AccessibleWrap* aAcc) : mAcc(aAcc) { }
 
   // IUnknown
   DECL_IUNKNOWN
 
   // IAccessibleEx
--- a/browser/components/feeds/nsFeedSniffer.h
+++ b/browser/components/feeds/nsFeedSniffer.h
@@ -5,17 +5,17 @@
 
 
 #include "nsIContentSniffer.h"
 #include "nsIStreamListener.h"
 #include "nsStringAPI.h"
 #include "mozilla/Attributes.h"
 
 class nsFeedSniffer final : public nsIContentSniffer,
-                                       nsIStreamListener
+                                   nsIStreamListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTSNIFFER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
 
   static NS_METHOD AppendSegmentToString(nsIInputStream* inputStream,
--- a/browser/devtools/scratchpad/test/browser_scratchpad_wrong_window_focus.js
+++ b/browser/devtools/scratchpad/test/browser_scratchpad_wrong_window_focus.js
@@ -46,17 +46,17 @@ function testFocus(sw, hud) {
   let sp = sw.Scratchpad;
 
   function onMessage(event, messages) {
     let msg = [...messages][0];
     let node = msg.node;
 
     var loc = node.querySelector(".message-location");
     ok(loc, "location element exists");
-    is(loc.textContent.trim(), sw.Scratchpad.uniqueName + ":1:0",
+    is(loc.textContent.trim(), sw.Scratchpad.uniqueName + ":1:1",
         "location value is correct");
 
     sw.addEventListener("focus", function onFocus() {
       sw.removeEventListener("focus", onFocus, true);
 
       let win = Services.wm.getMostRecentWindow("devtools:scratchpad");
 
       ok(win, "there are active Scratchpad windows");
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_585956_console_trace.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_585956_console_trace.js
@@ -30,19 +30,19 @@ function test() {
     let node = [...result.matched][0];
     ok(node, "found trace log node");
 
     let obj = node._messageObject;
     ok(obj, "console.trace message object");
 
     // The expected stack trace object.
     let stacktrace = [
-      { columnNumber: 2, filename: TEST_URI, functionName: "window.foobar585956c", language: 2, lineNumber: 9 },
-      { columnNumber: 9, filename: TEST_URI, functionName: "foobar585956b", language: 2, lineNumber: 14 },
-      { columnNumber: 9, filename: TEST_URI, functionName: "foobar585956a", language: 2, lineNumber: 18 },
-      { columnNumber: 0, filename: TEST_URI, functionName: "", language: 2, lineNumber: 21 }
+      { columnNumber: 3, filename: TEST_URI, functionName: "window.foobar585956c", language: 2, lineNumber: 9 },
+      { columnNumber: 10, filename: TEST_URI, functionName: "foobar585956b", language: 2, lineNumber: 14 },
+      { columnNumber: 10, filename: TEST_URI, functionName: "foobar585956a", language: 2, lineNumber: 18 },
+      { columnNumber: 1, filename: TEST_URI, functionName: "", language: 2, lineNumber: 21 }
     ];
 
     ok(obj._stacktrace, "found stacktrace object");
     is(obj._stacktrace.toSource(), stacktrace.toSource(), "stacktrace is correct");
     isnot(node.textContent.indexOf("bug-585956"), -1, "found file name");
   }
 }
--- a/browser/devtools/webconsole/test/browser_webconsole_column_numbers.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_column_numbers.js
@@ -25,17 +25,17 @@ function consoleOpened(aHud) {
       category: CATEGORY_WEBDEV,
       severity: SEVERITY_ERROR
     }]
   }).then(testLocationColumn);
 }
 
 function testLocationColumn() {
   let messages = hud.outputNode.children;
-  let expected = ['10:6', '10:38', '11:8', '12:10', '13:8', '14:6'];
+  let expected = ['10:7', '10:39', '11:9', '12:11', '13:9', '14:7'];
 
   for(let i = 0, len = messages.length; i < len; i++) {
     let msg = messages[i].textContent;
 
     is(msg.contains(expected[i]), true, 'Found expected line:column of ' + expected[i]);
   }
 
   finishTest();
--- a/caps/nsNullPrincipalURI.h
+++ b/caps/nsNullPrincipalURI.h
@@ -20,18 +20,18 @@
 #include "mozilla/MemoryReporting.h"
 
 // {51fcd543-3b52-41f7-b91b-6b54102236e6}
 #define NS_NULLPRINCIPALURI_IMPLEMENTATION_CID \
   {0x51fcd543, 0x3b52, 0x41f7, \
     {0xb9, 0x1b, 0x6b, 0x54, 0x10, 0x22, 0x36, 0xe6} }
 
 class nsNullPrincipalURI final : public nsIURI
-                                   , public nsISizeOf
-                                   , public nsIIPCSerializableURI
+                               , public nsISizeOf
+                               , public nsIIPCSerializableURI
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSIIPCSERIALIZABLEURI
 
   // nsISizeOf
   virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
--- a/caps/nsScriptSecurityManager.h
+++ b/caps/nsScriptSecurityManager.h
@@ -28,18 +28,18 @@ class ClassInfoData;
 /////////////////////////////
 // nsScriptSecurityManager //
 /////////////////////////////
 #define NS_SCRIPTSECURITYMANAGER_CID \
 { 0x7ee2a4c0, 0x4b93, 0x17d3, \
 { 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }}
 
 class nsScriptSecurityManager final : public nsIScriptSecurityManager,
-                                          public nsIChannelEventSink,
-                                          public nsIObserver
+                                      public nsIChannelEventSink,
+                                      public nsIObserver
 {
 public:
     static void Shutdown();
 
     NS_DEFINE_STATIC_CID_ACCESSOR(NS_SCRIPTSECURITYMANAGER_CID)
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSISCRIPTSECURITYMANAGER
--- a/chrome/nsChromeProtocolHandler.h
+++ b/chrome/nsChromeProtocolHandler.h
@@ -14,17 +14,17 @@
 { /* 61ba33c0-3031-11d3-8cd0-0060b0fc14a3 */         \
     0x61ba33c0,                                      \
     0x3031,                                          \
     0x11d3,                                          \
     {0x8c, 0xd0, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
 }
 
 class nsChromeProtocolHandler final : public nsIProtocolHandler,
-                                          public nsSupportsWeakReference
+                                      public nsSupportsWeakReference
 {
 public:
     NS_DECL_THREADSAFE_ISUPPORTS
 
     // nsIProtocolHandler methods:
     NS_DECL_NSIPROTOCOLHANDLER
 
     // nsChromeProtocolHandler methods:
--- a/configure.in
+++ b/configure.in
@@ -5699,22 +5699,28 @@ dnl ====================================
 dnl Permissions System
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(permissions,
 [  --disable-permissions   Disable permissions (popup and cookie blocking)],
     MOZ_PERMISSIONS=,
     MOZ_PERMISSIONS=1
 )
 
+AC_SUBST(MOZ_PERMISSIONS)
+if test -n "$MOZ_PERMISSIONS"; then
+    AC_DEFINE(MOZ_PERMISSIONS)
+fi
+
 dnl ========================================================
 dnl Child permissions, currently only used for b2g
 dnl ========================================================
 if test -n "$MOZ_B2G"; then
     if test -n "$MOZ_PERMISSIONS"; then
         MOZ_CHILD_PERMISSIONS=1
+        AC_DEFINE(MOZ_CHILD_PERMISSIONS)
     else
         AC_MSG_ERROR([You need to enable MOZ_PERMISSIONS for MOZ_CHILD_PERMISSIONS])
     fi
 fi
 AC_SUBST(MOZ_CHILD_PERMISSIONS)
 
 dnl ========================================================
 dnl NegotiateAuth
@@ -8424,17 +8430,16 @@ AC_SUBST(RCFLAGS)
 AC_SUBST(MC)
 AC_SUBST(WINDRES)
 AC_SUBST(IMPLIB)
 AC_SUBST(FILTER)
 AC_SUBST(BIN_FLAGS)
 AC_SUBST(MOZ_WIDGET_TOOLKIT)
 AC_SUBST(MOZ_UPDATE_XTERM)
 AC_SUBST(MOZ_AUTH_EXTENSION)
-AC_SUBST(MOZ_PERMISSIONS)
 AC_SUBST(MOZ_PREF_EXTENSIONS)
 AC_SUBST(MOZ_DEBUG)
 AC_SUBST(MOZ_DEBUG_SYMBOLS)
 AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
 AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
 AC_SUBST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
 AC_SUBST(MOZ_EXTENSIONS)
--- a/docshell/shistory/src/nsSHEntry.h
+++ b/docshell/shistory/src/nsSHEntry.h
@@ -18,18 +18,18 @@
 #include "nsISHEntry.h"
 #include "nsISHContainer.h"
 
 class nsSHEntryShared;
 class nsIInputStream;
 class nsIURI;
 
 class nsSHEntry final : public nsISHEntry,
-                            public nsISHContainer,
-                            public nsISHEntryInternal
+                        public nsISHContainer,
+                        public nsISHEntryInternal
 {
 public: 
   nsSHEntry();
   nsSHEntry(const nsSHEntry &other);
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHENTRY
   NS_DECL_NSISHENTRYINTERNAL
--- a/docshell/shistory/src/nsSHEntryShared.h
+++ b/docshell/shistory/src/nsSHEntryShared.h
@@ -26,17 +26,17 @@ class nsISupportsArray;
 
 // A document may have multiple SHEntries, either due to hash navigations or
 // calls to history.pushState.  SHEntries corresponding to the same document
 // share many members; in particular, they share state related to the
 // back/forward cache.
 //
 // nsSHEntryShared is the vehicle for this sharing.
 class nsSHEntryShared final : public nsIBFCacheEntry,
-                                  public nsIMutationObserver
+                              public nsIMutationObserver
 {
   public:
     static void EnsureHistoryTracker();
     static void Shutdown();
 
     nsSHEntryShared();
 
     NS_DECL_ISUPPORTS
--- a/docshell/shistory/src/nsSHistory.h
+++ b/docshell/shistory/src/nsSHistory.h
@@ -23,19 +23,19 @@
 
 class nsIDocShell;
 class nsSHEnumerator;
 class nsSHistoryObserver;
 class nsISHEntry;
 class nsISHTransaction;
 
 class nsSHistory final : public PRCList,
-                             public nsISHistory,
-                             public nsISHistoryInternal,
-                             public nsIWebNavigation
+                         public nsISHistory,
+                         public nsISHistoryInternal,
+                         public nsIWebNavigation
 {
 public:
   nsSHistory();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISHISTORY
   NS_DECL_NSISHISTORYINTERNAL
   NS_DECL_NSIWEBNAVIGATION
--- a/dom/archivereader/ArchiveReader.h
+++ b/dom/archivereader/ArchiveReader.h
@@ -28,17 +28,17 @@ class GlobalObject;
 BEGIN_ARCHIVEREADER_NAMESPACE
 
 class ArchiveRequest;
 
 /**
  * This is the ArchiveReader object
  */
 class ArchiveReader final : public nsISupports,
-                                public nsWrapperCache
+                            public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ArchiveReader)
 
   static already_AddRefed<ArchiveReader>
   Constructor(const GlobalObject& aGlobal, File& aBlob,
               const ArchiveReaderOptions& aOptions, ErrorResult& aError);
--- a/dom/archivereader/ArchiveZipFile.cpp
+++ b/dom/archivereader/ArchiveZipFile.cpp
@@ -16,17 +16,17 @@ using namespace mozilla::dom;
 USING_ARCHIVEREADER_NAMESPACE
 
 #define ZIP_CHUNK 16384
 
 /**
  * Input stream object for zip files
  */
 class ArchiveInputStream final : public nsIInputStream,
-                                     public nsISeekableStream
+                                 public nsISeekableStream
 {
 public:
   ArchiveInputStream(uint64_t aParentSize,
                      nsIInputStream* aInputStream,
                      nsString& aFilename,
                      uint32_t aStart,
                      uint32_t aLength,
                      ZipCentral& aCentral)
--- a/dom/asmjscache/AsmJSCache.cpp
+++ b/dom/asmjscache/AsmJSCache.cpp
@@ -1103,17 +1103,17 @@ FindHashMatch(const Metadata& aMetadata,
     return true;
   }
 
   return false;
 }
 
 // A runnable that executes for a cache access originating in the main process.
 class SingleProcessRunnable final : public File,
-                                        private MainProcessRunnable
+                                    private MainProcessRunnable
 {
 public:
   // In the single-process case, the calling JS compilation thread holds the
   // nsIPrincipal alive indirectly (via the global object -> compartment ->
   // principal) so we don't have to ref-count it here. This is fortunate since
   // we are off the main thread and nsIPrincipals can only be ref-counted on
   // the main thread.
   SingleProcessRunnable(nsIPrincipal* aPrincipal,
@@ -1181,17 +1181,17 @@ private:
 
   ReadParams mReadParams;
 };
 
 // A runnable that executes in a parent process for a cache access originating
 // in the content process. This runnable gets registered as an IPDL subprotocol
 // actor so that it can communicate with the corresponding ChildProcessRunnable.
 class ParentProcessRunnable final : public PAsmJSCacheEntryParent,
-                                        public MainProcessRunnable
+                                    public MainProcessRunnable
 {
 public:
   // The given principal comes from an IPC::Principal which will be dec-refed
   // at the end of the message, so we must ref-count it here. Fortunately, we
   // are on the main thread (where PContent messages are delivered).
   ParentProcessRunnable(nsIPrincipal* aPrincipal,
                         OpenMode aOpenMode,
                         WriteParams aWriteParams)
@@ -1352,17 +1352,17 @@ DeallocEntryParent(PAsmJSCacheEntryParen
   // Transfer ownership back from IPDL.
   nsRefPtr<ParentProcessRunnable> op =
     dont_AddRef(static_cast<ParentProcessRunnable*>(aActor));
 }
 
 namespace {
 
 class ChildProcessRunnable final : public File,
-                                       public PAsmJSCacheEntryChild
+                                   public PAsmJSCacheEntryChild
 {
 public:
   NS_DECL_NSIRUNNABLE
 
   // In the single-process case, the calling JS compilation thread holds the
   // nsIPrincipal alive indirectly (via the global object -> compartment ->
   // principal) so we don't have to ref-count it here. This is fortunate since
   // we are off the main thread and nsIPrincipals can only be ref-counted on
--- a/dom/base/Attr.h
+++ b/dom/base/Attr.h
@@ -24,17 +24,17 @@ class nsIDocument;
 
 namespace mozilla {
 class EventChainPreVisitor;
 namespace dom {
 
 // Attribute helper class used to wrap up an attribute with a dom
 // object that implements nsIDOMAttr and nsIDOMNode
 class Attr final : public nsIAttribute,
-                       public nsIDOMAttr
+                   public nsIDOMAttr
 {
   virtual ~Attr() {}
 
 public:
   Attr(nsDOMAttributeMap* aAttrMap,
        already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
        const nsAString& aValue,
        bool aNsAware);
--- a/dom/base/Comment.h
+++ b/dom/base/Comment.h
@@ -9,17 +9,17 @@
 #include "mozilla/Attributes.h"
 #include "nsIDOMComment.h"
 #include "nsGenericDOMDataNode.h"
 
 namespace mozilla {
 namespace dom {
 
 class Comment final : public nsGenericDOMDataNode,
-                          public nsIDOMComment
+                      public nsIDOMComment
 {
 private:
   void Init()
   {
     MOZ_ASSERT(mNodeInfo->NodeType() == nsIDOMNode::COMMENT_NODE,
                "Bad NodeType in aNodeInfo");
   }
 
--- a/dom/base/Console.h
+++ b/dom/base/Console.h
@@ -21,17 +21,17 @@ class nsIXPConnectJSObjectHolder;
 
 namespace mozilla {
 namespace dom {
 
 class ConsoleCallData;
 struct ConsoleStackEntry;
 
 class Console final : public nsIObserver
-                        , public nsWrapperCache
+                    , public nsWrapperCache
 {
   ~Console();
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Console)
   NS_DECL_NSIOBSERVER
 
--- a/dom/base/DOMImplementation.h
+++ b/dom/base/DOMImplementation.h
@@ -20,17 +20,17 @@
 
 class nsIDOMDocument;
 
 namespace mozilla {
 namespace dom {
 class DocumentType;
 
 class DOMImplementation final : public nsIDOMDOMImplementation
-                                  , public nsWrapperCache
+                              , public nsWrapperCache
 {
   ~DOMImplementation()
   {
   }
 
 public:
   DOMImplementation(nsIDocument* aOwner,
                     nsIGlobalObject* aScriptObject,
--- a/dom/base/DOMParser.h
+++ b/dom/base/DOMParser.h
@@ -16,18 +16,18 @@
 #include "mozilla/dom/TypedArray.h"
 
 class nsIDocument;
 
 namespace mozilla {
 namespace dom {
 
 class DOMParser final : public nsIDOMParser,
-                            public nsSupportsWeakReference,
-                            public nsWrapperCache
+                        public nsSupportsWeakReference,
+                        public nsWrapperCache
 {
   typedef mozilla::dom::GlobalObject GlobalObject;
 
   virtual ~DOMParser();
 
 public: 
   DOMParser();
 
--- a/dom/base/DOMRect.h
+++ b/dom/base/DOMRect.h
@@ -71,17 +71,17 @@ public:
     return std::max(y, y + h);
   }
 
 protected:
   nsCOMPtr<nsISupports> mParent;
 };
 
 class DOMRect final : public DOMRectReadOnly
-                        , public nsIDOMClientRect
+                    , public nsIDOMClientRect
 {
 public:
   explicit DOMRect(nsISupports* aParent, double aX = 0, double aY = 0,
                    double aWidth = 0, double aHeight = 0)
     : DOMRectReadOnly(aParent)
     , mX(aX)
     , mY(aY)
     , mWidth(aWidth)
@@ -142,17 +142,17 @@ public:
 protected:
   double mX, mY, mWidth, mHeight;
 
 private:
   ~DOMRect() {};
 };
 
 class DOMRectList final : public nsIDOMClientRectList,
-                              public nsWrapperCache
+                          public nsWrapperCache
 {
   ~DOMRectList() {}
 
 public:
   explicit DOMRectList(nsISupports *aParent) : mParent(aParent)
   {
   }
 
--- a/dom/base/Element.h
+++ b/dom/base/Element.h
@@ -1462,345 +1462,339 @@ nsresult                                
   NS_IMETHODIMP                                                       \
   _class::Set##_method(bool aValue)                                   \
   {                                                                   \
     return SetBoolAttr(nsGkAtoms::_atom, aValue);                     \
   }
 
 #define NS_FORWARD_NSIDOMELEMENT_TO_GENERIC                                   \
 typedef mozilla::dom::Element Element;                                        \
-NS_IMETHOD GetTagName(nsAString& aTagName) final override             \
+NS_IMETHOD GetTagName(nsAString& aTagName) final override                     \
 {                                                                             \
   Element::GetTagName(aTagName);                                              \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetId(nsAString& aId) final override                       \
+NS_IMETHOD GetId(nsAString& aId) final override                               \
 {                                                                             \
   Element::GetId(aId);                                                        \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetId(const nsAString& aId) final override                 \
+NS_IMETHOD SetId(const nsAString& aId) final override                         \
 {                                                                             \
   Element::SetId(aId);                                                        \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClassName(nsAString& aClassName) final override         \
+NS_IMETHOD GetClassName(nsAString& aClassName) final override                 \
 {                                                                             \
   Element::GetClassName(aClassName);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetClassName(const nsAString& aClassName) final override   \
+NS_IMETHOD SetClassName(const nsAString& aClassName) final override           \
 {                                                                             \
   Element::SetClassName(aClassName);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClassList(nsISupports** aClassList) final override      \
+NS_IMETHOD GetClassList(nsISupports** aClassList) final override              \
 {                                                                             \
   Element::GetClassList(aClassList);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) final       \
-  override                                                                \
+NS_IMETHOD GetAttributes(nsIDOMMozNamedAttrMap** aAttributes) final override  \
 {                                                                             \
   NS_ADDREF(*aAttributes = Attributes());                                     \
   return NS_OK;                                                               \
 }                                                                             \
 using Element::GetAttribute;                                                  \
-NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) final  \
-  override                                                                \
+NS_IMETHOD GetAttribute(const nsAString& name, nsAString& _retval) final      \
+  override                                                                    \
 {                                                                             \
   nsString attr;                                                              \
   GetAttribute(name, attr);                                                   \
   _retval = attr;                                                             \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD GetAttributeNS(const nsAString& namespaceURI,                      \
                           const nsAString& localName,                         \
-                          nsAString& _retval) final override          \
+                          nsAString& _retval) final override                  \
 {                                                                             \
   Element::GetAttributeNS(namespaceURI, localName, _retval);                  \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD SetAttribute(const nsAString& name,                                \
-                        const nsAString& value) override                  \
+                        const nsAString& value) override                      \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::SetAttribute(name, value, rv);                                     \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD SetAttributeNS(const nsAString& namespaceURI,                      \
                           const nsAString& qualifiedName,                     \
-                          const nsAString& value) final override      \
+                          const nsAString& value) final override              \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::SetAttributeNS(namespaceURI, qualifiedName, value, rv);            \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 using Element::RemoveAttribute;                                               \
-NS_IMETHOD RemoveAttribute(const nsAString& name) final override      \
+NS_IMETHOD RemoveAttribute(const nsAString& name) final override              \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   RemoveAttribute(name, rv);                                                  \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD RemoveAttributeNS(const nsAString& namespaceURI,                   \
-                             const nsAString& localName) final            \
-  override                                                                \
+                             const nsAString& localName) final override       \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::RemoveAttributeNS(namespaceURI, localName, rv);                    \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 using Element::HasAttribute;                                                  \
 NS_IMETHOD HasAttribute(const nsAString& name,                                \
-                           bool* _retval) final override              \
+                           bool* _retval) final override                      \
 {                                                                             \
   *_retval = HasAttribute(name);                                              \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD HasAttributeNS(const nsAString& namespaceURI,                      \
                           const nsAString& localName,                         \
-                          bool* _retval) final override               \
+                          bool* _retval) final override                       \
 {                                                                             \
   *_retval = Element::HasAttributeNS(namespaceURI, localName);                \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD HasAttributes(bool* _retval) final override                \
+NS_IMETHOD HasAttributes(bool* _retval) final override                        \
 {                                                                             \
   *_retval = Element::HasAttributes();                                        \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD GetAttributeNode(const nsAString& name,                            \
-                            nsIDOMAttr** _retval) final override      \
+                            nsIDOMAttr** _retval) final override              \
 {                                                                             \
   NS_IF_ADDREF(*_retval = Element::GetAttributeNode(name));                   \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD SetAttributeNode(nsIDOMAttr* newAttr,                              \
-                            nsIDOMAttr** _retval) final override      \
+                            nsIDOMAttr** _retval) final override              \
 {                                                                             \
   if (!newAttr) {                                                             \
     return NS_ERROR_INVALID_POINTER;                                          \
   }                                                                           \
   mozilla::ErrorResult rv;                                                    \
   mozilla::dom::Attr* attr = static_cast<mozilla::dom::Attr*>(newAttr);       \
   *_retval = Element::SetAttributeNode(*attr, rv).take();                     \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD RemoveAttributeNode(nsIDOMAttr* oldAttr,                           \
-                               nsIDOMAttr** _retval) final override   \
+                               nsIDOMAttr** _retval) final override           \
 {                                                                             \
   if (!oldAttr) {                                                             \
     return NS_ERROR_INVALID_POINTER;                                          \
   }                                                                           \
   mozilla::ErrorResult rv;                                                    \
   mozilla::dom::Attr* attr = static_cast<mozilla::dom::Attr*>(oldAttr);       \
   *_retval = Element::RemoveAttributeNode(*attr, rv).take();                  \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD GetAttributeNodeNS(const nsAString& namespaceURI,                  \
                               const nsAString& localName,                     \
-                              nsIDOMAttr** _retval) final override    \
+                              nsIDOMAttr** _retval) final override            \
 {                                                                             \
   NS_IF_ADDREF(*_retval = Element::GetAttributeNodeNS(namespaceURI,           \
                                                       localName));            \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD SetAttributeNodeNS(nsIDOMAttr* newAttr,                            \
-                              nsIDOMAttr** _retval) final override    \
+                              nsIDOMAttr** _retval) final override            \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   mozilla::dom::Attr* attr = static_cast<mozilla::dom::Attr*>(newAttr);       \
   *_retval = Element::SetAttributeNodeNS(*attr, rv).take();                   \
   return rv.ErrorCode();                                                      \
 }                                                                             \
 NS_IMETHOD GetElementsByTagName(const nsAString& name,                        \
-                                nsIDOMHTMLCollection** _retval) final     \
-                                                                override  \
+                                nsIDOMHTMLCollection** _retval) final         \
+                                                                override      \
 {                                                                             \
   Element::GetElementsByTagName(name, _retval);                               \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD GetElementsByTagNameNS(const nsAString& namespaceURI,              \
                                   const nsAString& localName,                 \
-                                  nsIDOMHTMLCollection** _retval) final   \
-                                                                  override\
+                                  nsIDOMHTMLCollection** _retval) final       \
+                                                                  override    \
 {                                                                             \
   return Element::GetElementsByTagNameNS(namespaceURI, localName,             \
                                          _retval);                            \
 }                                                                             \
 NS_IMETHOD GetElementsByClassName(const nsAString& classes,                   \
-                                  nsIDOMHTMLCollection** _retval) final   \
-                                                                  override\
+                                  nsIDOMHTMLCollection** _retval) final       \
+                                                                  override    \
 {                                                                             \
   return Element::GetElementsByClassName(classes, _retval);                   \
 }                                                                             \
-NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) final        \
-  override                                                                \
+NS_IMETHOD GetChildElements(nsIDOMNodeList** aChildElements) final override   \
 {                                                                             \
   nsIHTMLCollection* list = FragmentOrElement::Children();                    \
   return CallQueryInterface(list, aChildElements);                            \
 }                                                                             \
-NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) final \
-  override                                                                \
+NS_IMETHOD GetFirstElementChild(nsIDOMElement** aFirstElementChild) final     \
+  override                                                                    \
 {                                                                             \
   Element* element = Element::GetFirstElementChild();                         \
   if (!element) {                                                             \
     *aFirstElementChild = nullptr;                                            \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aFirstElementChild);                     \
 }                                                                             \
-NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) final   \
-  override                                                                \
+NS_IMETHOD GetLastElementChild(nsIDOMElement** aLastElementChild) final       \
+  override                                                                    \
 {                                                                             \
   Element* element = Element::GetLastElementChild();                          \
   if (!element) {                                                             \
     *aLastElementChild = nullptr;                                             \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aLastElementChild);                      \
 }                                                                             \
 NS_IMETHOD GetPreviousElementSibling(nsIDOMElement** aPreviousElementSibling) \
-  final override                                                      \
+  final override                                                              \
 {                                                                             \
   Element* element = Element::GetPreviousElementSibling();                    \
   if (!element) {                                                             \
     *aPreviousElementSibling = nullptr;                                       \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aPreviousElementSibling);                \
 }                                                                             \
 NS_IMETHOD GetNextElementSibling(nsIDOMElement** aNextElementSibling)         \
-  final override                                                      \
+  final override                                                              \
 {                                                                             \
   Element* element = Element::GetNextElementSibling();                        \
   if (!element) {                                                             \
     *aNextElementSibling = nullptr;                                           \
     return NS_OK;                                                             \
   }                                                                           \
   return CallQueryInterface(element, aNextElementSibling);                    \
 }                                                                             \
-NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) final       \
-  override                                                                \
+NS_IMETHOD GetChildElementCount(uint32_t* aChildElementCount) final override  \
 {                                                                             \
   *aChildElementCount = Element::ChildElementCount();                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD MozRemove() final override                                 \
+NS_IMETHOD MozRemove() final override                                         \
 {                                                                             \
   nsINode::Remove();                                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) final           \
-  override                                                                \
+NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) final override      \
 {                                                                             \
   *_retval = Element::GetClientRects().take();                                \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) final        \
-  override                                                                \
+NS_IMETHOD GetBoundingClientRect(nsIDOMClientRect** _retval) final override   \
 {                                                                             \
   *_retval = Element::GetBoundingClientRect().take();                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollTop(int32_t* aScrollTop) final override           \
+NS_IMETHOD GetScrollTop(int32_t* aScrollTop) final override                   \
 {                                                                             \
   *aScrollTop = Element::ScrollTop();                                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetScrollTop(int32_t aScrollTop) final override            \
+NS_IMETHOD SetScrollTop(int32_t aScrollTop) final override                    \
 {                                                                             \
   Element::SetScrollTop(aScrollTop);                                          \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) final override         \
+NS_IMETHOD GetScrollLeft(int32_t* aScrollLeft) final override                 \
 {                                                                             \
   *aScrollLeft = Element::ScrollLeft();                                       \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) final override          \
+NS_IMETHOD SetScrollLeft(int32_t aScrollLeft) final override                  \
 {                                                                             \
   Element::SetScrollLeft(aScrollLeft);                                        \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) final override       \
+NS_IMETHOD GetScrollWidth(int32_t* aScrollWidth) final override               \
 {                                                                             \
   *aScrollWidth = Element::ScrollWidth();                                     \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) final override     \
+NS_IMETHOD GetScrollHeight(int32_t* aScrollHeight) final override             \
 {                                                                             \
   *aScrollHeight = Element::ScrollHeight();                                   \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientTop(int32_t* aClientTop) final override           \
+NS_IMETHOD GetClientTop(int32_t* aClientTop) final override                   \
 {                                                                             \
   *aClientTop = Element::ClientTop();                                         \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientLeft(int32_t* aClientLeft) final override         \
+NS_IMETHOD GetClientLeft(int32_t* aClientLeft) final override                 \
 {                                                                             \
   *aClientLeft = Element::ClientLeft();                                       \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientWidth(int32_t* aClientWidth) final override       \
+NS_IMETHOD GetClientWidth(int32_t* aClientWidth) final override               \
 {                                                                             \
   *aClientWidth = Element::ClientWidth();                                     \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetClientHeight(int32_t* aClientHeight) final override     \
+NS_IMETHOD GetClientHeight(int32_t* aClientHeight) final override             \
 {                                                                             \
   *aClientHeight = Element::ClientHeight();                                   \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) final override   \
+NS_IMETHOD GetScrollLeftMax(int32_t* aScrollLeftMax) final override           \
 {                                                                             \
   *aScrollLeftMax = Element::ScrollLeftMax();                                 \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) final override     \
+NS_IMETHOD GetScrollTopMax(int32_t* aScrollTopMax) final override             \
 {                                                                             \
   *aScrollTopMax = Element::ScrollTopMax();                                   \
   return NS_OK;                                                               \
 }                                                                             \
 NS_IMETHOD MozMatchesSelector(const nsAString& selector,                      \
-                              bool* _retval) final override           \
+                              bool* _retval) final override                   \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   *_retval = Element::MozMatchesSelector(selector, rv);                       \
   return rv.ErrorCode();                                                      \
 }                                                                             \
-NS_IMETHOD SetCapture(bool retargetToElement) final override          \
+NS_IMETHOD SetCapture(bool retargetToElement) final override                  \
 {                                                                             \
   Element::SetCapture(retargetToElement);                                     \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD ReleaseCapture(void) final override                        \
+NS_IMETHOD ReleaseCapture(void) final override                                \
 {                                                                             \
   Element::ReleaseCapture();                                                  \
   return NS_OK;                                                               \
 }                                                                             \
-NS_IMETHOD MozRequestFullScreen(void) final override                  \
+NS_IMETHOD MozRequestFullScreen(void) final override                          \
 {                                                                             \
   mozilla::ErrorResult rv;                                                    \
   Element::MozRequestFullScreen(nullptr, JS::UndefinedHandleValue, rv);       \
   return rv.ErrorCode();                                                      \
 }                                                                             \
-NS_IMETHOD MozRequestPointerLock(void) final override                 \
+NS_IMETHOD MozRequestPointerLock(void) final override                         \
 {                                                                             \
   Element::MozRequestPointerLock();                                           \
   return NS_OK;                                                               \
 }                                                                             \
 using nsINode::QuerySelector;                                                 \
 NS_IMETHOD QuerySelector(const nsAString& aSelector,                          \
-                         nsIDOMElement **aReturn) final override      \
+                         nsIDOMElement **aReturn) final override              \
 {                                                                             \
   return nsINode::QuerySelector(aSelector, aReturn);                          \
 }                                                                             \
 using nsINode::QuerySelectorAll;                                              \
 NS_IMETHOD QuerySelectorAll(const nsAString& aSelector,                       \
-                            nsIDOMNodeList **aReturn) final override  \
+                            nsIDOMNodeList **aReturn) final override          \
 {                                                                             \
   return nsINode::QuerySelectorAll(aSelector, aReturn);                       \
 }
 
 #endif // mozilla_dom_Element_h__
--- a/dom/base/EventSource.h
+++ b/dom/base/EventSource.h
@@ -32,21 +32,21 @@ namespace mozilla {
 class ErrorResult;
 
 namespace dom {
 
 class AsyncVerifyRedirectCallbackFwr;
 struct EventSourceInit;
 
 class EventSource final : public DOMEventTargetHelper
-                            , public nsIObserver
-                            , public nsIStreamListener
-                            , public nsIChannelEventSink
-                            , public nsIInterfaceRequestor
-                            , public nsSupportsWeakReference
+                        , public nsIObserver
+                        , public nsIStreamListener
+                        , public nsIChannelEventSink
+                        , public nsIInterfaceRequestor
+                        , public nsSupportsWeakReference
 {
 friend class AsyncVerifyRedirectCallbackFwr;
 
 public:
   explicit EventSource(nsPIDOMWindow* aOwnerWindow);
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_INHERITED(
     EventSource, DOMEventTargetHelper)
--- a/dom/base/File.cpp
+++ b/dom/base/File.cpp
@@ -47,18 +47,18 @@ namespace mozilla {
 namespace dom {
 
 // XXXkhuey the input stream that we pass out of a File
 // can outlive the actual File object.  Thus, we must
 // ensure that the buffer underlying the stream we get
 // from NS_NewByteInputStream is held alive as long as the
 // stream is.  We do that by passing back this class instead.
 class DataOwnerAdapter final : public nsIInputStream,
-                                   public nsISeekableStream,
-                                   public nsIIPCSerializableInputStream
+                               public nsISeekableStream,
+                               public nsIIPCSerializableInputStream
 {
   typedef FileImplMemory::DataOwner DataOwner;
 public:
   static nsresult Create(DataOwner* aDataOwner,
                          uint32_t aStart,
                          uint32_t aLength,
                          nsIInputStream** _retval);
 
--- a/dom/base/File.h
+++ b/dom/base/File.h
@@ -47,20 +47,20 @@ class FileInfo;
 
 struct BlobPropertyBag;
 struct ChromeFilePropertyBag;
 struct FilePropertyBag;
 class FileImpl;
 class OwningArrayBufferOrArrayBufferViewOrBlobOrString;
 
 class File final : public nsIDOMFile
-                     , public nsIXHRSendable
-                     , public nsIMutable
-                     , public nsSupportsWeakReference
-                     , public nsWrapperCache
+                 , public nsIXHRSendable
+                 , public nsIMutable
+                 , public nsSupportsWeakReference
+                 , public nsWrapperCache
 {
 public:
   NS_DECL_NSIDOMBLOB
   NS_DECL_NSIDOMFILE
   NS_DECL_NSIXHRSENDABLE
   NS_DECL_NSIMUTABLE
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@@ -519,17 +519,18 @@ public:
   CreateSlice(uint64_t aStart, uint64_t aLength,
               const nsAString& aContentType, ErrorResult& aRv) override;
 
   virtual bool IsMemoryFile() const override
   {
     return true;
   }
 
-  class DataOwner final : public mozilla::LinkedListElement<DataOwner> {
+  class DataOwner final : public mozilla::LinkedListElement<DataOwner>
+  {
   public:
     NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DataOwner)
     DataOwner(void* aMemoryBuffer, uint64_t aLength)
       : mData(aMemoryBuffer)
       , mLength(aLength)
     {
       mozilla::StaticMutexAutoLock lock(sDataOwnerMutex);
 
@@ -809,17 +810,17 @@ private:
 
   nsCOMPtr<nsIFile> mFile;
   bool mWholeFile;
   bool mStoredFile;
   bool mIsTemporary;
 };
 
 class FileList final : public nsIDOMFileList,
-                           public nsWrapperCache
+                       public nsWrapperCache
 {
   ~FileList() {}
 
 public:
   explicit FileList(nsISupports *aParent) : mParent(aParent)
   {
   }
 
--- a/dom/base/ImportManager.h
+++ b/dom/base/ImportManager.h
@@ -57,17 +57,17 @@ class AutoError;
 namespace mozilla {
 namespace dom {
 
 class ImportManager;
 
 typedef nsTHashtable<nsPtrHashKey<nsINode>> NodeTable;
 
 class ImportLoader final : public nsIStreamListener
-                             , public nsIDOMEventListener
+                         , public nsIDOMEventListener
 {
 
   // A helper inner class to decouple the logic of updating the import graph
   // after a new import link has been found by one of the parsers.
   class Updater {
 
   public:
     explicit Updater(ImportLoader* aLoader) : mLoader(aLoader)
--- a/dom/base/MessageChannel.h
+++ b/dom/base/MessageChannel.h
@@ -17,17 +17,17 @@
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class MessagePort;
 
 class MessageChannel final : public nsISupports
-                               , public nsWrapperCache
+                           , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MessageChannel)
 
   static bool Enabled(JSContext* aCx, JSObject* aGlobal);
 
 public:
--- a/dom/base/MessagePortList.h
+++ b/dom/base/MessagePortList.h
@@ -14,17 +14,17 @@
 #include "nsWrapperCache.h"
 #include "nsAutoPtr.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 namespace dom {
 
 class MessagePortList final : public nsISupports
-                                , public nsWrapperCache
+                            , public nsWrapperCache
 {
   ~MessagePortList() {}
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MessagePortList)
 
 public:
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -100,18 +100,18 @@ class TimeManager;
 
 namespace system {
 #ifdef MOZ_AUDIO_CHANNEL_MANAGER
 class AudioChannelManager;
 #endif
 } // namespace system
 
 class Navigator final : public nsIDOMNavigator
-                          , public nsIMozNavigatorNetwork
-                          , public nsWrapperCache
+                      , public nsIMozNavigatorNetwork
+                      , public nsWrapperCache
 {
 public:
   explicit Navigator(nsPIDOMWindow* aInnerWindow);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Navigator,
                                                          nsIDOMNavigator)
   NS_DECL_NSIDOMNAVIGATOR
--- a/dom/base/NodeIterator.h
+++ b/dom/base/NodeIterator.h
@@ -18,18 +18,18 @@
 
 class nsINode;
 class nsIDOMNode;
 
 namespace mozilla {
 namespace dom {
 
 class NodeIterator final : public nsIDOMNodeIterator,
-                               public nsTraversal,
-                               public nsStubMutationObserver
+                           public nsTraversal,
+                           public nsStubMutationObserver
 {
 public:
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_NSIDOMNODEITERATOR
 
     NodeIterator(nsINode *aRoot,
                  uint32_t aWhatToShow,
                  const NodeFilterHolder &aFilter);
--- a/dom/base/ResponsiveImageSelector.cpp
+++ b/dom/base/ResponsiveImageSelector.cpp
@@ -98,30 +98,28 @@ ResponsiveImageSelector::SetCandidatesFr
       break;
     }
 
     url = iter;
 
     // Find end of url
     for (;iter != end && !nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
 
-    urlEnd = iter;
-
     // Omit trailing commas from URL.
     // Multiple commas are a non-fatal error.
-    while (urlEnd != url) {
-      if (*(--urlEnd) != char16_t(',')) {
-        urlEnd++;
+    while (iter != url) {
+      if (*(--iter) != char16_t(',')) {
+        iter++;
         break;
       }
     }
 
-    const nsDependentSubstring &urlStr = Substring(url, urlEnd);
+    const nsDependentSubstring &urlStr = Substring(url, iter);
 
-    MOZ_ASSERT(url != urlEnd, "Shouldn't have empty URL at this point");
+    MOZ_ASSERT(url != iter, "Shouldn't have empty URL at this point");
 
     ResponsiveImageCandidate candidate;
     if (candidate.ConsumeDescriptors(iter, end)) {
       candidate.SetURLSpec(urlStr);
       AppendCandidateIfUnique(candidate);
     }
   }
 
--- a/dom/base/SubtleCrypto.h
+++ b/dom/base/SubtleCrypto.h
@@ -17,17 +17,17 @@ namespace mozilla {
 namespace dom {
 
 class ObjectOrString;
 class Promise;
 
 typedef ArrayBufferViewOrArrayBuffer CryptoOperationData;
 
 class SubtleCrypto final : public nsISupports,
-                               public nsWrapperCache
+                           public nsWrapperCache
 {
   ~SubtleCrypto() {}
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SubtleCrypto)
 
 public:
--- a/dom/base/TextInputProcessor.h
+++ b/dom/base/TextInputProcessor.h
@@ -16,17 +16,17 @@
 
 namespace mozilla {
 
 namespace widget{
 class TextEventDispatcher;
 } // namespace widget
 
 class TextInputProcessor final : public nsITextInputProcessor
-                                   , public widget::TextEventDispatcherListener
+                               , public widget::TextEventDispatcherListener
 {
   typedef mozilla::widget::IMENotification IMENotification;
   typedef mozilla::widget::TextEventDispatcher TextEventDispatcher;
 
 public:
   TextInputProcessor();
 
   NS_DECL_ISUPPORTS
--- a/dom/base/URLSearchParams.h
+++ b/dom/base/URLSearchParams.h
@@ -22,17 +22,17 @@ class URLSearchParamsObserver : public n
 {
 public:
   virtual ~URLSearchParamsObserver() {}
 
   virtual void URLSearchParamsUpdated(URLSearchParams* aFromThis) = 0;
 };
 
 class URLSearchParams final : public nsISupports,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
   ~URLSearchParams();
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(URLSearchParams)
 
   URLSearchParams();
--- a/dom/base/WebSocket.cpp
+++ b/dom/base/WebSocket.cpp
@@ -57,21 +57,21 @@
 
 using namespace mozilla::net;
 using namespace mozilla::dom::workers;
 
 namespace mozilla {
 namespace dom {
 
 class WebSocketImpl final : public nsIInterfaceRequestor
-                              , public nsIWebSocketListener
-                              , public nsIObserver
-                              , public nsSupportsWeakReference
-                              , public nsIRequest
-                              , public nsIEventTarget
+                          , public nsIWebSocketListener
+                          , public nsIObserver
+                          , public nsSupportsWeakReference
+                          , public nsIRequest
+                          , public nsIEventTarget
 {
 public:
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSIWEBSOCKETLISTENER
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIREQUEST
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIEVENTTARGET
--- a/dom/base/nsContentPermissionHelper.h
+++ b/dom/base/nsContentPermissionHelper.h
@@ -102,17 +102,17 @@ class nsContentPermissionRequestProxy : 
   mozilla::dom::ContentPermissionRequestParent* mParent;
   nsTArray<mozilla::dom::PermissionRequest> mPermissionRequests;
 };
 
 /**
  * RemotePermissionRequest will send a prompt ipdl request to b2g process.
  */
 class RemotePermissionRequest final : public nsISupports
-                                        , public mozilla::dom::PContentPermissionRequestChild
+                                    , public mozilla::dom::PContentPermissionRequestChild
 {
 public:
   NS_DECL_ISUPPORTS
 
   RemotePermissionRequest(nsIContentPermissionRequest* aRequest,
                           nsPIDOMWindow* aWindow);
 
   // It will be called when prompt dismissed.
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -394,17 +394,17 @@ EventListenerManagerHashClearEntry(PLDHa
   EventListenerManagerMapEntry *lm =
     static_cast<EventListenerManagerMapEntry *>(entry);
 
   // Let the EventListenerManagerMapEntry clean itself up...
   lm->~EventListenerManagerMapEntry();
 }
 
 class SameOriginCheckerImpl final : public nsIChannelEventSink,
-                                        public nsIInterfaceRequestor
+                                    public nsIInterfaceRequestor
 {
   ~SameOriginCheckerImpl() {}
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIINTERFACEREQUESTOR
 };
 
--- a/dom/base/nsDOMMutationObserver.h
+++ b/dom/base/nsDOMMutationObserver.h
@@ -26,17 +26,17 @@
 #include "nsIDocument.h"
 #include "mozilla/dom/AnimationPlayer.h"
 #include "nsIAnimationObserver.h"
 
 class nsDOMMutationObserver;
 using mozilla::dom::MutationObservingInfo;
 
 class nsDOMMutationRecord final : public nsISupports,
-                                      public nsWrapperCache
+                                  public nsWrapperCache
 {
   virtual ~nsDOMMutationRecord() {}
 
 public:
   typedef nsTArray<nsRefPtr<mozilla::dom::AnimationPlayer>> AnimationPlayerArray;
 
   nsDOMMutationRecord(nsIAtom* aType, nsISupports* aOwner)
   : mType(aType), mAttrNamespace(NullString()), mPrevValue(NullString()), mOwner(aOwner)
@@ -438,17 +438,17 @@ private:
                                AnimationMutation aMutationType);
 };
 
 #define NS_DOM_MUTATION_OBSERVER_IID \
 { 0x0c3b91f8, 0xcc3b, 0x4b08, \
   { 0x9e, 0xab, 0x07, 0x47, 0xa9, 0xe4, 0x65, 0xb4 } }
 
 class nsDOMMutationObserver final : public nsISupports,
-                                        public nsWrapperCache
+                                    public nsWrapperCache
 {
 public:
   nsDOMMutationObserver(already_AddRefed<nsPIDOMWindow>&& aOwner,
                         mozilla::dom::MutationCallback& aCb)
   : mOwner(aOwner), mLastPendingMutation(nullptr), mPendingMutationCount(0),
     mCallback(&aCb), mWaitingForRun(false), mId(++sCount)
   {
   }
--- a/dom/base/nsDOMScriptObjectFactory.h
+++ b/dom/base/nsDOMScriptObjectFactory.h
@@ -18,17 +18,17 @@
  *                               use in OS2
  */
 
 #include "nsIDOMScriptObjectFactory.h"
 #include "nsIObserver.h"
 #include "mozilla/Attributes.h"
 
 class nsDOMScriptObjectFactory final : public nsIDOMScriptObjectFactory,
-                                           public nsIObserver
+                                       public nsIObserver
 {
   ~nsDOMScriptObjectFactory() {}
 
 public:
   nsDOMScriptObjectFactory();
 
   NS_DECL_ISUPPORTS
 
--- a/dom/base/nsDOMSerializer.h
+++ b/dom/base/nsDOMSerializer.h
@@ -10,17 +10,17 @@
 #include "nsWrapperCache.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/XMLSerializerBinding.h"
 #include "nsAutoPtr.h"
 
 class nsINode;
 
 class nsDOMSerializer final : public nsIDOMSerializer,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
 public:
   nsDOMSerializer();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMSerializer)
 
   // nsIDOMSerializer
--- a/dom/base/nsDOMWindowUtils.h
+++ b/dom/base/nsDOMWindowUtils.h
@@ -50,17 +50,17 @@ private:
   ~nsTranslationNodeList() {}
 
   nsTArray<nsCOMPtr<nsIDOMNode> > mNodes;
   nsTArray<bool> mNodeIsRoot;
   uint32_t mLength;
 };
 
 class nsDOMWindowUtils final : public nsIDOMWindowUtils,
-                                   public nsSupportsWeakReference
+                               public nsSupportsWeakReference
 {
   typedef mozilla::widget::TextEventDispatcher
     TextEventDispatcher;
 public:
   explicit nsDOMWindowUtils(nsGlobalWindow *aWindow);
   NS_DECL_ISUPPORTS
   NS_DECL_NSIDOMWINDOWUTILS
 
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -592,18 +592,18 @@ protected:
 
     // Use shims for interfaces that docshell implements directly so that we
     // don't hand out references to the docshell.  The shims should all allow
     // getInterface back on us, but other than that each one should only
     // implement one interface.
     
     // XXXbz I wish we could just derive the _allcaps thing from _i
 #define DECL_SHIM(_i, _allcaps)                                              \
-    class _i##Shim final : public nsIInterfaceRequestor,                 \
-                               public _i                                     \
+    class _i##Shim final : public nsIInterfaceRequestor,                     \
+                           public _i                                         \
     {                                                                        \
       ~_i##Shim() {}                                                         \
     public:                                                                  \
       _i##Shim(nsIInterfaceRequestor* aIfreq, _i* aRealPtr)                  \
         : mIfReq(aIfreq), mRealPtr(aRealPtr)                                 \
       {                                                                      \
         NS_ASSERTION(mIfReq, "Expected non-null here");                      \
         NS_ASSERTION(mRealPtr, "Expected non-null here");                    \
--- a/dom/base/nsFocusManager.h
+++ b/dom/base/nsFocusManager.h
@@ -27,18 +27,18 @@ class nsIMessageBroadcaster;
 struct nsDelayedBlurOrFocusEvent;
 
 /**
  * The focus manager keeps track of where the focus is, that is, the node
  * which receives key events.
  */
 
 class nsFocusManager final : public nsIFocusManager,
-                                 public nsIObserver,
-                                 public nsSupportsWeakReference
+                             public nsIObserver,
+                             public nsSupportsWeakReference
 {
   typedef mozilla::widget::InputContextAction InputContextAction;
 
 public:
 
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsFocusManager, nsIFocusManager)
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_NSIOBSERVER
--- a/dom/base/nsFormData.h
+++ b/dom/base/nsFormData.h
@@ -21,19 +21,19 @@ class ErrorResult;
 namespace dom {
 class File;
 class HTMLFormElement;
 class GlobalObject;
 } // namespace dom
 } // namespace mozilla
 
 class nsFormData final : public nsIDOMFormData,
-                             public nsIXHRSendable,
-                             public nsFormSubmission,
-                             public nsWrapperCache
+                         public nsIXHRSendable,
+                         public nsFormSubmission,
+                         public nsWrapperCache
 {
 private:
   ~nsFormData() {}
 
   typedef mozilla::dom::File File;
   struct FormDataTuple
   {
     nsString name;
--- a/dom/base/nsFrameLoader.h
+++ b/dom/base/nsFrameLoader.h
@@ -50,18 +50,18 @@ class RenderFrameParent;
 #if defined(MOZ_WIDGET_GTK)
 typedef struct _GtkWidget GtkWidget;
 #endif
 #ifdef MOZ_WIDGET_QT
 class QX11EmbedContainer;
 #endif
 
 class nsFrameLoader final : public nsIFrameLoader,
-                                public nsStubMutationObserver,
-                                public mozilla::dom::ipc::MessageManagerCallback
+                            public nsStubMutationObserver,
+                            public mozilla::dom::ipc::MessageManagerCallback
 {
   friend class AutoResetInShow;
   typedef mozilla::dom::PBrowserParent PBrowserParent;
   typedef mozilla::dom::TabParent TabParent;
   typedef mozilla::layout::RenderFrameParent RenderFrameParent;
 
 protected:
   nsFrameLoader(mozilla::dom::Element* aOwner, bool aNetworkCreated);
--- a/dom/base/nsFrameMessageManager.h
+++ b/dom/base/nsFrameMessageManager.h
@@ -148,20 +148,20 @@ public:
   virtual bool ToObject(JSContext* aCx, JS::MutableHandle<JSObject*> aObjp)
     override;
 
 private:
   JS::Rooted<JSObject*> mObj;
 };
 
 class nsFrameMessageManager final : public nsIContentFrameMessageManager,
-                                        public nsIMessageBroadcaster,
-                                        public nsIFrameScriptLoader,
-                                        public nsIProcessScriptLoader,
-                                        public nsIProcessChecker
+                                    public nsIMessageBroadcaster,
+                                    public nsIFrameScriptLoader,
+                                    public nsIProcessScriptLoader,
+                                    public nsIProcessChecker
 {
   friend class mozilla::dom::MessageManagerReporter;
   typedef mozilla::dom::StructuredCloneData StructuredCloneData;
 public:
   nsFrameMessageManager(mozilla::dom::ipc::MessageManagerCallback* aCallback,
                         nsFrameMessageManager* aParentManager,
                         /* mozilla::dom::ipc::MessageManagerFlags */ uint32_t aFlags)
   : mChrome(!!(aFlags & mozilla::dom::ipc::MM_CHROME)),
--- a/dom/base/nsGenConImageContent.cpp
+++ b/dom/base/nsGenConImageContent.cpp
@@ -16,17 +16,17 @@
 #include "imgIRequest.h"
 #include "mozilla/BasicEvents.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventStates.h"
 
 using namespace mozilla;
 
 class nsGenConImageContent final : public nsXMLElement,
-                                       public nsImageLoadingContent
+                                   public nsImageLoadingContent
 {
 public:
   explicit nsGenConImageContent(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsXMLElement(aNodeInfo)
   {
     // nsImageLoadingContent starts out broken, so we start out
     // suppressed to match it.
     AddStatesSilently(NS_EVENT_STATE_SUPPRESSED);
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -472,17 +472,17 @@ static const char sPopStatePrefStr[] = "
 #define NETWORK_UPLOAD_EVENT_NAME     NS_LITERAL_STRING("moznetworkupload")
 #define NETWORK_DOWNLOAD_EVENT_NAME   NS_LITERAL_STRING("moznetworkdownload")
 
 /**
  * An indirect observer object that means we don't have to implement nsIObserver
  * on nsGlobalWindow, where any script could see it.
  */
 class nsGlobalWindowObserver final : public nsIObserver,
-                                         public nsIInterfaceRequestor
+                                     public nsIInterfaceRequestor
 {
 public:
   explicit nsGlobalWindowObserver(nsGlobalWindow* aWindow) : mWindow(aWindow) {}
   NS_DECL_ISUPPORTS
   NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData) override
   {
     if (!mWindow)
       return NS_OK;
--- a/dom/base/nsLocation.h
+++ b/dom/base/nsLocation.h
@@ -21,18 +21,18 @@ class nsIURI;
 class nsIDocShell;
 class nsIDocShellLoadInfo;
 
 //*****************************************************************************
 // nsLocation: Script "location" object
 //*****************************************************************************
 
 class nsLocation final : public nsIDOMLocation
-                           , public nsWrapperCache
-                           , public mozilla::dom::URLSearchParamsObserver
+                       , public nsWrapperCache
+                       , public mozilla::dom::URLSearchParamsObserver
 {
   typedef mozilla::ErrorResult ErrorResult;
 
 public:
   nsLocation(nsPIDOMWindow* aWindow, nsIDocShell *aDocShell);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsLocation,
--- a/dom/base/nsMimeTypeArray.h
+++ b/dom/base/nsMimeTypeArray.h
@@ -12,17 +12,17 @@
 #include "nsWrapperCache.h"
 #include "nsAutoPtr.h"
 #include "nsPIDOMWindow.h"
 
 class nsMimeType;
 class nsPluginElement;
 
 class nsMimeTypeArray final : public nsISupports,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
 public:
   explicit nsMimeTypeArray(nsPIDOMWindow* aWindow);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsMimeTypeArray)
 
   nsPIDOMWindow* GetParentObject() const;
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -1288,18 +1288,18 @@ nsObjectLoadingContent::GetBaseURI(nsIUR
   return NS_OK;
 }
 
 // nsIInterfaceRequestor
 // We use a shim class to implement this so that JS consumers still
 // see an interface requestor even though WebIDL bindings don't expose
 // that stuff.
 class ObjectInterfaceRequestorShim final : public nsIInterfaceRequestor,
-                                               public nsIChannelEventSink,
-                                               public nsIStreamListener
+                                           public nsIChannelEventSink,
+                                           public nsIStreamListener
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(ObjectInterfaceRequestorShim,
                                            nsIInterfaceRequestor)
   NS_DECL_NSIINTERFACEREQUESTOR
   // nsRefPtr<nsObjectLoadingContent> fails due to ambiguous AddRef/Release,
   // hence the ugly static cast :(
--- a/dom/base/nsPluginArray.h
+++ b/dom/base/nsPluginArray.h
@@ -13,18 +13,18 @@
 #include "nsWrapperCache.h"
 #include "nsPluginTags.h"
 #include "nsPIDOMWindow.h"
 
 class nsPluginElement;
 class nsMimeType;
 
 class nsPluginArray final : public nsIObserver,
-                                public nsSupportsWeakReference,
-                                public nsWrapperCache
+                            public nsSupportsWeakReference,
+                            public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsPluginArray,
                                                          nsIObserver)
 
   // nsIObserver
   NS_DECL_NSIOBSERVER
@@ -71,17 +71,17 @@ private:
 
   // mHiddenPlugins contains plugins that can be queried by
   // navigator.plugins["Hidden Plugin Name"] but do not need to be exposed in
   // navigator.plugins enumeration.
   nsTArray<nsRefPtr<nsPluginElement> > mHiddenPlugins;
 };
 
 class nsPluginElement final : public nsISupports,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsPluginElement)
 
   nsPluginElement(nsPIDOMWindow* aWindow, nsPluginTag* aPluginTag);
 
   nsPIDOMWindow* GetParentObject() const;
--- a/dom/base/nsRange.h
+++ b/dom/base/nsRange.h
@@ -26,18 +26,18 @@ class ErrorResult;
 namespace dom {
 class DocumentFragment;
 class DOMRect;
 class DOMRectList;
 }
 }
 
 class nsRange final : public nsIDOMRange,
-                          public nsStubMutationObserver,
-                          public nsWrapperCache
+                      public nsStubMutationObserver,
+                      public nsWrapperCache
 {
   typedef mozilla::ErrorResult ErrorResult;
   typedef mozilla::dom::DOMRect DOMRect;
   typedef mozilla::dom::DOMRectList DOMRectList;
 
   virtual ~nsRange();
 
 public:
--- a/dom/base/nsTextNode.cpp
+++ b/dom/base/nsTextNode.cpp
@@ -23,17 +23,17 @@
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 /**
  * class used to implement attr() generated content
  */
 class nsAttributeTextNode final : public nsTextNode,
-                                      public nsStubMutationObserver
+                                  public nsStubMutationObserver
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   
   nsAttributeTextNode(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                       int32_t aNameSpaceID,
                       nsIAtom* aAttrName) :
     nsTextNode(aNodeInfo),
--- a/dom/base/nsWindowMemoryReporter.h
+++ b/dom/base/nsWindowMemoryReporter.h
@@ -135,18 +135,18 @@ public:
  *   its own sub-tree, even if multiple tabs are showing the same URI.
  *
  * - <top-uri> is the URI of the top window.  Excepting special windows (such
  *   as browser.xul or hiddenWindow.html) it's what the address bar shows for
  *   the tab.
  *
  */
 class nsWindowMemoryReporter final : public nsIMemoryReporter,
-                                         public nsIObserver,
-                                         public nsSupportsWeakReference
+                                     public nsIObserver,
+                                     public nsSupportsWeakReference
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMEMORYREPORTER
   NS_DECL_NSIOBSERVER
 
   static void Init();
 
--- a/dom/base/nsXMLHttpRequest.h
+++ b/dom/base/nsXMLHttpRequest.h
@@ -142,17 +142,17 @@ public:
   IMPL_EVENT_HANDLER(load)
   IMPL_EVENT_HANDLER(timeout)
   IMPL_EVENT_HANDLER(loadend)
   
   virtual void DisconnectFromOwner() override;
 };
 
 class nsXMLHttpRequestUpload final : public nsXHREventTarget,
-                                         public nsIXMLHttpRequestUpload
+                                     public nsIXMLHttpRequestUpload
 {
 public:
   explicit nsXMLHttpRequestUpload(mozilla::DOMEventTargetHelper* aOwner)
     : nsXHREventTarget(aOwner)
   {
   }
 
   NS_DECL_ISUPPORTS_INHERITED
@@ -175,25 +175,25 @@ private:
   virtual ~nsXMLHttpRequestUpload() {}
 };
 
 class nsXMLHttpRequestXPCOMifier;
 
 // Make sure that any non-DOM interfaces added here are also added to
 // nsXMLHttpRequestXPCOMifier.
 class nsXMLHttpRequest final : public nsXHREventTarget,
-                                   public nsIXMLHttpRequest,
-                                   public nsIJSXMLHttpRequest,
-                                   public nsIStreamListener,
-                                   public nsIChannelEventSink,
-                                   public nsIProgressEventSink,
-                                   public nsIInterfaceRequestor,
-                                   public nsSupportsWeakReference,
-                                   public nsITimerCallback,
-                                   public nsISizeOfEventTarget
+                               public nsIXMLHttpRequest,
+                               public nsIJSXMLHttpRequest,
+                               public nsIStreamListener,
+                               public nsIChannelEventSink,
+                               public nsIProgressEventSink,
+                               public nsIInterfaceRequestor,
+                               public nsSupportsWeakReference,
+                               public nsITimerCallback,
+                               public nsISizeOfEventTarget
 {
   friend class nsXHRParseEndListener;
   friend class nsXMLHttpRequestXPCOMifier;
 
 public:
   nsXMLHttpRequest();
 
   virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override
@@ -629,17 +629,18 @@ protected:
   nsCOMPtr<nsIChannel> mChannel;
   nsCOMPtr<nsIDocument> mResponseXML;
   nsCOMPtr<nsIChannel> mCORSPreflightChannel;
   nsTArray<nsCString> mCORSUnsafeHeaders;
 
   nsCOMPtr<nsIStreamListener> mXMLParserStreamListener;
 
   // used to implement getAllResponseHeaders()
-  class nsHeaderVisitor : public nsIHttpHeaderVisitor {
+  class nsHeaderVisitor : public nsIHttpHeaderVisitor
+  {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIHTTPHEADERVISITOR
     nsHeaderVisitor(nsXMLHttpRequest* aXMLHttpRequest, nsIHttpChannel* aHttpChannel)
       : mXHR(aXMLHttpRequest), mHttpChannel(aHttpChannel) {}
     const nsACString &Headers() { return mHeaders; }
   private:
     virtual ~nsHeaderVisitor() {}
@@ -815,20 +816,20 @@ public:
 
 private:
   bool mOldVal;
 };
 
 // A shim class designed to expose the non-DOM interfaces of
 // XMLHttpRequest via XPCOM stuff.
 class nsXMLHttpRequestXPCOMifier final : public nsIStreamListener,
-                                             public nsIChannelEventSink,
-                                             public nsIProgressEventSink,
-                                             public nsIInterfaceRequestor,
-                                             public nsITimerCallback
+                                         public nsIChannelEventSink,
+                                         public nsIProgressEventSink,
+                                         public nsIInterfaceRequestor,
+                                         public nsITimerCallback
 {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXMLHttpRequestXPCOMifier,
                                            nsIStreamListener)
 
   explicit nsXMLHttpRequestXPCOMifier(nsXMLHttpRequest* aXHR) :
     mXHR(aXHR)
   {
--- a/dom/base/test/chrome/cpows_parent.xul
+++ b/dom/base/test/chrome/cpows_parent.xul
@@ -227,16 +227,22 @@
       // See bug 1072980.
       if (test_state == "remote") {
         // This doesn't work because we intercept toString and QueryInterface specially
         // and don't cache the function pointer.
         // See bug 1140636.
         todo_is(savedElement.toString, savedElement.toString, "toString identity works");
         todo_is(savedElement.QueryInterface, savedElement.QueryInterface, "toString identity works");
 
+        is(Object.prototype.toString.call(savedElement), "[object HTMLDivElement]",
+           "prove that this works (and doesn't leak)");
+
+        is(Object.prototype.toString.call(savedElement), "[object HTMLDivElement]",
+           "prove that this works twice (since we cache it and doesn't leak)");
+
         // This does work because we create a CPOW for isEqualNode that stays
         // alive as long as we have a reference to the first CPOW (so as long
         // as it's detectable).
         is(savedElement.isEqualNode, savedElement.isEqualNode, "webidl function identity works");
 
         let walker = Components.classes["@mozilla.org/inspector/deep-tree-walker;1"]
                                .createInstance(Components.interfaces.inIDeepTreeWalker);
         const SHOW_ELEMENT = Components.interfaces.nsIDOMNodeFilter.SHOW_ELEMENT;
--- a/dom/bindings/Exceptions.cpp
+++ b/dom/bindings/Exceptions.cpp
@@ -753,17 +753,17 @@ NS_IMETHODIMP JSStackFrame::GetFormatted
     aStack = mFormattedStack;
     return NS_OK;
   }
 
   JS::ExposeObjectToActiveJS(mStack);
   JS::Rooted<JSObject*> stack(cx, mStack);
 
   JS::Rooted<JSString*> formattedStack(cx);
-  if (!JS::StringifySavedFrameStack(cx, stack, &formattedStack)) {
+  if (!JS::BuildStackString(cx, stack, &formattedStack)) {
     JS_ClearPendingException(cx);
     aStack.Truncate();
     return NS_OK;
   }
 
   nsAutoJSString str;
   if (!str.init(cx, formattedStack)) {
     JS_ClearPendingException(cx);
--- a/dom/bindings/test/test_exception_options_from_jsimplemented.html
+++ b/dom/bindings/test/test_exception_options_from_jsimplemented.html
@@ -40,23 +40,23 @@ https://bugzilla.mozilla.org/show_bug.cg
       ok(e instanceof Error, "Should also have an Error here");
       ok(e instanceof DOMException, "Should have DOMException here");
       ise(e.name, "NotSupportedError", "Should have the right name here");
       ise(e.message, "We are a DOMException",
           "Should also have the right message");
       ise(e.code, DOMException.NOT_SUPPORTED_ERR,
           "Should have the right 'code'");
       ise(e.stack,
-          "doTest@http://mochi.test:8888/tests/dom/bindings/test/test_exception_options_from_jsimplemented.html:38:6\n",
+          "doTest@http://mochi.test:8888/tests/dom/bindings/test/test_exception_options_from_jsimplemented.html:38:7\n",
           "Exception stack should still only show our code");
       ise(e.filename,
           "http://mochi.test:8888/tests/dom/bindings/test/test_exception_options_from_jsimplemented.html",
           "Should still have the right file name");
       ise(e.lineNumber, 38, "Should still have the right line number");
-      todo_is(e.columnNumber, 6,
+      todo_is(e.columnNumber, 7,
               "No column number support for DOMException yet");
     }
     SimpleTest.finish();
   }
 
   SpecialPowers.pushPrefEnv({set: [['dom.expose_test_interfaces', true]]},
                             doTest);
   </script>
--- a/dom/bindings/test/test_promise_rejections_from_jsimplemented.html
+++ b/dom/bindings/test/test_promise_rejections_from_jsimplemented.html
@@ -40,17 +40,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
     var ourFile = "http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html";
 
     Promise.all([
       t.testPromiseWithThrowingChromePromiseInit().then(
           ensurePromiseFail.bind(null, 1),
           checkExn.bind(null, 44, "NS_ERROR_UNEXPECTED", "", undefined,
                         ourFile, 1,
-                        "doTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:44:6\n")),
+                        "doTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:44:7\n")),
       t.testPromiseWithThrowingContentPromiseInit(function() {
           thereIsNoSuchContentFunction1();
         }).then(
           ensurePromiseFail.bind(null, 2),
           checkExn.bind(null, 50, "ReferenceError",
                         "thereIsNoSuchContentFunction1 is not defined",
                         undefined, ourFile, 2,
                         "doTest/<@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:50:11\ndoTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:49:7\n")),
@@ -59,40 +59,40 @@ https://bugzilla.mozilla.org/show_bug.cg
           checkExn.bind(null, 0, "NS_ERROR_UNEXPECTED", "", undefined, "", 3, "")),
       t.testPromiseWithThrowingContentThenFunction(function() {
           thereIsNoSuchContentFunction2();
         }).then(
           ensurePromiseFail.bind(null, 4),
           checkExn.bind(null, 61, "ReferenceError",
                         "thereIsNoSuchContentFunction2 is not defined",
                         undefined, ourFile, 4,
-                        "doTest/<@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:61:11\n")),
+                        "doTest/<@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:61:11\nAsync*doTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:60:7\n")),
       t.testPromiseWithThrowingChromeThenable().then(
           ensurePromiseFail.bind(null, 5),
           checkExn.bind(null, 0, "NS_ERROR_UNEXPECTED", "", undefined, "", 5, "")),
       t.testPromiseWithThrowingContentThenable({
             then: function() { thereIsNoSuchContentFunction3(); }
         }).then(
           ensurePromiseFail.bind(null, 6),
           checkExn.bind(null, 72, "ReferenceError",
                         "thereIsNoSuchContentFunction3 is not defined",
                         undefined, ourFile, 6,
                         "doTest/<.then@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:72:32\n")),
       t.testPromiseWithDOMExceptionThrowingPromiseInit().then(
           ensurePromiseFail.bind(null, 7),
           checkExn.bind(null, 79, "NotFoundError",
                         "We are a second DOMException",
                         DOMException.NOT_FOUND_ERR, ourFile, 7,
-                        "doTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:79:6\n")),
+                        "doTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:79:7\n")),
       t.testPromiseWithDOMExceptionThrowingThenFunction().then(
           ensurePromiseFail.bind(null, 8),
           checkExn.bind(null, 85, "NetworkError",
                         "We are a third DOMException",
                         DOMException.NETWORK_ERR, ourFile, 8,
-                        "Async*doTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:85:6\n")),
+                        "Async*doTest@http://mochi.test:8888/tests/dom/bindings/test/test_promise_rejections_from_jsimplemented.html:85:7\n")),
       t.testPromiseWithDOMExceptionThrowingThenable().then(
           ensurePromiseFail.bind(null, 9),
           checkExn.bind(null, 0, "TypeMismatchError",
                         "We are a fourth DOMException",
                          DOMException.TYPE_MISMATCH_ERR, "", 9, "")),
     ]).then(SimpleTest.finish,
             function() {
               ok(false, "One of our catch statements totally failed");
--- a/dom/bluetooth/BluetoothProfileManagerBase.h
+++ b/dom/bluetooth/BluetoothProfileManagerBase.h
@@ -84,27 +84,27 @@ public:
   virtual void Reset() = 0;
 
   /**
    * Returns string of profile name.
    */
   virtual void GetName(nsACString& aName) = 0;
 };
 
-#define BT_DECL_PROFILE_MGR_BASE                                                 \
-public:                                                                          \
-  NS_DECL_ISUPPORTS                                                              \
-  NS_DECL_NSIOBSERVER                                                            \
-  virtual void OnGetServiceChannel(const nsAString& aDeviceAddress,              \
-                                   const nsAString& aServiceUuid,                \
+#define BT_DECL_PROFILE_MGR_BASE                                             \
+public:                                                                      \
+  NS_DECL_ISUPPORTS                                                          \
+  NS_DECL_NSIOBSERVER                                                        \
+  virtual void OnGetServiceChannel(const nsAString& aDeviceAddress,          \
+                                   const nsAString& aServiceUuid,            \
                                    int aChannel) override;                   \
   virtual void OnUpdateSdpRecords(const nsAString& aDeviceAddress) override; \
   virtual void GetAddress(nsAString& aDeviceAddress) override;               \
   virtual bool IsConnected() override;                                       \
-  virtual void Connect(const nsAString& aDeviceAddress,                          \
+  virtual void Connect(const nsAString& aDeviceAddress,                      \
                        BluetoothProfileController* aController) override;    \
   virtual void Disconnect(BluetoothProfileController* aController) override; \
   virtual void OnConnect(const nsAString& aErrorStr) override;               \
   virtual void OnDisconnect(const nsAString& AErrorStr) override;            \
   virtual void Reset() override;
 
 END_BLUETOOTH_NAMESPACE
 
--- a/dom/bluetooth2/BluetoothProfileManagerBase.h
+++ b/dom/bluetooth2/BluetoothProfileManagerBase.h
@@ -83,27 +83,27 @@ public:
   virtual void Reset() = 0;
 
   /**
    * Returns string of profile name.
    */
   virtual void GetName(nsACString& aName) = 0;
 };
 
-#define BT_DECL_PROFILE_MGR_BASE                                                 \
-public:                                                                          \
-  NS_DECL_ISUPPORTS                                                              \
-  NS_DECL_NSIOBSERVER                                                            \
-  virtual void OnGetServiceChannel(const nsAString& aDeviceAddress,              \
-                                   const nsAString& aServiceUuid,                \
+#define BT_DECL_PROFILE_MGR_BASE                                             \
+public:                                                                      \
+  NS_DECL_ISUPPORTS                                                          \
+  NS_DECL_NSIOBSERVER                                                        \
+  virtual void OnGetServiceChannel(const nsAString& aDeviceAddress,          \
+                                   const nsAString& aServiceUuid,            \
                                    int aChannel) override;                   \
   virtual void OnUpdateSdpRecords(const nsAString& aDeviceAddress) override; \
   virtual void GetAddress(nsAString& aDeviceAddress) override;               \
   virtual bool IsConnected() override;                                       \
-  virtual void Connect(const nsAString& aDeviceAddress,                          \
+  virtual void Connect(const nsAString& aDeviceAddress,                      \
                        BluetoothProfileController* aController) override;    \
   virtual void Disconnect(BluetoothProfileController* aController) override; \
   virtual void OnConnect(const nsAString& aErrorStr) override;               \
   virtual void OnDisconnect(const nsAString& AErrorStr) override;            \
   virtual void Reset() override;
 
 END_BLUETOOTH_NAMESPACE
 
--- a/dom/camera/DOMCameraCapabilities.h
+++ b/dom/camera/DOMCameraCapabilities.h
@@ -25,17 +25,17 @@ struct JSContext;
 
 namespace mozilla {
 namespace dom {
 
 /**
  * CameraRecorderVideoProfile
  */
 class CameraRecorderVideoProfile final : public nsISupports
-                                           , public nsWrapperCache
+                                       , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CameraRecorderVideoProfile)
 
   explicit CameraRecorderVideoProfile(nsISupports* aParent,
     const ICameraControl::RecorderProfile::Video& aProfile);
   nsISupports* GetParentObject() const        { return mParent; }
@@ -64,17 +64,17 @@ protected:
 private:
   DISALLOW_EVIL_CONSTRUCTORS(CameraRecorderVideoProfile);
 };
 
 /**
  * CameraRecorderAudioProfile
  */
 class CameraRecorderAudioProfile final : public nsISupports
-                                           , public nsWrapperCache
+                                       , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CameraRecorderAudioProfile)
 
   explicit CameraRecorderAudioProfile(nsISupports* aParent,
     const ICameraControl::RecorderProfile::Audio& aProfile);
   nsISupports* GetParentObject() const    { return mParent; }
@@ -98,17 +98,17 @@ protected:
 private:
   DISALLOW_EVIL_CONSTRUCTORS(CameraRecorderAudioProfile);
 };
 
 /**
  * CameraRecorderProfile
  */
 class CameraRecorderProfile final : public nsISupports
-                                      , public nsWrapperCache
+                                  , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CameraRecorderProfile)
 
   explicit CameraRecorderProfile(nsISupports* aParent,
                                  const ICameraControl::RecorderProfile& aProfile);
   nsISupports* GetParentObject() const          { return mParent; }
@@ -144,17 +144,17 @@ private:
 };
 
 /**
  * CameraRecorderProfiles
  */
 template<class T> class CameraClosedListenerProxy;
 
 class CameraRecorderProfiles final : public nsISupports
-                                       , public nsWrapperCache
+                                   , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CameraRecorderProfiles)
 
   explicit CameraRecorderProfiles(nsISupports* aParent,
                                   ICameraControl* aCameraControl);
   nsISupports* GetParentObject() const { return mParent; }
@@ -177,17 +177,17 @@ protected:
 private:
   DISALLOW_EVIL_CONSTRUCTORS(CameraRecorderProfiles);
 };
 
 /**
  * CameraCapabilities
  */
 class CameraCapabilities final : public nsISupports
-                                   , public nsWrapperCache
+                               , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CameraCapabilities)
 
   // Because this header's filename doesn't match its C++ or DOM-facing
   // classname, we can't rely on the [Func="..."] WebIDL tag to implicitly
   // include the right header for us; instead we must explicitly include a
--- a/dom/camera/DOMCameraControl.h
+++ b/dom/camera/DOMCameraControl.h
@@ -41,17 +41,17 @@ class ErrorResult;
 class StartRecordingHelper;
 
 #define NS_DOM_CAMERA_CONTROL_CID \
 { 0x3700c096, 0xf920, 0x438d, \
   { 0x8b, 0x3f, 0x15, 0xb3, 0xc9, 0x96, 0x23, 0x62 } }
 
 // Main camera control.
 class nsDOMCameraControl final : public DOMMediaStream
-                                   , public nsSupportsWeakReference
+                               , public nsSupportsWeakReference
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_CAMERA_CONTROL_CID)
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(nsDOMCameraControl, DOMMediaStream)
   NS_DECL_ISUPPORTS_INHERITED
 
   // Because this header's filename doesn't match its C++ or DOM-facing
--- a/dom/camera/DOMCameraDetectedFace.h
+++ b/dom/camera/DOMCameraDetectedFace.h
@@ -12,17 +12,17 @@
 #include "mozilla/dom/DOMPoint.h"
 #include "ICameraControl.h"
 
 namespace mozilla {
 
 namespace dom {
 
 class DOMCameraDetectedFace final : public nsISupports
-                                      , public nsWrapperCache
+                                  , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMCameraDetectedFace)
 
   // Because this header's filename doesn't match its C++ or DOM-facing
   // classname, we can't rely on the [Func="..."] WebIDL tag to implicitly
   // include the right header for us; instead we must explicitly include a
--- a/dom/cellbroadcast/CellBroadcastMessage.h
+++ b/dom/cellbroadcast/CellBroadcastMessage.h
@@ -15,17 +15,17 @@
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class CellBroadcastEtwsInfo;
 
 class CellBroadcastMessage final : public nsISupports
-                                     , public nsWrapperCache
+                                 , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CellBroadcastMessage)
 
   CellBroadcastMessage(nsPIDOMWindow* aWindow,
                        uint32_t aServiceId,
                        uint32_t aGsmGeographicalScope,
@@ -87,17 +87,17 @@ private:
   nsString mBody;
   Nullable<CellBroadcastMessageClass> mMessageClass;
   uint64_t mTimestamp;
   Nullable<uint16_t> mCdmaServiceCategory;
   nsRefPtr<CellBroadcastEtwsInfo> mEtwsInfo;
 };
 
 class CellBroadcastEtwsInfo final : public nsISupports
-                                      , public nsWrapperCache
+                                  , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CellBroadcastEtwsInfo)
 
   CellBroadcastEtwsInfo(nsPIDOMWindow* aWindow,
                         uint32_t aWarningType,
                         bool aEmergencyUserAlert,
--- a/dom/cellbroadcast/ipc/CellBroadcastIPCService.h
+++ b/dom/cellbroadcast/ipc/CellBroadcastIPCService.h
@@ -11,17 +11,17 @@
 #include "nsCOMPtr.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 namespace dom {
 namespace cellbroadcast {
 
 class CellBroadcastIPCService final : public PCellBroadcastChild
-                                        , public nsICellBroadcastService
+                                    , public nsICellBroadcastService
 
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICELLBROADCASTSERVICE
 
   CellBroadcastIPCService();
 
@@ -50,9 +50,9 @@ private:
   bool mActorDestroyed;
   nsTArray<nsCOMPtr<nsICellBroadcastListener>> mListeners;
 };
 
 } // namespace cellbroadcast
 } // namespace dom
 } // namespace mozilla
 
-#endif // mozilla_dom_cellbroadcast_CellBroadcastIPCService_h
\ No newline at end of file
+#endif // mozilla_dom_cellbroadcast_CellBroadcastIPCService_h
--- a/dom/cellbroadcast/ipc/CellBroadcastParent.h
+++ b/dom/cellbroadcast/ipc/CellBroadcastParent.h
@@ -11,17 +11,17 @@
 #include "mozilla/dom/cellbroadcast/PCellBroadcastParent.h"
 #include "nsICellBroadcastService.h"
 
 namespace mozilla {
 namespace dom {
 namespace cellbroadcast {
 
 class CellBroadcastParent final : public PCellBroadcastParent
-                                    , public nsICellBroadcastListener
+                                , public nsICellBroadcastListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICELLBROADCASTLISTENER
 
   bool Init();
 
 private:
--- a/dom/crypto/CryptoKey.h
+++ b/dom/crypto/CryptoKey.h
@@ -54,18 +54,18 @@ Thus, internally, a key has the followin
 * KeyAlgorithm - the algorithm (which must serialize/deserialize itself)
 * The actual keys (which the CryptoKey must serialize)
 
 */
 
 struct JsonWebKey;
 
 class CryptoKey final : public nsISupports,
-                            public nsWrapperCache,
-                            public nsNSSShutDownObject
+                        public nsWrapperCache,
+                        public nsNSSShutDownObject
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CryptoKey)
 
   static const uint32_t CLEAR_EXTRACTABLE = 0xFFFFFFE;
   static const uint32_t EXTRACTABLE = 0x00000001;
 
--- a/dom/datastore/DataStoreService.h
+++ b/dom/datastore/DataStoreService.h
@@ -23,17 +23,17 @@ namespace dom {
 class DataStoreInfo;
 class FirstRevisionIdCallback;
 class PendingRequest;
 class Promise;
 class RetrieveRevisionsCounter;
 class RevisionAddedEnableStoreCallback;
 
 class DataStoreService final : public nsIDataStoreService
-                                 , public nsIObserver
+                             , public nsIObserver
 {
   friend class ContentChild;
   friend class FirstRevisionIdCallback;
   friend class RetrieveRevisionsCounter;
   friend class RevisionAddedEnableStoreCallback;
 
 public:
   NS_DECL_ISUPPORTS
--- a/dom/events/CustomEvent.h
+++ b/dom/events/CustomEvent.h
@@ -9,17 +9,17 @@
 #include "nsIDOMCustomEvent.h"
 
 namespace mozilla {
 namespace dom {
 
 struct CustomEventInit;
 
 class CustomEvent final : public Event,
-                              public nsIDOMCustomEvent
+                          public nsIDOMCustomEvent
 {
 private:
   virtual ~CustomEvent();
 
   nsCOMPtr<nsIVariant> mDetail;
 
 public:
   explicit CustomEvent(mozilla::dom::EventTarget* aOwner,
--- a/dom/events/DOMEventTargetHelper.h
+++ b/dom/events/DOMEventTargetHelper.h
@@ -276,17 +276,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(DOMEventTa
     return _to GetJSContextForEventHandlers(); \
   }
 
 #define NS_REALLY_FORWARD_NSIDOMEVENTTARGET(_class) \
   using _class::AddEventListener;                   \
   using _class::RemoveEventListener;                \
   NS_FORWARD_NSIDOMEVENTTARGET(_class::)            \
   virtual mozilla::EventListenerManager*            \
-  GetOrCreateListenerManager() override {       \
+  GetOrCreateListenerManager() override {           \
     return _class::GetOrCreateListenerManager();    \
   }                                                 \
   virtual mozilla::EventListenerManager*            \
-  GetExistingListenerManager() const override { \
+  GetExistingListenerManager() const override {     \
     return _class::GetExistingListenerManager();    \
   }
 
 #endif // mozilla_DOMEventTargetHelper_h_
--- a/dom/events/DataTransfer.h
+++ b/dom/events/DataTransfer.h
@@ -47,17 +47,17 @@ struct TransferItem {
   nsCOMPtr<nsIVariant> mData;
 };
 
 #define NS_DATATRANSFER_IID \
 { 0x43ee0327, 0xde5d, 0x463d, \
   { 0x9b, 0xd0, 0xf1, 0x79, 0x09, 0x69, 0xf2, 0xfb } }
 
 class DataTransfer final : public nsIDOMDataTransfer,
-                               public nsWrapperCache
+                           public nsWrapperCache
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_DATATRANSFER_IID)
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_NSIDOMDATATRANSFER
 
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DataTransfer)
--- a/dom/events/IMEContentObserver.h
+++ b/dom/events/IMEContentObserver.h
@@ -27,21 +27,21 @@ class nsPresContext;
 
 namespace mozilla {
 
 class EventStateManager;
 
 // IMEContentObserver notifies widget of any text and selection changes
 // in the currently focused editor
 class IMEContentObserver final : public nsISelectionListener
-                                   , public nsStubMutationObserver
-                                   , public nsIReflowObserver
-                                   , public nsIScrollObserver
-                                   , public nsSupportsWeakReference
-                                   , public nsIEditorObserver
+                               , public nsStubMutationObserver
+                               , public nsIReflowObserver
+                               , public nsIScrollObserver
+                               , public nsSupportsWeakReference
+                               , public nsIEditorObserver
 {
   friend class AsyncMergeableNotificationsFlusher;
 
 public:
   IMEContentObserver();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(IMEContentObserver,
--- a/dom/events/ImageCaptureError.h
+++ b/dom/events/ImageCaptureError.h
@@ -16,17 +16,17 @@ namespace mozilla {
 namespace dom {
 
 /**
  * This is the implementation of ImageCaptureError on W3C specification
  * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/ImageCapture.html#idl-def-ImageCaptureError.
  * This object should be generated by ImageCapture object only.
  */
 class ImageCaptureError final : public nsISupports,
-                                    public nsWrapperCache
+                                public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ImageCaptureError)
 
   ImageCaptureError(nsISupports* aParent, uint16_t aCode, const nsAString& aMessage);
 
   nsISupports* GetParentObject() const;
--- a/dom/events/MessageEvent.h
+++ b/dom/events/MessageEvent.h
@@ -29,17 +29,17 @@ class ServiceWorkerClient;
 /**
  * Implements the MessageEvent event, used for cross-document messaging and
  * server-sent events.
  *
  * See http://www.whatwg.org/specs/web-apps/current-work/#messageevent for
  * further details.
  */
 class MessageEvent final : public Event,
-                               public nsIDOMMessageEvent
+                           public nsIDOMMessageEvent
 {
 public:
   MessageEvent(EventTarget* aOwner,
                nsPresContext* aPresContext,
                WidgetEvent* aEvent);
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MessageEvent, Event)
--- a/dom/events/PaintRequest.h
+++ b/dom/events/PaintRequest.h
@@ -13,17 +13,17 @@
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
 class DOMRect;
 
 class PaintRequest final : public nsIDOMPaintRequest
-                             , public nsWrapperCache
+                         , public nsWrapperCache
 {
 public:
   explicit PaintRequest(nsIDOMEvent* aParent)
     : mParent(aParent)
   {
     mRequest.mFlags = 0;
   }
 
@@ -50,17 +50,17 @@ public:
 private:
   ~PaintRequest() {}
 
   nsCOMPtr<nsIDOMEvent> mParent;
   nsInvalidateRequestList::Request mRequest;
 };
 
 class PaintRequestList final : public nsISupports,
-                                   public nsWrapperCache
+                               public nsWrapperCache
 {
 public:
   explicit PaintRequestList(nsIDOMEvent *aParent) : mParent(aParent)
   {
   }
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PaintRequestList)
--- a/dom/events/Touch.h
+++ b/dom/events/Touch.h
@@ -16,18 +16,18 @@
 class nsPresContext;
 
 namespace mozilla {
 namespace dom {
 
 class EventTarget;
 
 class Touch final : public nsISupports
-                      , public nsWrapperCache
-                      , public WidgetPointerHelper
+                  , public nsWrapperCache
+                  , public WidgetPointerHelper
 {
 public:
   static bool PrefEnabled(JSContext* aCx, JSObject* aGlobal);
 
   Touch(EventTarget* aTarget,
         int32_t aIdentifier,
         int32_t aPageX,
         int32_t aPageY,
--- a/dom/events/TouchEvent.h
+++ b/dom/events/TouchEvent.h
@@ -15,17 +15,17 @@
 #include "nsWrapperCache.h"
 
 class nsAString;
 
 namespace mozilla {
 namespace dom {
 
 class TouchList final : public nsISupports
-                          , public nsWrapperCache
+                      , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TouchList)
 
   explicit TouchList(nsISupports* aParent)
     : mParent(aParent)
   {
--- a/dom/events/UIEvent.h
+++ b/dom/events/UIEvent.h
@@ -171,25 +171,25 @@ protected:
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #define NS_FORWARD_TO_UIEVENT                               \
   NS_FORWARD_NSIDOMUIEVENT(UIEvent::)                       \
   NS_FORWARD_TO_EVENT_NO_SERIALIZATION_NO_DUPLICATION       \
-  NS_IMETHOD DuplicatePrivateData() override            \
+  NS_IMETHOD DuplicatePrivateData() override                \
   {                                                         \
     return UIEvent::DuplicatePrivateData();                 \
   }                                                         \
   NS_IMETHOD_(void) Serialize(IPC::Message* aMsg,           \
                               bool aSerializeInterfaceType) \
-    override                                            \
+    override                                                \
   {                                                         \
     UIEvent::Serialize(aMsg, aSerializeInterfaceType);      \
   }                                                         \
   NS_IMETHOD_(bool) Deserialize(const IPC::Message* aMsg,   \
-                                void** aIter) override  \
+                                void** aIter) override      \
   {                                                         \
     return UIEvent::Deserialize(aMsg, aIter);               \
   }
 
 #endif // mozilla_dom_UIEvent_h_
--- a/dom/fetch/Fetch.cpp
+++ b/dom/fetch/Fetch.cpp
@@ -40,17 +40,17 @@
 #include "Workers.h"
 
 namespace mozilla {
 namespace dom {
 
 using namespace workers;
 
 class WorkerFetchResolver final : public FetchDriverObserver,
-                                      public WorkerFeature
+                                  public WorkerFeature
 {
   friend class MainThreadFetchRunnable;
   friend class WorkerFetchResponseEndRunnable;
   friend class WorkerFetchResponseRunnable;
 
   workers::WorkerPrivate* mWorkerPrivate;
 
   Mutex mCleanUpLock;
--- a/dom/fetch/FetchDriver.h
+++ b/dom/fetch/FetchDriver.h
@@ -37,19 +37,19 @@ public:
   { };
 
 protected:
   virtual ~FetchDriverObserver()
   { };
 };
 
 class FetchDriver final : public nsIStreamListener,
-                              public nsIChannelEventSink,
-                              public nsIInterfaceRequestor,
-                              public nsIAsyncVerifyRedirectCallback
+                          public nsIChannelEventSink,
+                          public nsIInterfaceRequestor,
+                          public nsIAsyncVerifyRedirectCallback
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSIASYNCVERIFYREDIRECTCALLBACK
--- a/dom/fetch/Headers.h
+++ b/dom/fetch/Headers.h
@@ -29,17 +29,17 @@ class OwningHeadersOrByteStringSequenceS
 /**
  * This Headers class is only used to represent the content facing Headers
  * object. It is actually backed by an InternalHeaders implementation. Gecko
  * code should NEVER use this, except in the Request and Response
  * implementations, where they must always be created from the backing
  * InternalHeaders object.
  */
 class Headers final : public nsISupports
-                        , public nsWrapperCache
+                    , public nsWrapperCache
 {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Headers)
 
   friend class Request;
   friend class Response;
 
 private:
--- a/dom/fetch/Request.h
+++ b/dom/fetch/Request.h
@@ -22,18 +22,18 @@ namespace mozilla {
 namespace dom {
 
 class Headers;
 class InternalHeaders;
 class Promise;
 class RequestOrUSVString;
 
 class Request final : public nsISupports
-                        , public FetchBody<Request>
-                        , public nsWrapperCache
+                    , public FetchBody<Request>
+                    , public nsWrapperCache
 {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Request)
 
 public:
   Request(nsIGlobalObject* aOwner, InternalRequest* aRequest);
 
   JSObject*
--- a/dom/fetch/Response.h
+++ b/dom/fetch/Response.h
@@ -20,18 +20,18 @@ namespace mozilla {
 namespace dom {
 
 class ArrayBufferOrArrayBufferViewOrUSVStringOrURLSearchParams;
 class Headers;
 class InternalHeaders;
 class Promise;
 
 class Response final : public nsISupports
-                         , public FetchBody<Response>
-                         , public nsWrapperCache
+                     , public FetchBody<Response>
+                     , public nsWrapperCache
 {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Response)
 
 public:
   Response(nsIGlobalObject* aGlobal, InternalResponse* aInternalResponse);
 
   Response(const Response& aOther) = delete;
--- a/dom/fmradio/FMRadio.cpp
+++ b/dom/fmradio/FMRadio.cpp
@@ -28,17 +28,17 @@
 #define DOM_FM_ANTENNA_INTERNAL_PREF "dom.fmradio.antenna.internal"
 
 using namespace mozilla::hal;
 using mozilla::Preferences;
 
 BEGIN_FMRADIO_NAMESPACE
 
 class FMRadioRequest final : public FMRadioReplyRunnable
-                               , public DOMRequest
+                           , public DOMRequest
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   FMRadioRequest(nsPIDOMWindow* aWindow, FMRadio* aFMRadio)
     : DOMRequest(aWindow)
     , mType(FMRadioRequestArgs::T__None)
   {
--- a/dom/fmradio/FMRadio.h
+++ b/dom/fmradio/FMRadio.h
@@ -16,21 +16,21 @@
 class nsPIDOMWindow;
 class nsIScriptContext;
 
 BEGIN_FMRADIO_NAMESPACE
 
 class DOMRequest;
 
 class FMRadio final : public DOMEventTargetHelper
-                        , public hal::SwitchObserver
-                        , public FMRadioEventObserver
-                        , public nsSupportsWeakReference
-                        , public nsIAudioChannelAgentCallback
-                        , public nsIDOMEventListener
+                    , public hal::SwitchObserver
+                    , public FMRadioEventObserver
+                    , public nsSupportsWeakReference
+                    , public nsIAudioChannelAgentCallback
+                    , public nsIDOMEventListener
 
 {
   friend class FMRadioRequest;
 
 public:
   FMRadio();
 
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/fmradio/FMRadioService.h
+++ b/dom/fmradio/FMRadioService.h
@@ -143,19 +143,19 @@ enum FMRadioState
   Disabled,
   Disabling,
   Enabling,
   Enabled,
   Seeking
 };
 
 class FMRadioService final : public IFMRadioService
-                               , public hal::FMRadioObserver
-                               , public hal::FMRadioRDSObserver
-                               , public nsIObserver
+                           , public hal::FMRadioObserver
+                           , public hal::FMRadioRDSObserver
+                           , public nsIObserver
 {
   friend class ReadAirplaneModeSettingTask;
   friend class EnableRunnable;
   friend class DisableRunnable;
   friend class NotifyRunnable;
 
 public:
   static FMRadioService* Singleton();
--- a/dom/fmradio/ipc/FMRadioChild.h
+++ b/dom/fmradio/ipc/FMRadioChild.h
@@ -18,17 +18,17 @@ BEGIN_FMRADIO_NAMESPACE
  * FMRadioChild plays two roles:
  *   - Kind of proxy of FMRadioService
  *     Redirect all the requests  coming from web content to FMRadioService
  *     in parent through IPC channel.
  *   - Child Actor of PFMRadio
  *     IPC channel to transfer the requests.
  */
 class FMRadioChild final : public IFMRadioService
-                             , public PFMRadioChild
+                         , public PFMRadioChild
 {
 public:
   static FMRadioChild* Singleton();
   ~FMRadioChild();
 
   void SendRequest(FMRadioReplyRunnable* aReplyRunnable,
                    FMRadioRequestArgs aArgs);
 
--- a/dom/fmradio/ipc/FMRadioParent.h
+++ b/dom/fmradio/ipc/FMRadioParent.h
@@ -11,17 +11,17 @@
 #include "mozilla/dom/PFMRadioParent.h"
 #include "mozilla/HalTypes.h"
 
 BEGIN_FMRADIO_NAMESPACE
 
 class PFMRadioRequestParent;
 
 class FMRadioParent final : public PFMRadioParent
-                              , public FMRadioEventObserver
+                          , public FMRadioEventObserver
 {
 public:
   FMRadioParent();
   ~FMRadioParent();
 
   virtual void
   ActorDestroy(ActorDestroyReason aWhy) override;
 
--- a/dom/fmradio/ipc/FMRadioRequestParent.h
+++ b/dom/fmradio/ipc/FMRadioRequestParent.h
@@ -9,17 +9,17 @@
 
 #include "FMRadioCommon.h"
 #include "mozilla/dom/PFMRadioRequestParent.h"
 #include "FMRadioService.h"
 
 BEGIN_FMRADIO_NAMESPACE
 
 class FMRadioRequestParent final : public PFMRadioRequestParent
-                                     , public FMRadioReplyRunnable
+                                 , public FMRadioReplyRunnable
 {
 public:
   FMRadioRequestParent();
   ~FMRadioRequestParent();
 
   virtual void ActorDestroy(ActorDestroyReason aWhy) override;
 
   NS_IMETHOD Run();
--- a/dom/gamepad/Gamepad.h
+++ b/dom/gamepad/Gamepad.h
@@ -27,17 +27,17 @@ const int kButtonLeftTrigger = 6;
 const int kButtonRightTrigger = 7;
 
 const int kLeftStickXAxis = 0;
 const int kLeftStickYAxis = 1;
 const int kRightStickXAxis = 2;
 const int kRightStickYAxis = 3;
 
 class Gamepad final : public nsISupports,
-                          public nsWrapperCache
+                      public nsWrapperCache
 {
 public:
   Gamepad(nsISupports* aParent,
           const nsAString& aID, uint32_t aIndex,
           GamepadMappingType aMapping,
           uint32_t aNumButtons, uint32_t aNumAxes);
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Gamepad)
--- a/dom/geolocation/nsGeoPosition.h
+++ b/dom/geolocation/nsGeoPosition.h
@@ -72,17 +72,17 @@ private:
 ////////////////////////////////////////////////////
 
 namespace mozilla {
 namespace dom {
 
 class Coordinates;
 
 class Position final : public nsISupports,
-                           public nsWrapperCache
+                       public nsWrapperCache
 {
   ~Position();
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Position)
 
 public:
@@ -100,17 +100,17 @@ public:
 
 private:
   nsRefPtr<Coordinates> mCoordinates;
   nsCOMPtr<nsISupports> mParent;
   nsCOMPtr<nsIDOMGeoPosition> mGeoPosition;
 };
 
 class Coordinates final : public nsISupports,
-                              public nsWrapperCache
+                          public nsWrapperCache
 {
   ~Coordinates();
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Coordinates)
 
 public:
--- a/dom/geolocation/nsGeolocation.h
+++ b/dom/geolocation/nsGeolocation.h
@@ -48,17 +48,18 @@ typedef CallbackObjectHolder<PositionErr
 struct CachedPositionAndAccuracy {
   nsCOMPtr<nsIDOMGeoPosition> position;
   bool isHighAccuracy;
 };
 
 /**
  * Singleton that manages the geolocation provider
  */
-class nsGeolocationService final : public nsIGeolocationUpdate, public nsIObserver
+class nsGeolocationService final : public nsIGeolocationUpdate,
+                                   public nsIObserver
 {
 public:
 
   static already_AddRefed<nsGeolocationService> GetGeolocationService();
   static mozilla::StaticRefPtr<nsGeolocationService> sService;
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIGEOLOCATIONUPDATE
@@ -119,18 +120,18 @@ private:
 
 namespace mozilla {
 namespace dom {
 
 /**
  * Can return a geolocation info
  */
 class Geolocation final : public nsIDOMGeoGeolocation,
-                              public nsIGeolocationUpdate,
-                              public nsWrapperCache
+                          public nsIGeolocationUpdate,
+                          public nsWrapperCache
 {
 public:
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(Geolocation, nsIDOMGeoGeolocation)
 
   NS_DECL_NSIGEOLOCATIONUPDATE
   NS_DECL_NSIDOMGEOGEOLOCATION
@@ -216,17 +217,17 @@ private:
   // Pending requests are used when the service is not ready
   nsTArray<nsRefPtr<nsGeolocationRequest> > mPendingRequests;
 
   // Array containing already cleared watch IDs
   nsTArray<int32_t> mClearedWatchIDs;
 };
 
 class PositionError final : public nsIDOMGeoPositionError,
-                                public nsWrapperCache
+                            public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PositionError)
 
   NS_DECL_NSIDOMGEOPOSITIONERROR
 
   PositionError(Geolocation* aParent, int16_t aCode);
--- a/dom/html/HTMLAllCollection.h
+++ b/dom/html/HTMLAllCollection.h
@@ -25,17 +25,17 @@ namespace mozilla {
 class ErrorResult;
 
 namespace dom {
 
 class OwningNodeOrHTMLCollection;
 template<typename> struct Nullable;
 
 class HTMLAllCollection final : public nsISupports
-                                  , public nsWrapperCache
+                              , public nsWrapperCache
 {
   ~HTMLAllCollection();
 
 public:
   explicit HTMLAllCollection(nsHTMLDocument* aDocument);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(HTMLAllCollection)
--- a/dom/html/HTMLAnchorElement.h
+++ b/dom/html/HTMLAnchorElement.h
@@ -14,18 +14,18 @@
 #include "nsDOMTokenList.h"
 
 namespace mozilla {
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 namespace dom {
 
 class HTMLAnchorElement final : public nsGenericHTMLElement,
-                                    public nsIDOMHTMLAnchorElement,
-                                    public Link
+                                public nsIDOMHTMLAnchorElement,
+                                public Link
 {
 public:
   using Element::GetText;
   using Element::SetText;
 
   explicit HTMLAnchorElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
     , Link(this)
--- a/dom/html/HTMLAreaElement.h
+++ b/dom/html/HTMLAreaElement.h
@@ -18,18 +18,18 @@
 class nsIDocument;
 
 namespace mozilla {
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 namespace dom {
 
 class HTMLAreaElement final : public nsGenericHTMLElement,
-                                  public nsIDOMHTMLAreaElement,
-                                  public Link
+                              public nsIDOMHTMLAreaElement,
+                              public Link
 {
 public:
   explicit HTMLAreaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // CC
--- a/dom/html/HTMLBRElement.h
+++ b/dom/html/HTMLBRElement.h
@@ -10,17 +10,17 @@
 #include "nsIDOMHTMLBRElement.h"
 #include "nsGenericHTMLElement.h"
 #include "nsGkAtoms.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLBRElement final : public nsGenericHTMLElement,
-                                public nsIDOMHTMLBRElement
+                            public nsIDOMHTMLBRElement
 {
 public:
   explicit HTMLBRElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLBRElement
--- a/dom/html/HTMLBodyElement.h
+++ b/dom/html/HTMLBodyElement.h
@@ -30,17 +30,17 @@ public:
 #ifdef DEBUG
   virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
 #endif
 
   HTMLBodyElement*  mPart;  // not ref-counted, cleared by content 
 };
 
 class HTMLBodyElement final : public nsGenericHTMLElement,
-                                  public nsIDOMHTMLBodyElement
+                              public nsIDOMHTMLBodyElement
 {
 public:
   using Element::GetText;
   using Element::SetText;
 
   explicit HTMLBodyElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
--- a/dom/html/HTMLButtonElement.h
+++ b/dom/html/HTMLButtonElement.h
@@ -12,18 +12,18 @@
 #include "nsIConstraintValidation.h"
 
 namespace mozilla {
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 namespace dom {
 
 class HTMLButtonElement final : public nsGenericHTMLFormElementWithState,
-                                    public nsIDOMHTMLButtonElement,
-                                    public nsIConstraintValidation
+                                public nsIDOMHTMLButtonElement,
+                                public nsIConstraintValidation
 {
 public:
   using nsIConstraintValidation::GetValidationMessage;
 
   explicit HTMLButtonElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                              FromParser aFromParser = NOT_FROM_PARSER);
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(HTMLButtonElement,
--- a/dom/html/HTMLCanvasElement.h
+++ b/dom/html/HTMLCanvasElement.h
@@ -37,17 +37,17 @@ class PrintCallback;
 
 enum class CanvasContextType : uint8_t {
   Canvas2D,
   WebGL1,
   WebGL2
 };
 
 class HTMLCanvasElement final : public nsGenericHTMLElement,
-                                    public nsIDOMHTMLCanvasElement
+                                public nsIDOMHTMLCanvasElement
 {
   enum {
     DEFAULT_CANVAS_WIDTH = 300,
     DEFAULT_CANVAS_HEIGHT = 150
   };
 
   typedef layers::CanvasLayer CanvasLayer;
   typedef layers::LayerManager LayerManager;
--- a/dom/html/HTMLDivElement.h
+++ b/dom/html/HTMLDivElement.h
@@ -8,17 +8,17 @@
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIDOMHTMLDivElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLDivElement final : public nsGenericHTMLElement,
-                                 public nsIDOMHTMLDivElement
+                             public nsIDOMHTMLDivElement
 {
 public:
   explicit HTMLDivElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
   }
 
   // nsISupports
--- a/dom/html/HTMLFieldSetElement.h
+++ b/dom/html/HTMLFieldSetElement.h
@@ -13,18 +13,18 @@
 #include "mozilla/dom/HTMLFormElement.h"
 #include "mozilla/dom/ValidityState.h"
 
 namespace mozilla {
 class EventChainPreVisitor;
 namespace dom {
 
 class HTMLFieldSetElement final : public nsGenericHTMLFormElement,
-                                      public nsIDOMHTMLFieldSetElement,
-                                      public nsIConstraintValidation
+                                  public nsIDOMHTMLFieldSetElement,
+                                  public nsIConstraintValidation
 {
 public:
   using nsGenericHTMLFormElement::GetForm;
   using nsIConstraintValidation::Validity;
   using nsIConstraintValidation::CheckValidity;
   using nsIConstraintValidation::GetValidationMessage;
 
   explicit HTMLFieldSetElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
--- a/dom/html/HTMLFormControlsCollection.h
+++ b/dom/html/HTMLFormControlsCollection.h
@@ -19,17 +19,17 @@ class nsIFormControl;
 namespace mozilla {
 namespace dom {
 class HTMLFormElement;
 class HTMLImageElement;
 class OwningRadioNodeListOrElement;
 template<typename> struct Nullable;
 
 class HTMLFormControlsCollection final : public nsIHTMLCollection
-                                           , public nsWrapperCache
+                                       , public nsWrapperCache
 {
 public:
   explicit HTMLFormControlsCollection(HTMLFormElement* aForm);
 
   void DropFormReference();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
--- a/dom/html/HTMLFormElement.h
+++ b/dom/html/HTMLFormElement.h
@@ -29,20 +29,20 @@ class nsIURI;
 namespace mozilla {
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 namespace dom {
 class HTMLFormControlsCollection;
 class HTMLImageElement;
 
 class HTMLFormElement final : public nsGenericHTMLElement,
-                                  public nsIDOMHTMLFormElement,
-                                  public nsIWebProgressListener,
-                                  public nsIForm,
-                                  public nsIRadioGroupContainer
+                              public nsIDOMHTMLFormElement,
+                              public nsIWebProgressListener,
+                              public nsIForm,
+                              public nsIRadioGroupContainer
 {
   friend class HTMLFormControlsCollection;
 
 public:
   explicit HTMLFormElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   enum {
     FORM_CONTROL_LIST_HASHTABLE_LENGTH = 8
--- a/dom/html/HTMLFrameElement.h
+++ b/dom/html/HTMLFrameElement.h
@@ -12,17 +12,17 @@
 #include "nsGkAtoms.h"
 
 class nsIDOMDocument;
 
 namespace mozilla {
 namespace dom {
 
 class HTMLFrameElement final : public nsGenericHTMLFrameElement,
-                                   public nsIDOMHTMLFrameElement
+                               public nsIDOMHTMLFrameElement
 {
 public:
   using nsGenericHTMLFrameElement::SwapFrameLoaders;
 
   explicit HTMLFrameElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                             FromParser aFromParser = NOT_FROM_PARSER);
 
   // nsISupports
--- a/dom/html/HTMLFrameSetElement.h
+++ b/dom/html/HTMLFrameSetElement.h
@@ -38,17 +38,17 @@ struct nsFramesetSpec {
 //----------------------------------------------------------------------
 
 namespace mozilla {
 namespace dom {
 
 class OnBeforeUnloadEventHandlerNonNull;
 
 class HTMLFrameSetElement final : public nsGenericHTMLElement,
-                                      public nsIDOMHTMLFrameSetElement
+                                  public nsIDOMHTMLFrameSetElement
 {
 public:
   explicit HTMLFrameSetElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo),
       mNumRows(0),
       mNumCols(0),
       mCurrentRowColHint(NS_STYLE_HINT_REFLOW)
   {
--- a/dom/html/HTMLHRElement.h
+++ b/dom/html/HTMLHRElement.h
@@ -12,17 +12,17 @@
 #include "nsMappedAttributes.h"
 #include "nsAttrValueInlines.h"
 #include "nsRuleData.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLHRElement final : public nsGenericHTMLElement,
-                                public nsIDOMHTMLHRElement
+                            public nsIDOMHTMLHRElement
 {
 public:
   explicit HTMLHRElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLHRElement
--- a/dom/html/HTMLHeadingElement.h
+++ b/dom/html/HTMLHeadingElement.h
@@ -9,17 +9,17 @@
 #include "mozilla/Attributes.h"
 #include "nsIDOMHTMLHeadingElement.h"
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLHeadingElement final : public nsGenericHTMLElement,
-				     public nsIDOMHTMLHeadingElement
+			         public nsIDOMHTMLHeadingElement
 {
 public:
   explicit HTMLHeadingElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
   }
 
   // nsISupports
--- a/dom/html/HTMLIFrameElement.h
+++ b/dom/html/HTMLIFrameElement.h
@@ -10,17 +10,17 @@
 #include "nsGenericHTMLFrameElement.h"
 #include "nsIDOMHTMLIFrameElement.h"
 #include "nsDOMSettableTokenList.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLIFrameElement final : public nsGenericHTMLFrameElement
-                                  , public nsIDOMHTMLIFrameElement
+                              , public nsIDOMHTMLIFrameElement
 {
 public:
   explicit HTMLIFrameElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                              FromParser aFromParser = NOT_FROM_PARSER);
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLIFrameElement, iframe)
 
   // nsISupports
--- a/dom/html/HTMLImageElement.h
+++ b/dom/html/HTMLImageElement.h
@@ -18,18 +18,18 @@
 #include "mozilla/dom/HTMLPictureElement.h"
 
 namespace mozilla {
 class EventChainPreVisitor;
 namespace dom {
 
 class ResponsiveImageSelector;
 class HTMLImageElement final : public nsGenericHTMLElement,
-                                   public nsImageLoadingContent,
-                                   public nsIDOMHTMLImageElement
+                               public nsImageLoadingContent,
+                               public nsIDOMHTMLImageElement
 {
   friend class HTMLSourceElement;
   friend class HTMLPictureElement;
   friend class ImageLoadTask;
 public:
   explicit HTMLImageElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   static already_AddRefed<HTMLImageElement>
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -1,9 +1,10 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=2 sw=2 sts=2 et tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/HTMLInputElement.h"
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/AsyncEventDispatcher.h"
@@ -1687,22 +1688,28 @@ HTMLInputElement::GetValueInternal(nsASt
         mInputData.mState->GetValue(aValue, true);
       } else {
         aValue.Assign(mInputData.mValue);
       }
       return NS_OK;
 
     case VALUE_MODE_FILENAME:
       if (nsContentUtils::IsCallerChrome()) {
+#ifndef MOZ_CHILD_PERMISSIONS
+        aValue.Assign(mFirstFilePath);
+#else
+        // XXX We'd love to assert that this can't happen, but some mochitests
+        // use SpecialPowers to circumvent our more sane security model.
         if (!mFiles.IsEmpty()) {
           return mFiles[0]->GetMozFullPath(aValue);
         }
         else {
           aValue.Truncate();
         }
+#endif
       } else {
         // Just return the leaf name
         if (mFiles.IsEmpty() || NS_FAILED(mFiles[0]->GetName(aValue))) {
           aValue.Truncate();
         }
       }
 
       return NS_OK;
@@ -2642,16 +2649,29 @@ HTMLInputElement::AfterSetFiles(bool aSe
   // new value.  We just want the display to update as needed.
   nsIFormControlFrame* formControlFrame = GetFormControlFrame(false);
   if (formControlFrame) {
     nsAutoString readableValue;
     GetDisplayFileName(readableValue);
     formControlFrame->SetFormProperty(nsGkAtoms::value, readableValue);
   }
 
+#ifndef MOZ_CHILD_PERMISSIONS
+  // Grab the full path here for any chrome callers who access our .value via a
+  // CPOW. This path won't be called from a CPOW meaning the potential sync IPC
+  // call under GetMozFullPath won't be rejected for not being urgent.
+  // XXX Protected by the ifndef because the blob code doesn't allow us to send
+  // this message in b2g.
+  if (mFiles.IsEmpty()) {
+    mFirstFilePath.Truncate();
+  } else {
+    mFiles[0]->GetMozFullPath(mFirstFilePath);
+  }
+#endif
+
   UpdateFileList();
 
   if (aSetValueChanged) {
     SetValueChanged(true);
   }
 
   UpdateAllValidityStates(true);
 }
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -84,23 +84,23 @@ public:
 
     nsCOMPtr<nsIFilePicker> mFilePicker;
     nsCOMPtr<nsIFilePickerShownCallback> mFpCallback;
     nsCOMPtr<nsIContentPref> mResult;
   };
 };
 
 class HTMLInputElement final : public nsGenericHTMLFormElementWithState,
-                                   public nsImageLoadingContent,
-                                   public nsIDOMHTMLInputElement,
-                                   public nsITextControlElement,
-                                   public nsIPhonetic,
-                                   public nsIDOMNSEditableElement,
-                                   public nsITimerCallback,
-                                   public nsIConstraintValidation
+                               public nsImageLoadingContent,
+                               public nsIDOMHTMLInputElement,
+                               public nsITextControlElement,
+                               public nsIPhonetic,
+                               public nsIDOMNSEditableElement,
+                               public nsITimerCallback,
+                               public nsIConstraintValidation
 {
   friend class DirPickerFileListBuilderTask;
 
 public:
   using nsIConstraintValidation::GetValidationMessage;
   using nsIConstraintValidation::CheckValidity;
   using nsIConstraintValidation::WillValidate;
   using nsIConstraintValidation::Validity;
@@ -1249,28 +1249,36 @@ protected:
      * The current value of the input if it has been changed from the default
      */
     char16_t*               mValue;
     /**
      * The state of the text editor associated with the text/password input
      */
     nsTextEditorState*       mState;
   } mInputData;
+
   /**
    * The value of the input if it is a file input. This is the list of filenames
    * used when uploading a file. It is vital that this is kept separate from
    * mValue so that it won't be possible to 'leak' the value from a text-input
    * to a file-input. Additionally, the logic for this value is kept as simple
    * as possible to avoid accidental errors where the wrong filename is used.
    * Therefor the list of filenames is always owned by this member, never by
    * the frame. Whenever the frame wants to change the filename it has to call
    * SetFileNames to update this member.
    */
   nsTArray<nsRefPtr<File>> mFiles;
 
+#ifndef MOZ_CHILD_PERMISSIONS
+  /**
+   * Hack for bug 1086684: Stash the .value when we're a file picker.
+   */
+  nsString mFirstFilePath;
+#endif
+
   nsRefPtr<FileList>  mFileList;
 
   nsRefPtr<DirPickerFileListBuilderTask> mDirPickerFileListBuilderTask;
 
   nsString mStaticDocFileList;
   
   /** 
    * The value of the input element when first initialized and it is updated
--- a/dom/html/HTMLLIElement.h
+++ b/dom/html/HTMLLIElement.h
@@ -10,17 +10,17 @@
 
 #include "nsIDOMHTMLLIElement.h"
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLLIElement final : public nsGenericHTMLElement,
-                                public nsIDOMHTMLLIElement
+                            public nsIDOMHTMLLIElement
 {
 public:
   explicit HTMLLIElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
   }
 
   // nsISupports
--- a/dom/html/HTMLLabelElement.h
+++ b/dom/html/HTMLLabelElement.h
@@ -13,17 +13,17 @@
 #include "nsGenericHTMLElement.h"
 #include "nsIDOMHTMLLabelElement.h"
 
 namespace mozilla {
 class EventChainPostVisitor;
 namespace dom {
 
 class HTMLLabelElement final : public nsGenericHTMLFormElement,
-                                   public nsIDOMHTMLLabelElement
+                               public nsIDOMHTMLLabelElement
 {
 public:
   explicit HTMLLabelElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLFormElement(aNodeInfo),
       mHandlingEvent(false)
   {
   }
 
--- a/dom/html/HTMLLinkElement.h
+++ b/dom/html/HTMLLinkElement.h
@@ -14,19 +14,19 @@
 #include "nsStyleLinkElement.h"
 
 namespace mozilla {
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 namespace dom {
 
 class HTMLLinkElement final : public nsGenericHTMLElement,
-                                  public nsIDOMHTMLLinkElement,
-                                  public nsStyleLinkElement,
-                                  public Link
+                              public nsIDOMHTMLLinkElement,
+                              public nsStyleLinkElement,
+                              public Link
 {
 public:
   explicit HTMLLinkElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // CC
--- a/dom/html/HTMLMapElement.h
+++ b/dom/html/HTMLMapElement.h
@@ -13,17 +13,17 @@
 #include "nsGkAtoms.h"
 
 class nsContentList;
 
 namespace mozilla {
 namespace dom {
 
 class HTMLMapElement final : public nsGenericHTMLElement,
-                                 public nsIDOMHTMLMapElement
+                             public nsIDOMHTMLMapElement
 {
 public:
   explicit HTMLMapElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLMapElement
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -253,19 +253,19 @@ public:
 
 /**
  * There is a reference cycle involving this class: MediaLoadListener
  * holds a reference to the HTMLMediaElement, which holds a reference
  * to an nsIChannel, which holds a reference to this listener.
  * We break the reference cycle in OnStartRequest by clearing mElement.
  */
 class HTMLMediaElement::MediaLoadListener final : public nsIStreamListener,
-                                                      public nsIChannelEventSink,
-                                                      public nsIInterfaceRequestor,
-                                                      public nsIObserver
+                                                  public nsIChannelEventSink,
+                                                  public nsIInterfaceRequestor,
+                                                  public nsIObserver
 {
   ~MediaLoadListener() {}
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIOBSERVER
--- a/dom/html/HTMLMenuElement.h
+++ b/dom/html/HTMLMenuElement.h
@@ -10,18 +10,18 @@
 #include "nsIDOMHTMLMenuElement.h"
 #include "nsIHTMLMenu.h"
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLMenuElement final : public nsGenericHTMLElement,
-                                  public nsIDOMHTMLMenuElement,
-                                  public nsIHTMLMenu
+                              public nsIDOMHTMLMenuElement,
+                              public nsIHTMLMenu
 {
 public:
   explicit HTMLMenuElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLMenuElement, menu)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/html/HTMLMenuItemElement.h
+++ b/dom/html/HTMLMenuItemElement.h
@@ -14,17 +14,17 @@ namespace mozilla {
 
 class EventChainPreVisitor;
 
 namespace dom {
 
 class Visitor;
 
 class HTMLMenuItemElement final : public nsGenericHTMLElement,
-                                      public nsIDOMHTMLMenuItemElement
+                                  public nsIDOMHTMLMenuItemElement
 {
 public:
   using mozilla::dom::Element::GetText;
 
   HTMLMenuItemElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                       mozilla::dom::FromParser aFromParser);
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLMenuItemElement, menuitem)
--- a/dom/html/HTMLMetaElement.h
+++ b/dom/html/HTMLMetaElement.h
@@ -9,17 +9,17 @@
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIDOMHTMLMetaElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLMetaElement final : public nsGenericHTMLElement,
-                                  public nsIDOMHTMLMetaElement
+                              public nsIDOMHTMLMetaElement
 {
 public:
   explicit HTMLMetaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLMetaElement
--- a/dom/html/HTMLObjectElement.h
+++ b/dom/html/HTMLObjectElement.h
@@ -12,19 +12,19 @@
 #include "nsObjectLoadingContent.h"
 #include "nsIDOMHTMLObjectElement.h"
 #include "nsIConstraintValidation.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLObjectElement final : public nsGenericHTMLFormElement
-                                  , public nsObjectLoadingContent
-                                  , public nsIDOMHTMLObjectElement
-                                  , public nsIConstraintValidation
+                              , public nsObjectLoadingContent
+                              , public nsIDOMHTMLObjectElement
+                              , public nsIConstraintValidation
 {
 public:
   explicit HTMLObjectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                              FromParser aFromParser = NOT_FROM_PARSER);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/dom/html/HTMLOptGroupElement.h
+++ b/dom/html/HTMLOptGroupElement.h
@@ -10,17 +10,17 @@
 #include "nsIDOMHTMLOptGroupElement.h"
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 class EventChainPreVisitor;
 namespace dom {
 
 class HTMLOptGroupElement final : public nsGenericHTMLElement,
-                                      public nsIDOMHTMLOptGroupElement
+                                  public nsIDOMHTMLOptGroupElement
 {
 public:
   explicit HTMLOptGroupElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLOptGroupElement, optgroup)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/html/HTMLOptionElement.h
+++ b/dom/html/HTMLOptionElement.h
@@ -13,17 +13,17 @@
 #include "mozilla/dom/HTMLFormElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLSelectElement;
 
 class HTMLOptionElement final : public nsGenericHTMLElement,
-                                    public nsIDOMHTMLOptionElement
+                                public nsIDOMHTMLOptionElement
 {
 public:
   explicit HTMLOptionElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   static already_AddRefed<HTMLOptionElement>
     Option(const GlobalObject& aGlobal,
            const Optional<nsAString>& aText,
            const Optional<nsAString>& aValue,
--- a/dom/html/HTMLOptionsCollection.h
+++ b/dom/html/HTMLOptionsCollection.h
@@ -26,18 +26,18 @@ class HTMLElementOrLong;
 class HTMLOptionElementOrHTMLOptGroupElement;
 class HTMLSelectElement;
 
 /**
  * The collection of options in the select (what you get back when you do
  * select.options in DOM)
  */
 class HTMLOptionsCollection final : public nsIHTMLCollection
-                                      , public nsIDOMHTMLOptionsCollection
-                                      , public nsWrapperCache
+                                  , public nsIDOMHTMLOptionsCollection
+                                  , public nsWrapperCache
 {
   typedef HTMLOptionElementOrHTMLOptGroupElement HTMLOptionOrOptGroupElement;
 public:
   explicit HTMLOptionsCollection(HTMLSelectElement* aSelect);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
 
   // nsWrapperCache
--- a/dom/html/HTMLOutputElement.h
+++ b/dom/html/HTMLOutputElement.h
@@ -10,18 +10,18 @@
 #include "nsGenericHTMLElement.h"
 #include "nsStubMutationObserver.h"
 #include "nsIConstraintValidation.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLOutputElement final : public nsGenericHTMLFormElement,
-                                    public nsStubMutationObserver,
-                                    public nsIConstraintValidation
+                                public nsStubMutationObserver,
+                                public nsIConstraintValidation
 {
 public:
   using nsIConstraintValidation::GetValidationMessage;
 
   explicit HTMLOutputElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                              FromParser aFromParser = NOT_FROM_PARSER);
 
   // nsISupports
--- a/dom/html/HTMLParagraphElement.h
+++ b/dom/html/HTMLParagraphElement.h
@@ -10,17 +10,17 @@
 
 #include "nsIDOMHTMLParagraphElement.h"
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLParagraphElement final : public nsGenericHTMLElement,
-                                       public nsIDOMHTMLParagraphElement
+                                   public nsIDOMHTMLParagraphElement
 {
 public:
   explicit HTMLParagraphElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
   }
 
   // nsISupports
--- a/dom/html/HTMLPictureElement.h
+++ b/dom/html/HTMLPictureElement.h
@@ -12,17 +12,17 @@
 #include "nsGenericHTMLElement.h"
 
 #include "mozilla/dom/HTMLUnknownElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLPictureElement final : public nsGenericHTMLElement,
-                                    public nsIDOMHTMLPictureElement
+                                 public nsIDOMHTMLPictureElement
 {
 public:
   explicit HTMLPictureElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // nsIDOMHTMLPictureElement
--- a/dom/html/HTMLPreElement.h
+++ b/dom/html/HTMLPreElement.h
@@ -10,17 +10,17 @@
 
 #include "nsIDOMHTMLPreElement.h"
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLPreElement final : public nsGenericHTMLElement,
-                                 public nsIDOMHTMLPreElement
+                             public nsIDOMHTMLPreElement
 {
 public:
   explicit HTMLPreElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
   }
 
   // nsISupports
--- a/dom/html/HTMLPropertiesCollection.h
+++ b/dom/html/HTMLPropertiesCollection.h
@@ -44,18 +44,18 @@ protected:
   virtual ~PropertyStringList();
 
   virtual void EnsureFresh() override;
 
   nsRefPtr<HTMLPropertiesCollection> mCollection;
 };
 
 class HTMLPropertiesCollection final : public nsIHTMLCollection,
-                                           public nsStubMutationObserver,
-                                           public nsWrapperCache
+                                       public nsStubMutationObserver,
+                                       public nsWrapperCache
 {
   friend class PropertyNodeList;
   friend class PropertyStringList;
 public:
   explicit HTMLPropertiesCollection(nsGenericHTMLElement* aRoot);
 
   // nsWrapperCache
   using nsWrapperCache::GetWrapperPreserveColor;
@@ -144,17 +144,17 @@ protected:
   // The document mRoot is in, if any
   nsCOMPtr<nsIDocument> mDoc;
 
   // True if there have been DOM modifications since the last EnsureFresh call.
   bool mIsDirty;
 };
 
 class PropertyNodeList final : public nsINodeList,
-                                   public nsStubMutationObserver
+                               public nsStubMutationObserver
 {
 public:
   PropertyNodeList(HTMLPropertiesCollection* aCollection,
                    nsIContent* aRoot, const nsAString& aName);
 
   virtual JSObject* WrapObject(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
 
   void SetDocument(nsIDocument* aDocument);
--- a/dom/html/HTMLScriptElement.h
+++ b/dom/html/HTMLScriptElement.h
@@ -11,18 +11,18 @@
 #include "nsScriptElement.h"
 #include "nsGenericHTMLElement.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLScriptElement final : public nsGenericHTMLElement,
-                                    public nsIDOMHTMLScriptElement,
-                                    public nsScriptElement
+                                public nsIDOMHTMLScriptElement,
+                                public nsScriptElement
 {
 public:
   using Element::GetText;
   using Element::SetText;
 
   HTMLScriptElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                     FromParser aFromParser);
 
--- a/dom/html/HTMLSelectElement.h
+++ b/dom/html/HTMLSelectElement.h
@@ -108,18 +108,18 @@ private:
   nsMutationGuard            mGuard;
 };
 
 
 /**
  * Implementation of &lt;select&gt;
  */
 class HTMLSelectElement final : public nsGenericHTMLFormElementWithState,
-                                    public nsIDOMHTMLSelectElement,
-                                    public nsIConstraintValidation
+                                public nsIDOMHTMLSelectElement,
+                                public nsIConstraintValidation
 {
 public:
   /**
    *  IS_SELECTED   whether to set the option(s) to true or false
    *
    *  CLEAR_ALL     whether to clear all other options (for example, if you
    *                are normal-clicking on the current option)
    *
--- a/dom/html/HTMLShadowElement.h
+++ b/dom/html/HTMLShadowElement.h
@@ -7,17 +7,17 @@
 #define mozilla_dom_HTMLShadowElement_h__
 
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLShadowElement final : public nsGenericHTMLElement,
-                                    public nsStubMutationObserver
+                                public nsStubMutationObserver
 {
 public:
   explicit HTMLShadowElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLShadowElement, shadow)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/html/HTMLSharedElement.h
+++ b/dom/html/HTMLSharedElement.h
@@ -17,21 +17,21 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Assertions.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLSharedElement final : public nsGenericHTMLElement,
-                                    public nsIDOMHTMLBaseElement,
-                                    public nsIDOMHTMLDirectoryElement,
-                                    public nsIDOMHTMLQuoteElement,
-                                    public nsIDOMHTMLHeadElement,
-                                    public nsIDOMHTMLHtmlElement
+                                public nsIDOMHTMLBaseElement,
+                                public nsIDOMHTMLDirectoryElement,
+                                public nsIDOMHTMLQuoteElement,
+                                public nsIDOMHTMLHeadElement,
+                                public nsIDOMHTMLHtmlElement
 {
 public:
   explicit HTMLSharedElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
     if (mNodeInfo->Equals(nsGkAtoms::head) ||
         mNodeInfo->Equals(nsGkAtoms::html)) {
       SetHasWeirdParserInsertionMode();
--- a/dom/html/HTMLSharedListElement.h
+++ b/dom/html/HTMLSharedListElement.h
@@ -11,18 +11,18 @@
 #include "nsIDOMHTMLOListElement.h"
 #include "nsIDOMHTMLUListElement.h"
 #include "nsGenericHTMLElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLSharedListElement final : public nsGenericHTMLElement,
-                                        public nsIDOMHTMLOListElement,
-                                        public nsIDOMHTMLUListElement
+                                    public nsIDOMHTMLOListElement,
+                                    public nsIDOMHTMLUListElement
 {
 public:
   explicit HTMLSharedListElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
   }
 
   // nsISupports
--- a/dom/html/HTMLSharedObjectElement.h
+++ b/dom/html/HTMLSharedObjectElement.h
@@ -14,19 +14,19 @@
 #include "nsError.h"
 #include "nsIDOMHTMLAppletElement.h"
 #include "nsIDOMHTMLEmbedElement.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLSharedObjectElement final : public nsGenericHTMLElement
-                                        , public nsObjectLoadingContent
-                                        , public nsIDOMHTMLAppletElement
-                                        , public nsIDOMHTMLEmbedElement
+                                    , public nsObjectLoadingContent
+                                    , public nsIDOMHTMLAppletElement
+                                    , public nsIDOMHTMLEmbedElement
 {
 public:
   explicit HTMLSharedObjectElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                                    mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/dom/html/HTMLSourceElement.h
+++ b/dom/html/HTMLSourceElement.h
@@ -14,17 +14,17 @@
 
 class nsMediaList;
 
 namespace mozilla {
 namespace dom {
 
 class ResponsiveImageSelector;
 class HTMLSourceElement final : public nsGenericHTMLElement,
-                                    public nsIDOMHTMLSourceElement
+                                public nsIDOMHTMLSourceElement
 {
 public:
   explicit HTMLSourceElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLSourceElement, source)
--- a/dom/html/HTMLStyleElement.h
+++ b/dom/html/HTMLStyleElement.h
@@ -13,19 +13,19 @@
 #include "nsStubMutationObserver.h"
 
 class nsIDocument;
 
 namespace mozilla {
 namespace dom {
 
 class HTMLStyleElement final : public nsGenericHTMLElement,
-                                   public nsIDOMHTMLStyleElement,
-                                   public nsStyleLinkElement,
-                                   public nsStubMutationObserver
+                               public nsIDOMHTMLStyleElement,
+                               public nsStyleLinkElement,
+                               public nsStubMutationObserver
 {
 public:
   explicit HTMLStyleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
 
   // CC
--- a/dom/html/HTMLTableCaptionElement.h
+++ b/dom/html/HTMLTableCaptionElement.h
@@ -8,17 +8,17 @@
 #include "mozilla/Attributes.h"
 #include "nsGenericHTMLElement.h"
 #include "nsIDOMHTMLTableCaptionElem.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLTableCaptionElement final : public nsGenericHTMLElement,
-                                          public nsIDOMHTMLTableCaptionElement
+                                      public nsIDOMHTMLTableCaptionElement
 {
 public:
   explicit HTMLTableCaptionElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
     SetHasWeirdParserInsertionMode();
   }
 
--- a/dom/html/HTMLTableCellElement.h
+++ b/dom/html/HTMLTableCellElement.h
@@ -12,17 +12,17 @@
 class nsIDOMHTMLTableRowElement;
 
 namespace mozilla {
 namespace dom {
 
 class HTMLTableElement;
 
 class HTMLTableCellElement final : public nsGenericHTMLElement,
-                                       public nsIDOMHTMLTableCellElement
+                                   public nsIDOMHTMLTableCellElement
 {
 public:
   explicit HTMLTableCellElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
     : nsGenericHTMLElement(aNodeInfo)
   {
     SetHasWeirdParserInsertionMode();
   }
 
--- a/dom/html/HTMLTableElement.h
+++ b/dom/html/HTMLTableElement.h
@@ -14,17 +14,17 @@
 namespace mozilla {
 namespace dom {
 
 #define TABLE_ATTRS_DIRTY ((nsMappedAttributes*)0x1)
 
 class TableRowsCollection;
 
 class HTMLTableElement final : public nsGenericHTMLElement,
-                                   public nsIDOMHTMLTableElement
+                               public nsIDOMHTMLTableElement
 {
 public:
   explicit HTMLTableElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   NS_IMPL_FROMCONTENT_HTML_WITH_TAG(HTMLTableElement, table)
 
   // nsISupports
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/html/HTMLTextAreaElement.h
+++ b/dom/html/HTMLTextAreaElement.h
@@ -31,21 +31,21 @@ namespace mozilla {
 
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 class EventStates;
 
 namespace dom {
 
 class HTMLTextAreaElement final : public nsGenericHTMLFormElementWithState,
-                                      public nsIDOMHTMLTextAreaElement,
-                                      public nsITextControlElement,
-                                      public nsIDOMNSEditableElement,
-                                      public nsStubMutationObserver,
-                                      public nsIConstraintValidation
+                                  public nsIDOMHTMLTextAreaElement,
+                                  public nsITextControlElement,
+                                  public nsIDOMNSEditableElement,
+                                  public nsStubMutationObserver,
+                                  public nsIConstraintValidation
 {
 public:
   using nsIConstraintValidation::GetValidationMessage;
 
   explicit HTMLTextAreaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                                FromParser aFromParser = NOT_FROM_PARSER);
 
   // nsISupports
--- a/dom/html/HTMLTitleElement.h
+++ b/dom/html/HTMLTitleElement.h
@@ -12,18 +12,18 @@
 #include "nsStubMutationObserver.h"
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
 
 class HTMLTitleElement final : public nsGenericHTMLElement,
-                                   public nsIDOMHTMLTitleElement,
-                                   public nsStubMutationObserver
+                               public nsIDOMHTMLTitleElement,
+                               public nsStubMutationObserver
 {
 public:
   using Element::GetText;
   using Element::SetText;
 
   explicit HTMLTitleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
 
   // nsISupports
--- a/dom/html/ImageDocument.h
+++ b/dom/html/ImageDocument.h
@@ -10,19 +10,19 @@
 #include "MediaDocument.h"
 #include "nsIDOMEventListener.h"
 #include "nsIImageDocument.h"
 
 namespace mozilla {
 namespace dom {
 
 class ImageDocument final : public MediaDocument,
-                                public nsIImageDocument,
-                                public imgINotificationObserver,
-                                public nsIDOMEventListener
+                            public nsIImageDocument,
+                            public imgINotificationObserver,
+                            public nsIDOMEventListener
 {
 public:
   ImageDocument();
 
   NS_DECL_ISUPPORTS_INHERITED
 
   virtual nsresult Init() override;
 
--- a/dom/html/MediaError.h
+++ b/dom/html/MediaError.h
@@ -12,17 +12,17 @@
 #include "nsWrapperCache.h"
 #include "nsISupports.h"
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace dom {
 
 class MediaError final : public nsIDOMMediaError,
-                             public nsWrapperCache
+                         public nsWrapperCache
 {
   ~MediaError() {}
 
 public:
   MediaError(HTMLMediaElement* aParent, uint16_t aCode);
 
   // nsISupports
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
--- a/dom/html/PluginDocument.cpp
+++ b/dom/html/PluginDocument.cpp
@@ -18,17 +18,17 @@
 #include "mozilla/dom/Element.h"
 #include "nsObjectLoadingContent.h"
 #include "GeckoProfiler.h"
 
 namespace mozilla {
 namespace dom {
 
 class PluginDocument final : public MediaDocument
-                               , public nsIPluginDocument
+                           , public nsIPluginDocument
 {
 public:
   PluginDocument();
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIPLUGINDOCUMENT
 
   virtual nsresult StartDocumentLoad(const char*         aCommand,
--- a/dom/html/UndoManager.h
+++ b/dom/html/UndoManager.h
@@ -21,17 +21,17 @@ class nsIMutationObserver;
 namespace mozilla {
 class ErrorResult;
 namespace dom {
 
 class DOMTransaction;
 class DOMTransactionCallback;
 
 class UndoManager final : public nsISupports,
-                              public nsWrapperCache
+                          public nsWrapperCache
 {
   friend class TxnScopeGuard;
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(UndoManager)
 
   explicit UndoManager(nsIContent* aNode);
 
--- a/dom/html/ValidityState.h
+++ b/dom/html/ValidityState.h
@@ -10,17 +10,17 @@
 #include "nsIConstraintValidation.h"
 #include "nsWrapperCache.h"
 #include "js/TypeDecls.h"
 
 namespace mozilla {
 namespace dom {
 
 class ValidityState final : public nsIDOMValidityState,
-                                public nsWrapperCache
+                            public nsWrapperCache
 {
   ~ValidityState() {}
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ValidityState)
   NS_DECL_NSIDOMVALIDITYSTATE
 
--- a/dom/html/nsHTMLDNSPrefetch.h
+++ b/dom/html/nsHTMLDNSPrefetch.h
@@ -77,18 +77,18 @@ public:
     NS_DECL_NSIDNSLISTENER
 
     nsListener()  {}
   private:
     ~nsListener() {}
   };
   
   class nsDeferrals final: public nsIWebProgressListener
-                             , public nsSupportsWeakReference
-                             , public nsIObserver
+                         , public nsSupportsWeakReference
+                         , public nsIObserver
   {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIWEBPROGRESSLISTENER
     NS_DECL_NSIOBSERVER
 
     nsDeferrals();
     
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -194,17 +194,17 @@ public:
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
 
 private:
   ~nsAnonDivObserver() {}
   nsTextEditorState* mTextEditorState;
 };
 
 class nsTextInputSelectionImpl final : public nsSupportsWeakReference
-                                         , public nsISelectionController
+                                     , public nsISelectionController
 {
   ~nsTextInputSelectionImpl(){}
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsTextInputSelectionImpl, nsISelectionController)
 
   nsTextInputSelectionImpl(nsFrameSelection *aSel, nsIPresShell *aShell, nsIContent *aLimiter);
--- a/dom/indexedDB/IDBFileHandle.h
+++ b/dom/indexedDB/IDBFileHandle.h
@@ -24,19 +24,19 @@ namespace dom {
 
 struct IDBFileMetadataParameters;
 
 namespace indexedDB {
 
 class IDBMutableFile;
 
 class IDBFileHandle final : public DOMEventTargetHelper,
-                                public nsIRunnable,
-                                public FileHandleBase,
-                                public nsSupportsWeakReference
+                            public nsIRunnable,
+                            public FileHandleBase,
+                            public nsSupportsWeakReference
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIRUNNABLE
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IDBFileHandle, DOMEventTargetHelper)
 
   static already_AddRefed<IDBFileHandle>
--- a/dom/indexedDB/IDBFileRequest.h
+++ b/dom/indexedDB/IDBFileRequest.h
@@ -21,17 +21,17 @@ namespace mozilla {
 class EventChainPreVisitor;
 
 namespace dom {
 namespace indexedDB {
 
 class IDBFileHandle;
 
 class IDBFileRequest final : public DOMRequest,
-                                 public FileRequestBase
+                             public FileRequestBase
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(IDBFileRequest, DOMRequest)
 
   static already_AddRefed<IDBFileRequest>
   Create(nsPIDOMWindow* aOwner, IDBFileHandle* aFileHandle,
--- a/dom/ipc/ContentBridgeChild.h
+++ b/dom/ipc/ContentBridgeChild.h
@@ -9,17 +9,17 @@
 
 #include "mozilla/dom/PContentBridgeChild.h"
 #include "mozilla/dom/nsIContentChild.h"
 
 namespace mozilla {
 namespace dom {
 
 class ContentBridgeChild final : public PContentBridgeChild
-                                   , public nsIContentChild
+                               , public nsIContentChild
 {
 public:
   explicit ContentBridgeChild(Transport* aTransport);
 
   NS_DECL_ISUPPORTS
 
   static ContentBridgeChild*
   Create(Transport* aTransport, ProcessId aOtherProcess);
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -238,17 +238,17 @@ using namespace mozilla::ipc;
 using namespace mozilla::layers;
 using namespace mozilla::net;
 using namespace mozilla::jsipc;
 using namespace mozilla::widget;
 
 #ifdef ENABLE_TESTS
 
 class BackgroundTester final : public nsIIPCBackgroundChildCreateCallback,
-                                   public nsIObserver
+                               public nsIObserver
 {
     static uint32_t sCallbackCount;
 
 private:
     ~BackgroundTester()
     { }
 
     virtual void
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -62,21 +62,21 @@ class Element;
 class TabParent;
 class PStorageParent;
 class ClonedMessageData;
 class MemoryReport;
 class TabContext;
 class ContentBridgeParent;
 
 class ContentParent final : public PContentParent
-                              , public nsIContentParent
-                              , public nsIObserver
-                              , public nsIDOMGeoPositionCallback
-                              , public nsIDOMGeoPositionErrorCallback
-                              , public mozilla::LinkedListElement<ContentParent>
+                          , public nsIContentParent
+                          , public nsIObserver
+                          , public nsIDOMGeoPositionCallback
+                          , public nsIDOMGeoPositionErrorCallback
+                          , public mozilla::LinkedListElement<ContentParent>
 {
     typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
     typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
     typedef mozilla::ipc::PFileDescriptorSetParent PFileDescriptorSetParent;
     typedef mozilla::ipc::TestShellParent TestShellParent;
     typedef mozilla::ipc::URIParams URIParams;
     typedef mozilla::dom::ClonedMessageData ClonedMessageData;
 
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -221,29 +221,29 @@ protected:
     bool mContentDocumentIsDisplayed;
     nsRefPtr<TabChildGlobal> mTabChildGlobal;
     ScreenIntSize mInnerSize;
     mozilla::layers::FrameMetrics mLastRootMetrics;
     nsCOMPtr<nsIWebBrowserChrome3> mWebBrowserChrome;
 };
 
 class TabChild final : public TabChildBase,
-                           public PBrowserChild,
-                           public nsIWebBrowserChrome2,
-                           public nsIEmbeddingSiteWindow,
-                           public nsIWebBrowserChromeFocus,
-                           public nsIInterfaceRequestor,
-                           public nsIWindowProvider,
-                           public nsIDOMEventListener,
-                           public nsIWebProgressListener,
-                           public nsSupportsWeakReference,
-                           public nsITabChild,
-                           public nsIObserver,
-                           public TabContext,
-                           public nsITooltipListener
+                       public PBrowserChild,
+                       public nsIWebBrowserChrome2,
+                       public nsIEmbeddingSiteWindow,
+                       public nsIWebBrowserChromeFocus,
+                       public nsIInterfaceRequestor,
+                       public nsIWindowProvider,
+                       public nsIDOMEventListener,
+                       public nsIWebProgressListener,
+                       public nsSupportsWeakReference,
+                       public nsITabChild,
+                       public nsIObserver,
+                       public TabContext,
+                       public nsITooltipListener
 {
     typedef mozilla::dom::ClonedMessageData ClonedMessageData;
     typedef mozilla::layout::RenderFrameChild RenderFrameChild;
     typedef mozilla::layers::APZEventState APZEventState;
     typedef mozilla::layers::SetTargetAPZCCallback SetTargetAPZCCallback;
     typedef mozilla::layers::SetAllowedTouchBehaviorCallback SetAllowedTouchBehaviorCallback;
 
 public:
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -2791,19 +2791,19 @@ TabParent::HandleEvent(nsIDOMEvent* aEve
     NS_ENSURE_SUCCESS(frameLoader->GetWindowDimensions(windowDims), NS_ERROR_FAILURE);
     UpdateDimensions(windowDims, mDimensions);
     return NS_OK;
   }
   return NS_OK;
 }
 
 class FakeChannel final : public nsIChannel,
-                              public nsIAuthPromptCallback,
-                              public nsIInterfaceRequestor,
-                              public nsILoadContext
+                          public nsIAuthPromptCallback,
+                          public nsIInterfaceRequestor,
+                          public nsILoadContext
 {
 public:
   FakeChannel(const nsCString& aUri, uint64_t aCallbackId, Element* aElement)
     : mCallbackId(aCallbackId)
     , mElement(aElement)
   {
     NS_NewURI(getter_AddRefs(mUri), aUri);
   }
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -143,19 +143,15 @@ LOCAL_INCLUDES += [
 DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gonk', 'qt'):
     DEFINES['MOZ_ENABLE_FREETYPE'] = True
 
 if CONFIG['MOZ_TOOLKIT_SEARCH']:
     DEFINES['MOZ_TOOLKIT_SEARCH'] = True
 
-for var in ('MOZ_PERMISSIONS', 'MOZ_CHILD_PERMISSIONS'):
-    if CONFIG[var]:
-        DEFINES[var] = True
-
 JAR_MANIFESTS += ['jar.mn']
 
 BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
 MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
 MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 
 CXXFLAGS += CONFIG['TK_CFLAGS']
new file mode 100644
--- /dev/null
+++ b/dom/ipc/tests/file_bug1086684.html
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=1086684
+-->
+<head>
+  <title>Test for Bug 1086684</title>
+  <meta charset="UTF-8">
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1086684">Mozilla Bug 1086684</a>
+<div id="content">
+    <input type="file" id="f">
+</div>
+</body>
+</html>
--- a/dom/ipc/tests/mochitest.ini
+++ b/dom/ipc/tests/mochitest.ini
@@ -1,14 +1,21 @@
+[DEFAULT]
+support-files =
+  file_bug1086684.html
+
 [test_blob_sliced_from_child_process.html]
 # This test is only supposed to run in the main process.
 skip-if = buildapp == 'b2g' || buildapp == 'mulet' || e10s
 [test_blob_sliced_from_parent_process.html]
 # This test is only supposed to run in the main process.
 skip-if = buildapp == 'b2g' || buildapp == 'mulet' || e10s
+[test_bug1086684.html]
+# This test is only supposed to run in the main process
+skip-if = buildapp == 'b2g' || buildapp == 'mulet' || e10s || toolkit == 'android'
 [test_cpow_cookies.html]
 skip-if = buildapp == 'b2g' || buildapp == 'mulet'
 [test_NuwaProcessCreation.html]
 skip-if = toolkit != 'gonk'
 [test_NuwaProcessDeadlock.html]
 skip-if = toolkit != 'gonk'
 [test_child_docshell.html]
 skip-if = toolkit == 'cocoa' # disabled due to hangs, see changeset 6852e7c47edf
new file mode 100644
--- /dev/null
+++ b/dom/ipc/tests/test_bug1086684.html
@@ -0,0 +1,106 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+  <title>Test for recursive CPOW-getting-cookie bug</title>
+  <script type="application/javascript"
+          src="/tests/SimpleTest/SimpleTest.js">
+  </script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+
+  <script type="application/javascript;version=1.8">
+    "use strict";
+
+    SimpleTest.waitForExplicitFinish();
+
+    const childFrameURL =
+      "http://mochi.test:8888/tests/dom/ipc/tests/file_bug1086684.html";
+
+    function childFrameScript() {
+      "use strict";
+
+      let { MockFilePicker } =
+        Components.utils.import("resource://specialpowers/MockFilePicker.jsm", {});
+
+      function parentReady(message) {
+        MockFilePicker.init(content);
+        MockFilePicker.returnFiles = [message.data.file];
+        MockFilePicker.returnValue = MockFilePicker.returnOK;
+
+        let input = content.document.getElementById("f");
+        input.addEventListener("change", () => {
+          MockFilePicker.cleanup();
+          message.target.sendAsyncMessage("testBug1086684:childDone", { },
+                                          { elt: input });
+        });
+
+        input.focus();
+        input.click();
+      }
+
+      addMessageListener("testBug1086684:parentReady", function(message) {
+        parentReady(message);
+      });
+    }
+
+    let test;
+    function* testStructure(mm) {
+      let lastResult;
+
+      function testDone(msg) {
+        test.next(msg.objects);
+      }
+
+      mm.addMessageListener("testBug1086684:childDone", testDone);
+
+      let blob = new Blob([]);
+      let file = new File([blob], "helloworld.txt", { type: "text/plain" });
+
+      mm.sendAsyncMessage("testBug1086684:parentReady", { file });
+      lastResult = yield;
+
+      // Note that the "helloworld.txt" passed in above doesn't affect the
+      // 'value' getter. Because we're mocking a file using a blob, we ask the
+      // blob for its path, which is the empty string.
+      is(SpecialPowers.wrap(lastResult.elt).value, "", "got the right answer and didn't crash");
+
+      SimpleTest.finish();
+    }
+
+    function runTests() {
+      info("Browser prefs set.");
+
+      let iframe = document.createElement("iframe");
+      SpecialPowers.wrap(iframe).mozbrowser = true;
+      iframe.id = "iframe";
+      iframe.src = childFrameURL;
+
+      iframe.addEventListener("mozbrowserloadend", function() {
+        info("Got iframe load event.");
+        let mm = SpecialPowers.getBrowserFrameMessageManager(iframe);
+        mm.loadFrameScript("data:,(" + encodeURI(childFrameScript.toString()) + ")();",
+                           false);
+
+        test = testStructure(mm);
+        test.next();
+      });
+
+      document.body.appendChild(iframe);
+    }
+
+    addEventListener("load", function() {
+      info("Got load event.");
+
+      SpecialPowers.addPermission("browser", true, document);
+      SpecialPowers.pushPrefEnv({
+        "set": [
+          ["dom.ipc.browser_frames.oop_by_default", true],
+          ["dom.mozBrowserFramesEnabled", true],
+          ["browser.pagethumbnails.capturing_disabled", true]
+        ]
+      }, runTests);
+    });
+  </script>
+</body>
+</html>
--- a/dom/mathml/nsMathMLElement.h
+++ b/dom/mathml/nsMathMLElement.h
@@ -21,18 +21,18 @@ namespace mozilla {
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 } // namespace mozilla
 
 /*
  * The base class for MathML elements.
  */
 class nsMathMLElement final : public nsMathMLElementBase,
-                                  public nsIDOMElement,
-                                  public mozilla::dom::Link
+                              public nsIDOMElement,
+                              public mozilla::dom::Link
 {
 public:
   explicit nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   explicit nsMathMLElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
   // Implementation of nsISupports is inherited from nsMathMLElementBase
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/dom/media/AbstractMediaDecoder.h
+++ b/dom/media/AbstractMediaDecoder.h
@@ -49,19 +49,19 @@ class AbstractMediaDecoder : public nsIS
 public:
   // Returns the monitor for other threads to synchronise access to
   // state.
   virtual ReentrantMonitor& GetReentrantMonitor() = 0;
 
   // Returns true if the decoder is shut down.
   virtual bool IsShutdown() const = 0;
 
-  virtual bool OnStateMachineThread() const = 0;
+  virtual bool OnStateMachineTaskQueue() const = 0;
 
-  virtual bool OnDecodeThread() const = 0;
+  virtual bool OnDecodeTaskQueue() const = 0;
 
   // Get the current MediaResource being used. Its URI will be returned
   // by currentSrc. Returns what was passed to Load(), if Load() has been called.
   virtual MediaResource* GetResource() const = 0;
 
   // Called by the decode thread to keep track of the number of bytes read
   // from the resource.
   virtual void NotifyBytesConsumed(int64_t aBytes, int64_t aOffset) = 0;
--- a/dom/media/MediaCache.cpp
+++ b/dom/media/MediaCache.cpp
@@ -62,17 +62,18 @@ static const uint32_t FREE_BLOCK_SCAN_LI
 #endif
 
 // There is at most one media cache (although that could quite easily be
 // relaxed if we wanted to manage multiple caches with independent
 // size limits).
 static MediaCache* gMediaCache;
 
 class MediaCacheFlusher final : public nsIObserver,
-                                      public nsSupportsWeakReference {
+                                public nsSupportsWeakReference
+{
   MediaCacheFlusher() {}
   ~MediaCacheFlusher();
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   static void Init();
 };
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -825,17 +825,17 @@ already_AddRefed<nsIPrincipal> MediaDeco
   MOZ_ASSERT(NS_IsMainThread());
   return mResource ? mResource->GetCurrentPrincipal() : nullptr;
 }
 
 void MediaDecoder::QueueMetadata(int64_t aPublishTime,
                                  nsAutoPtr<MediaInfo> aInfo,
                                  nsAutoPtr<MetadataTags> aTags)
 {
-  NS_ASSERTION(OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnDecodeTaskQueue());
   GetReentrantMonitor().AssertCurrentThreadIn();
   mDecoderStateMachine->QueueMetadata(aPublishTime, aInfo, aTags);
 }
 
 bool
 MediaDecoder::IsExpectingMoreData()
 {
   ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
@@ -1088,29 +1088,29 @@ MediaDecoder::GetStatistics()
   }
 
   return result;
 }
 
 double MediaDecoder::ComputePlaybackRate(bool* aReliable)
 {
   GetReentrantMonitor().AssertCurrentThreadIn();
-  MOZ_ASSERT(NS_IsMainThread() || OnStateMachineThread() || OnDecodeThread());
+  MOZ_ASSERT(NS_IsMainThread() || OnStateMachineTaskQueue() || OnDecodeTaskQueue());
 
   int64_t length = mResource ? mResource->GetLength() : -1;
   if (mDuration >= 0 && length >= 0) {
     *aReliable = true;
     return length * static_cast<double>(USECS_PER_S) / mDuration;
   }
   return mPlaybackStatistics->GetRateAtLastStop(aReliable);
 }
 
 void MediaDecoder::UpdatePlaybackRate()
 {
-  MOZ_ASSERT(NS_IsMainThread() || OnStateMachineThread());
+  MOZ_ASSERT(NS_IsMainThread() || OnStateMachineTaskQueue());
   GetReentrantMonitor().AssertCurrentThreadIn();
   if (!mResource)
     return;
   bool reliable;
   uint32_t rate = uint32_t(ComputePlaybackRate(&reliable));
   if (reliable) {
     // Avoid passing a zero rate
     rate = std::max(rate, 1u);
@@ -1501,27 +1501,27 @@ void MediaDecoder::Resume(bool aForceBuf
     if (mDecoderStateMachine) {
       mDecoderStateMachine->StartBuffering();
     }
   }
 }
 
 void MediaDecoder::StopProgressUpdates()
 {
-  MOZ_ASSERT(OnStateMachineThread() || OnDecodeThread());
+  MOZ_ASSERT(OnStateMachineTaskQueue() || OnDecodeTaskQueue());
   GetReentrantMonitor().AssertCurrentThreadIn();
   mIgnoreProgressData = true;
   if (mResource) {
     mResource->SetReadMode(MediaCacheStream::MODE_METADATA);
   }
 }
 
 void MediaDecoder::StartProgressUpdates()
 {
-  MOZ_ASSERT(OnStateMachineThread() || OnDecodeThread());
+  MOZ_ASSERT(OnStateMachineTaskQueue() || OnDecodeTaskQueue());
   GetReentrantMonitor().AssertCurrentThreadIn();
   mIgnoreProgressData = false;
   if (mResource) {
     mResource->SetReadMode(MediaCacheStream::MODE_PLAYBACK);
   }
 }
 
 void MediaDecoder::SetLoadInBackground(bool aLoadInBackground)
@@ -1533,19 +1533,19 @@ void MediaDecoder::SetLoadInBackground(b
 }
 
 void MediaDecoder::UpdatePlaybackOffset(int64_t aOffset)
 {
   ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
   mPlaybackPosition = aOffset;
 }
 
-bool MediaDecoder::OnStateMachineThread() const
+bool MediaDecoder::OnStateMachineTaskQueue() const
 {
-  return mDecoderStateMachine->OnStateMachineThread();
+  return mDecoderStateMachine->OnTaskQueue();
 }
 
 void MediaDecoder::SetPlaybackRate(double aPlaybackRate)
 {
   if (aPlaybackRate == 0.0) {
     mPausedForPlaybackRateNull = true;
     mInitialPlaybackRate = aPlaybackRate;
     Pause();
@@ -1571,19 +1571,19 @@ void MediaDecoder::SetPreservesPitch(boo
 {
   if (mDecoderStateMachine) {
     mDecoderStateMachine->SetPreservesPitch(aPreservesPitch);
   } else {
     mInitialPreservesPitch = aPreservesPitch;
   }
 }
 
-bool MediaDecoder::OnDecodeThread() const {
+bool MediaDecoder::OnDecodeTaskQueue() const {
   NS_WARN_IF_FALSE(mDecoderStateMachine, "mDecoderStateMachine is null");
-  return mDecoderStateMachine ? mDecoderStateMachine->OnDecodeThread() : false;
+  return mDecoderStateMachine ? mDecoderStateMachine->OnDecodeTaskQueue() : false;
 }
 
 ReentrantMonitor& MediaDecoder::GetReentrantMonitor() {
   return mReentrantMonitor;
 }
 
 ImageContainer* MediaDecoder::GetImageContainer()
 {
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -663,19 +663,19 @@ public:
 
   // Returns a weak reference to the media decoder owner.
   MediaDecoderOwner* GetMediaOwner() const;
 
   // Called by the state machine to notify the decoder that the duration
   // has changed.
   void DurationChanged();
 
-  bool OnStateMachineThread() const override;
+  bool OnStateMachineTaskQueue() const override;
 
-  bool OnDecodeThread() const override;
+  bool OnDecodeTaskQueue() const override;
 
   // Returns the monitor for other threads to synchronise access to
   // state.
   ReentrantMonitor& GetReentrantMonitor() override;
 
   // Returns true if the decoder is shut down
   bool IsShutdown() const final override;
 
--- a/dom/media/MediaDecoderReader.cpp
+++ b/dom/media/MediaDecoderReader.cpp
@@ -190,17 +190,17 @@ MediaDecoderReader::ComputeStartTime(con
   return startTime;
 }
 
 nsRefPtr<MediaDecoderReader::MetadataPromise>
 MediaDecoderReader::CallReadMetadata()
 {
   typedef ReadMetadataFailureReason Reason;
 
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnTaskQueue());
   mDecoder->GetReentrantMonitor().AssertNotCurrentThreadIn();
   DECODER_LOG("MediaDecoderReader::CallReadMetadata");
 
   // PreReadMetadata causes us to try to allocate various hardware and OS
   // resources, which may not be available at the moment.
   PreReadMetadata();
   if (IsWaitingMediaResources()) {
     return MetadataPromise::CreateAndReject(Reason::WAITING_FOR_RESOURCES, __func__);
@@ -368,17 +368,17 @@ void
 MediaDecoderReader::BreakCycles()
 {
   mTaskQueue = nullptr;
 }
 
 nsRefPtr<ShutdownPromise>
 MediaDecoderReader::Shutdown()
 {
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnTaskQueue());
   mShutdown = true;
 
   mBaseAudioPromise.RejectIfExists(END_OF_STREAM, __func__);
   mBaseVideoPromise.RejectIfExists(END_OF_STREAM, __func__);
 
   ReleaseMediaResources();
   nsRefPtr<ShutdownPromise> p;
 
--- a/dom/media/MediaDecoderReader.h
+++ b/dom/media/MediaDecoderReader.h
@@ -107,17 +107,17 @@ public:
   // Destroys the decoding state. The reader cannot be made usable again.
   // This is different from ReleaseMediaResources() as it is irreversable,
   // whereas ReleaseMediaResources() is.  Must be called on the decode
   // thread.
   virtual nsRefPtr<ShutdownPromise> Shutdown();
 
   MediaTaskQueue* EnsureTaskQueue();
 
-  virtual bool OnDecodeThread()
+  virtual bool OnTaskQueue()
   {
     return !GetTaskQueue() || GetTaskQueue()->IsCurrentThreadIn();
   }
 
   void SetBorrowedTaskQueue(MediaTaskQueue* aTaskQueue)
   {
     MOZ_ASSERT(!mTaskQueue && aTaskQueue);
     mTaskQueue = aTaskQueue;
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -264,17 +264,17 @@ MediaDecoderStateMachine::MediaDecoderSt
                                  MIN_VIDEO_QUEUE_SIZE);
   }
 
   mBufferingWait = IsRealTime() ? 0 : 15;
   mLowDataThresholdUsecs = IsRealTime() ? 0 : detail::LOW_DATA_THRESHOLD_USECS;
 
 #ifdef XP_WIN
   // Ensure high precision timers are enabled on Windows, otherwise the state
-  // machine thread isn't woken up at reliable intervals to set the next frame,
+  // machine isn't woken up at reliable intervals to set the next frame,
   // and we drop frames while painting. Note that multiple calls to this
   // function per-process is OK, provided each call is matched by a corresponding
   // timeEndPeriod() call.
   timeBeginPeriod(1);
 #endif
 }
 
 MediaDecoderStateMachine::~MediaDecoderStateMachine()
@@ -307,30 +307,30 @@ bool MediaDecoderStateMachine::HasFuture
 
 bool MediaDecoderStateMachine::HaveNextFrameData() {
   AssertCurrentThreadInMonitor();
   return (!HasAudio() || HasFutureAudio()) &&
          (!HasVideo() || VideoQueue().GetSize() > 0);
 }
 
 int64_t MediaDecoderStateMachine::GetDecodedAudioDuration() {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
   int64_t audioDecoded = AudioQueue().Duration();
   if (mAudioEndTime != -1) {
     audioDecoded += mAudioEndTime - GetMediaTime();
   }
   return audioDecoded;
 }
 
 void MediaDecoderStateMachine::SendStreamAudio(AudioData* aAudio,
                                                DecodedStreamData* aStream,
                                                AudioSegment* aOutput)
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
 
   // This logic has to mimic AudioSink closely to make sure we write
   // the exact same silences
   CheckedInt64 audioWrittenOffset = aStream->mAudioFramesWritten +
       UsecsToFrames(mInfo.mAudio.mRate, aStream->mInitialTime + mStartTime);
   CheckedInt64 frameOffset = UsecsToFrames(mInfo.mAudio.mRate, aAudio->mTime);
 
@@ -385,17 +385,17 @@ static void WriteVideoToMediaStream(Medi
   StreamTime duration =
       aStream->MicrosecondsToStreamTimeRoundDown(aEndMicroseconds) -
       aStream->MicrosecondsToStreamTimeRoundDown(aStartMicroseconds);
   aOutput->AppendFrame(image.forget(), duration, aIntrinsicSize);
 }
 
 void MediaDecoderStateMachine::SendStreamData()
 {
-  MOZ_ASSERT(OnStateMachineThread(), "Should be on state machine thread");
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
   MOZ_ASSERT(!mAudioSink, "Should've been stopped in RunStateMachine()");
 
   DecodedStreamData* stream = mDecoder->GetDecodedStream();
 
   bool finished =
       (!mInfo.HasAudio() || AudioQueue().IsFinished()) &&
       (!mInfo.HasVideo() || VideoQueue().IsFinished());
@@ -705,17 +705,17 @@ MediaDecoderStateMachine::IsVideoSeekCom
     (mCurrentSeek.Exists() &&
      !mDropVideoUntilNextDiscontinuity &&
      (VideoQueue().IsFinished() || VideoQueue().GetSize() > 0));
 }
 
 void
 MediaDecoderStateMachine::OnAudioDecoded(AudioData* aAudioSample)
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   nsRefPtr<AudioData> audio(aAudioSample);
   MOZ_ASSERT(audio);
   mAudioDataRequest.Complete();
   mDecodedAudioEndTime = audio->GetEndTime();
 
   SAMPLE_LOG("OnAudioDecoded [%lld,%lld] disc=%d",
              (audio ? audio->mTime : -1),
@@ -826,17 +826,17 @@ MediaDecoderStateMachine::Push(VideoData
     mDecoder->GetReentrantMonitor().NotifyAll();
   }
 }
 
 void
 MediaDecoderStateMachine::OnNotDecoded(MediaData::Type aType,
                                        MediaDecoderReader::NotDecodedReason aReason)
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   SAMPLE_LOG("OnNotDecoded (aType=%u, aReason=%u)", aType, aReason);
   bool isAudio = aType == MediaData::AUDIO_DATA;
   MOZ_ASSERT_IF(!isAudio, aType == MediaData::VIDEO_DATA);
 
   if (isAudio) {
     mAudioDataRequest.Complete();
   } else {
@@ -928,31 +928,31 @@ MediaDecoderStateMachine::OnNotDecoded(M
       return;
     }
   }
 }
 
 void
 MediaDecoderStateMachine::MaybeFinishDecodeFirstFrame()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
   if ((IsAudioDecoding() && AudioQueue().GetSize() == 0) ||
       (IsVideoDecoding() && VideoQueue().GetSize() == 0)) {
     return;
   }
   if (NS_FAILED(FinishDecodeFirstFrame())) {
     DecodeError();
   }
 }
 
 void
 MediaDecoderStateMachine::OnVideoDecoded(VideoData* aVideoSample)
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   nsRefPtr<VideoData> video(aVideoSample);
   mVideoDataRequest.Complete();
   mDecodedVideoEndTime = video ? video->GetEndTime() : mDecodedVideoEndTime;
 
   SAMPLE_LOG("OnVideoDecoded [%lld,%lld] disc=%d",
              (video ? video->mTime : -1),
              (video ? video->GetEndTime() : -1),
@@ -1049,17 +1049,17 @@ MediaDecoderStateMachine::OnVideoDecoded
       return;
     }
   }
 }
 
 void
 MediaDecoderStateMachine::CheckIfSeekComplete()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
 
   const bool videoSeekComplete = IsVideoSeekComplete();
   if (HasVideo() && !videoSeekComplete) {
     // We haven't reached the target. Ensure we have requested another sample.
     if (NS_FAILED(EnsureVideoDecodeTaskQueued())) {
       DECODER_WARN("Failed to request video during seek");
       DecodeError();
@@ -1147,17 +1147,17 @@ nsresult MediaDecoderStateMachine::Init(
   nsresult rv = mReader->Init(cloneReader);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 void MediaDecoderStateMachine::StopPlayback()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   DECODER_LOG("StopPlayback()");
 
   AssertCurrentThreadInMonitor();
 
   mDecoder->NotifyPlaybackStopped();
 
   if (IsPlaying()) {
     mPlayDuration = GetClock() - mStartTime;
@@ -1205,17 +1205,17 @@ void MediaDecoderStateMachine::MaybeStar
 
   mDecoder->GetReentrantMonitor().NotifyAll();
   mDecoder->UpdateStreamBlockingForStateMachinePlaying();
   DispatchDecodeTasksIfNeeded();
 }
 
 void MediaDecoderStateMachine::UpdatePlaybackPositionInternal(int64_t aTime)
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   SAMPLE_LOG("UpdatePlaybackPositionInternal(%lld) (mStartTime=%lld)", aTime, mStartTime);
   AssertCurrentThreadInMonitor();
 
   NS_ASSERTION(mStartTime >= 0, "Should have positive mStartTime");
   mCurrentFrameTime = aTime - mStartTime;
   NS_ASSERTION(mCurrentFrameTime >= 0, "CurrentTime should be positive!");
   if (aTime > mEndTime) {
     NS_ASSERTION(mCurrentFrameTime > GetDuration(),
@@ -1316,31 +1316,21 @@ void MediaDecoderStateMachine::SetAudioC
     mAudioCaptured = true;
     // Schedule the state machine to send stream data as soon as possible.
     ScheduleStateMachine();
   }
 }
 
 double MediaDecoderStateMachine::GetCurrentTime() const
 {
-  NS_ASSERTION(NS_IsMainThread() ||
-               OnStateMachineThread() ||
-               OnDecodeThread(),
-               "Should be on main, decode, or state machine thread.");
-
   return static_cast<double>(mCurrentFrameTime) / static_cast<double>(USECS_PER_S);
 }
 
 int64_t MediaDecoderStateMachine::GetCurrentTimeUs() const
 {
-  NS_ASSERTION(NS_IsMainThread() ||
-               OnStateMachineThread() ||
-               OnDecodeThread(),
-               "Should be on main, decode, or state machine thread.");
-
   return mCurrentFrameTime;
 }
 
 bool MediaDecoderStateMachine::IsRealTime() const {
   return mRealTime;
 }
 
 int64_t MediaDecoderStateMachine::GetDuration()
@@ -1372,18 +1362,17 @@ public:
   }
 private:
   nsRefPtr<MediaDecoder> mDecoder;
   double mSeekTarget;
 };
 
 void MediaDecoderStateMachine::SetDuration(int64_t aDuration)
 {
-  NS_ASSERTION(NS_IsMainThread() || OnDecodeThread(),
-               "Should be on main or decode thread.");
+  MOZ_ASSERT(NS_IsMainThread() || OnDecodeTaskQueue());
   AssertCurrentThreadInMonitor();
 
   if (aDuration < 0) {
     mDurationSet = false;
     return;
   }
 
   mDurationSet = true;
@@ -1425,17 +1414,17 @@ void MediaDecoderStateMachine::UpdateEst
     nsCOMPtr<nsIRunnable> event =
       NS_NewRunnableMethod(mDecoder, &MediaDecoder::DurationChanged);
     NS_DispatchToMainThread(event);
   }
 }
 
 void MediaDecoderStateMachine::SetMediaEndTime(int64_t aEndTime)
 {
-  NS_ASSERTION(OnDecodeThread(), "Should be on decode thread");
+  MOZ_ASSERT(OnDecodeTaskQueue());
   AssertCurrentThreadInMonitor();
 
   mEndTime = aEndTime;
 }
 
 void MediaDecoderStateMachine::SetFragmentEndTime(int64_t aEndTime)
 {
   AssertCurrentThreadInMonitor();
@@ -1445,17 +1434,17 @@ void MediaDecoderStateMachine::SetFragme
 
 bool MediaDecoderStateMachine::IsDormantNeeded()
 {
   return mReader->IsDormantNeeded();
 }
 
 void MediaDecoderStateMachine::SetDormant(bool aDormant)
 {
-  MOZ_ASSERT(OnStateMachineThread(), "Should be on state machine thread.");
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
   if (IsShutdown()) {
     return;
   }
 
   if (!mReader) {
     return;
@@ -1531,17 +1520,17 @@ void MediaDecoderStateMachine::Shutdown(
   if (mAudioSink) {
     mAudioSink->PrepareToShutdown();
   }
   mDecoder->GetReentrantMonitor().NotifyAll();
 }
 
 void MediaDecoderStateMachine::StartDecoding()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   if (mState == DECODER_STATE_DECODING) {
     return;
   }
   SetState(DECODER_STATE_DECODING);
 
   mDecodeStartTime = TimeStamp::Now();
 
@@ -1557,34 +1546,34 @@ void MediaDecoderStateMachine::StartDeco
   // Ensure that we've got tasks enqueued to decode data if we need to.
   DispatchDecodeTasksIfNeeded();
 
   ScheduleStateMachine();
 }
 
 void MediaDecoderStateMachine::NotifyWaitingForResourcesStatusChanged()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   DECODER_LOG("NotifyWaitingForResourcesStatusChanged");
 
   if (mState == DECODER_STATE_WAIT_FOR_RESOURCES) {
     // Try again.
     SetState(DECODER_STATE_DECODING_NONE);
     ScheduleStateMachine();
   } else if (mState == DECODER_STATE_WAIT_FOR_CDM &&
              !mReader->IsWaitingOnCDMResource()) {
     SetState(DECODER_STATE_DECODING_FIRSTFRAME);
     EnqueueDecodeFirstFrameTask();
   }
 }
 
 void MediaDecoderStateMachine::PlayInternal()
 {
-  NS_ASSERTION(OnStateMachineThread(), "Should be on state machine thread.");
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
   // Once we start playing, we don't want to minimize our prerolling, as we
   // assume the user is likely to want to keep playing in future. This needs to
   // happen before we invoke StartDecoding().
   if (mMinimizePreroll) {
     mMinimizePreroll = false;
     DispatchDecodeTasksIfNeeded();
@@ -1594,17 +1583,17 @@ void MediaDecoderStateMachine::PlayInter
     mDecodingFrozenAtStateDecoding = false;
     DispatchDecodeTasksIfNeeded();
   }
 
   // Some state transitions still happen synchronously on the main thread. So
   // if the main thread invokes Play() and then Seek(), the seek will initiate
   // synchronously on the main thread, and the asynchronous PlayInternal task
   // will arrive when it's no longer valid. The proper thing to do is to move
-  // all state transitions to the state machine thread, but for now we just
+  // all state transitions to the state machine task queue, but for now we just
   // make sure that none of the possible main-thread state transitions (Seek(),
   // SetDormant(), and Shutdown()) have not occurred.
   if (mState != DECODER_STATE_DECODING && mState != DECODER_STATE_BUFFERING &&
       mState != DECODER_STATE_COMPLETED)
   {
     DECODER_LOG("Unexpected state - Bailing out of PlayInternal()");
     return;
   }
@@ -1647,17 +1636,17 @@ void MediaDecoderStateMachine::NotifyDat
       mEndTime = std::max<int64_t>(mEndTime, end * USECS_PER_S);
     }
   }
 }
 
 nsRefPtr<MediaDecoder::SeekPromise>
 MediaDecoderStateMachine::Seek(SeekTarget aTarget)
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
   mDecodingFrozenAtStateDecoding = false;
 
   if (IsShutdown()) {
     return MediaDecoder::SeekPromise::CreateAndReject(/* aIgnored = */ true, __func__);
   }
 
@@ -1685,17 +1674,17 @@ MediaDecoderStateMachine::Seek(SeekTarge
   SetState(DECODER_STATE_SEEKING);
   ScheduleStateMachine();
 
   return mPendingSeek.mPromise.Ensure(__func__);
 }
 
 void MediaDecoderStateMachine::StopAudioThread()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
 
   if (mStopAudioThread) {
     // Audio sink is being stopped in another thread. Wait until finished.
     while (mAudioSink) {
       mDecoder->GetReentrantMonitor().Wait();
     }
     return;
@@ -1728,17 +1717,17 @@ MediaDecoderStateMachine::EnqueueDecodeF
   nsresult rv = TaskQueue()->Dispatch(task);
   NS_ENSURE_SUCCESS(rv, rv);
   return NS_OK;
 }
 
 void
 MediaDecoderStateMachine::SetReaderIdle()
 {
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnDecodeTaskQueue());
   DECODER_LOG("Invoking SetReaderIdle()");
   mReader->SetIdle();
 }
 
 void
 MediaDecoderStateMachine::DispatchDecodeTasksIfNeeded()
 {
   AssertCurrentThreadInMonitor();
@@ -1804,17 +1793,17 @@ MediaDecoderStateMachine::DispatchDecode
       DECODER_WARN("Failed to dispatch event to set decoder idle state");
     }
   }
 }
 
 void
 MediaDecoderStateMachine::InitiateSeek()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
 
   mCurrentSeek.RejectIfExists(__func__);
   mCurrentSeek.Steal(mPendingSeek);
 
   // Bound the seek time to be inside the media range.
   int64_t end = GetEndTime();
   NS_ASSERTION(mStartTime != -1, "Should know start time by now");
@@ -1869,34 +1858,34 @@ MediaDecoderStateMachine::InitiateSeek()
     ->RefableThen(TaskQueue(), __func__, this,
                   &MediaDecoderStateMachine::OnSeekCompleted,
                   &MediaDecoderStateMachine::OnSeekFailed));
 }
 
 nsresult
 MediaDecoderStateMachine::DispatchAudioDecodeTaskIfNeeded()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
   if (IsShutdown()) {
     return NS_ERROR_FAILURE;
   }
 
   if (NeedToDecodeAudio()) {
     return EnsureAudioDecodeTaskQueued();
   }
 
   return NS_OK;
 }
 
 nsresult
 MediaDecoderStateMachine::EnsureAudioDecodeTaskQueued()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
 
   SAMPLE_LOG("EnsureAudioDecodeTaskQueued isDecoding=%d status=%s",
               IsAudioDecoding(), AudioRequestStatus());
 
   if (mState != DECODER_STATE_DECODING &&
       mState != DECODER_STATE_DECODING_FIRSTFRAME &&
       mState != DECODER_STATE_BUFFERING &&
@@ -1919,34 +1908,34 @@ MediaDecoderStateMachine::EnsureAudioDec
                   &MediaDecoderStateMachine::OnAudioNotDecoded));
 
   return NS_OK;
 }
 
 nsresult
 MediaDecoderStateMachine::DispatchVideoDecodeTaskIfNeeded()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
   if (IsShutdown()) {
     return NS_ERROR_FAILURE;
   }
 
   if (NeedToDecodeVideo()) {
     return EnsureVideoDecodeTaskQueued();
   }
 
   return NS_OK;
 }
 
 nsresult
 MediaDecoderStateMachine::EnsureVideoDecodeTaskQueued()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
 
   SAMPLE_LOG("EnsureVideoDecodeTaskQueued isDecoding=%d status=%s",
              IsVideoDecoding(), VideoRequestStatus());
 
   if (mState != DECODER_STATE_DECODING &&
       mState != DECODER_STATE_DECODING_FIRSTFRAME &&
       mState != DECODER_STATE_BUFFERING &&
@@ -1978,17 +1967,17 @@ MediaDecoderStateMachine::EnsureVideoDec
                   &MediaDecoderStateMachine::OnVideoDecoded,
                   &MediaDecoderStateMachine::OnVideoNotDecoded));
   return NS_OK;
 }
 
 nsresult
 MediaDecoderStateMachine::StartAudioThread()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
   if (mAudioCaptured) {
     NS_ASSERTION(mStopAudioThread, "mStopAudioThread must always be true if audio is captured");
     return NS_OK;
   }
 
   mStopAudioThread = false;
   if (HasAudio() && !mAudioSink) {
@@ -2085,17 +2074,17 @@ bool MediaDecoderStateMachine::HasLowUnd
   return endOfDecodedData != INT64_MAX &&
          !buffered->Contains(static_cast<double>(endOfDecodedData) / USECS_PER_S,
                              static_cast<double>(std::min(endOfDecodedData + aUsecs, GetDuration())) / USECS_PER_S);
 }
 
 void
 MediaDecoderStateMachine::DecodeError()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   if (IsShutdown()) {
     // Already shutdown.
     return;
   }
 
   // Change state to error, which will cause the state machine to wait until
   // the MediaDecoder shuts it down.
@@ -2113,17 +2102,17 @@ MediaDecoderStateMachine::DecodeError()
     NS_NewRunnableMethod(mDecoder, &MediaDecoder::DecodeError);
   NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
 }
 
 void
 MediaDecoderStateMachine::OnMetadataRead(MetadataHolder* aMetadata)
 {
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   MOZ_ASSERT(mState == DECODER_STATE_DECODING_METADATA);
   mMetadataRequest.Complete();
 
   mDecoder->SetMediaSeekable(mReader->IsMediaSeekable());
   mInfo = aMetadata->mInfo;
   mMetadataTags = aMetadata->mTags.forget();
 
   if (HasVideo()) {
@@ -2153,17 +2142,17 @@ MediaDecoderStateMachine::OnMetadataRead
   EnqueueDecodeFirstFrameTask();
   ScheduleStateMachine();
 }
 
 void
 MediaDecoderStateMachine::OnMetadataNotRead(ReadMetadataFailureReason aReason)
 {
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   MOZ_ASSERT(mState == DECODER_STATE_DECODING_METADATA);
   mMetadataRequest.Complete();
 
   if (aReason == ReadMetadataFailureReason::WAITING_FOR_RESOURCES) {
     SetState(DECODER_STATE_WAIT_FOR_RESOURCES);
   } else {
     MOZ_ASSERT(aReason == ReadMetadataFailureReason::METADATA_ERROR);
     DECODER_WARN("Decode metadata failed, shutting down decoder");
@@ -2197,31 +2186,31 @@ MediaDecoderStateMachine::EnqueueFirstFr
     new FirstFrameLoadedEventRunner(mDecoder, info, visibility);
   NS_DispatchToMainThread(event, NS_DISPATCH_NORMAL);
   mSentFirstFrameLoadedEvent = true;
 }
 
 void
 MediaDecoderStateMachine::CallDecodeFirstFrame()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   if (mState != DECODER_STATE_DECODING_FIRSTFRAME) {
     return;
   }
   if (NS_FAILED(DecodeFirstFrame())) {
     DECODER_WARN("Decode failed to start, shutting down decoder");
     DecodeError();
   }
 }
 
 nsresult
 MediaDecoderStateMachine::DecodeFirstFrame()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
   MOZ_ASSERT(mState == DECODER_STATE_DECODING_FIRSTFRAME);
   DECODER_LOG("DecodeFirstFrame started");
 
   if (HasAudio()) {
     RefPtr<nsIRunnable> decodeTask(
       NS_NewRunnableMethod(this, &MediaDecoderStateMachine::DispatchAudioDecodeTaskIfNeeded));
     AudioQueue().AddPopListener(decodeTask, TaskQueue());
@@ -2263,17 +2252,17 @@ MediaDecoderStateMachine::DecodeFirstFra
 
   return NS_OK;
 }
 
 nsresult
 MediaDecoderStateMachine::FinishDecodeFirstFrame()
 {
   AssertCurrentThreadInMonitor();
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   DECODER_LOG("FinishDecodeFirstFrame");
 
   if (IsShutdown()) {
     return NS_ERROR_FAILURE;
   }
 
   if (!IsRealTime() && !mSentFirstFrameLoadedEvent) {
     const VideoData* v = VideoQueue().PeekFront();
@@ -2339,40 +2328,40 @@ MediaDecoderStateMachine::FinishDecodeFi
 
   return NS_OK;
 }
 
 void
 MediaDecoderStateMachine::OnSeekCompleted(int64_t aTime)
 {
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   mSeekRequest.Complete();
 
   // We must decode the first samples of active streams, so we can determine
   // the new stream time. So dispatch tasks to do that.
   mDecodeToSeekTarget = true;
 
   DispatchDecodeTasksIfNeeded();
 }
 
 void
 MediaDecoderStateMachine::OnSeekFailed(nsresult aResult)
 {
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   mSeekRequest.Complete();
   MOZ_ASSERT(NS_FAILED(aResult), "Cancels should also disconnect mSeekRequest");
   DecodeError();
 }
 
 void
 MediaDecoderStateMachine::SeekCompleted()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
   if (mState != DECODER_STATE_SEEKING) {
     MOZ_DIAGNOSTIC_ASSERT(mState == DECODER_STATE_DORMANT ||
                           IsShutdown());
     // It would be nice to assert mCurrent.Exists() here, but it's possible that
     // we've transitioned to DECODER_STATE_SHUTDOWN but not yet gone through
     // RunStateMachine in that state, which is where this promise gets rejected.
@@ -2474,26 +2463,26 @@ private:
   virtual ~DecoderDisposer() {}
   nsRefPtr<MediaDecoder> mDecoder;
   nsRefPtr<MediaDecoderStateMachine> mStateMachine;
 };
 
 void
 MediaDecoderStateMachine::ShutdownReader()
 {
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnDecodeTaskQueue());
   mReader->Shutdown()->Then(TaskQueue(), __func__, this,
                             &MediaDecoderStateMachine::FinishShutdown,
                             &MediaDecoderStateMachine::FinishShutdown);
 }
 
 void
 MediaDecoderStateMachine::FinishShutdown()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
   // The reader's listeners hold references to the state machine,
   // creating a cycle which keeps the state machine and its shared
   // thread pools alive. So break it here.
   AudioQueue().ClearListeners();
   VideoQueue().ClearListeners();
 
@@ -2522,20 +2511,20 @@ MediaDecoderStateMachine::FinishShutdown
   RefPtr<DecoderDisposer> disposer = new DecoderDisposer(mDecoder, this);
   TaskQueue()->BeginShutdown()->Then(mainThread.get(), __func__, disposer.get(),
                                      &DecoderDisposer::OnTaskQueueShutdown,
                                      &DecoderDisposer::OnTaskQueueShutdown);
 }
 
 nsresult MediaDecoderStateMachine::RunStateMachine()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
 
-  mDelayedScheduler.Reset(); // Must happen on state machine thread.
+  mDelayedScheduler.Reset(); // Must happen on state machine task queue.
   mDispatchedStateMachine = false;
 
   // If audio is being captured, stop the audio sink if it's running
   if (mAudioCaptured) {
     StopAudioThread();
   }
 
   MediaResource* resource = mDecoder->GetResource();
@@ -2725,17 +2714,17 @@ nsresult MediaDecoderStateMachine::RunSt
   }
 
   return NS_OK;
 }
 
 void
 MediaDecoderStateMachine::Reset()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
   DECODER_LOG("MediaDecoderStateMachine::Reset");
 
   // We should be resetting because we're seeking, shutting down, or entering
   // dormant state. We could also be in the process of going dormant, and have
   // just switched to exiting dormant before we finished entering dormant,
   // hence the DECODING_NONE case below.
   MOZ_ASSERT(IsShutdown() ||
@@ -2771,17 +2760,17 @@ MediaDecoderStateMachine::Reset()
   RefPtr<nsRunnable> resetTask =
     NS_NewRunnableMethod(mReader, &MediaDecoderReader::ResetDecode);
   DecodeTaskQueue()->Dispatch(resetTask);
 }
 
 void MediaDecoderStateMachine::RenderVideoFrame(VideoData* aData,
                                                 TimeStamp aTarget)
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   mDecoder->GetReentrantMonitor().AssertNotCurrentThreadIn();
 
   if (aData->mDuplicate) {
     return;
   }
 
   VERBOSE_LOG("playing video frame %lld (queued=%i, state-machine=%i, decoder-queued=%i)",
               aData->mTime, VideoQueue().GetSize() + mReader->SizeOfVideoQueueInFrames(),
@@ -2876,17 +2865,17 @@ int64_t MediaDecoderStateMachine::GetClo
       "Clock should go forwards.");
   }
 
   return clock_time;
 }
 
 void MediaDecoderStateMachine::AdvanceFrame()
 {
-  NS_ASSERTION(OnStateMachineThread(), "Should be on state machine thread.");
+  MOZ_ASSERT(OnTaskQueue());
   AssertCurrentThreadInMonitor();
   NS_ASSERTION(!HasAudio() || mAudioStartTime != -1,
                "Should know audio start time if we have audio.");
 
   if (mDecoder->GetState() != MediaDecoder::PLAY_STATE_PLAYING) {
     return;
   }
 
@@ -3300,19 +3289,19 @@ MediaDecoderStateMachine::ScheduleStateM
   MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
   (void) rv;
 }
 
 void
 MediaDecoderStateMachine::ScheduleStateMachineIn(int64_t aMicroseconds)
 {
   AssertCurrentThreadInMonitor();
-  MOZ_ASSERT(OnStateMachineThread()); // mDelayedScheduler.Ensure() may Disconnect()
+  MOZ_ASSERT(OnTaskQueue());          // mDelayedScheduler.Ensure() may Disconnect()
                                       // the promise, which must happen on the state
-                                      // machine thread.
+                                      // machine task queue.
   MOZ_ASSERT(aMicroseconds > 0);
   if (mState == DECODER_STATE_SHUTDOWN) {
     NS_WARNING("Refusing to schedule shutdown state machine");
     return;
   }
 
   if (mDispatchedStateMachine) {
     return;
@@ -3325,22 +3314,22 @@ MediaDecoderStateMachine::ScheduleStateM
 
   TimeStamp now = TimeStamp::Now();
   TimeStamp target = now + TimeDuration::FromMicroseconds(aMicroseconds);
 
   SAMPLE_LOG("Scheduling state machine for %lf ms from now", (target - now).ToMilliseconds());
   mDelayedScheduler.Ensure(target);
 }
 
-bool MediaDecoderStateMachine::OnDecodeThread() const
+bool MediaDecoderStateMachine::OnDecodeTaskQueue() const
 {
   return !DecodeTaskQueue() || DecodeTaskQueue()->IsCurrentThreadIn();
 }
 
-bool MediaDecoderStateMachine::OnStateMachineThread() const
+bool MediaDecoderStateMachine::OnTaskQueue() const
 {
   return TaskQueue()->IsCurrentThreadIn();
 }
 
 bool MediaDecoderStateMachine::IsStateMachineScheduled() const
 {
   return mDispatchedStateMachine || mDelayedScheduler.IsScheduled();
 }
@@ -3397,17 +3386,17 @@ bool MediaDecoderStateMachine::IsShutdow
   return mState == DECODER_STATE_ERROR ||
          mState == DECODER_STATE_SHUTDOWN;
 }
 
 void MediaDecoderStateMachine::QueueMetadata(int64_t aPublishTime,
                                              nsAutoPtr<MediaInfo> aInfo,
                                              nsAutoPtr<MetadataTags> aTags)
 {
-  NS_ASSERTION(OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnDecodeTaskQueue());
   AssertCurrentThreadInMonitor();
   TimedMetadata* metadata = new TimedMetadata;
   metadata->mPublishTime = aPublishTime;
   metadata->mInfo = aInfo.forget();
   metadata->mTags = aTags.forget();
   mMetadataManager.QueueMetadata(metadata);
 }
 
@@ -3433,17 +3422,17 @@ void MediaDecoderStateMachine::OnAudioSi
   mAudioCompleted = true;
   UpdateReadyState();
   // Kick the decode thread; it may be sleeping waiting for this to finish.
   mDecoder->GetReentrantMonitor().NotifyAll();
 }
 
 void MediaDecoderStateMachine::OnAudioSinkError()
 {
-  MOZ_ASSERT(OnStateMachineThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   // AudioSink not used with captured streams, so ignore errors in this case.
   if (mAudioCaptured) {
     return;
   }
 
   ResyncAudioClock();
   mAudioCompleted = true;
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -197,18 +197,18 @@ public:
   // The duration is only changed if its significantly different than the
   // the current duration, as the incoming duration is an estimate and so
   // often is unstable as more data is read and the estimate is updated.
   // Can result in a durationchangeevent. aDuration is in microseconds.
   void UpdateEstimatedDuration(int64_t aDuration);
 
   // Functions used by assertions to ensure we're calling things
   // on the appropriate threads.
-  bool OnDecodeThread() const;
-  bool OnStateMachineThread() const;
+  bool OnDecodeTaskQueue() const;
+  bool OnTaskQueue() const;
 
   MediaDecoderOwner::NextFrameStatus GetNextFrameStatus();
 
   // Cause state transitions. These methods obtain the decoder monitor
   // to synchronise the change of state, and to notify other threads
   // that the state has changed.
   void Play()
   {
@@ -325,17 +325,17 @@ public:
 
   // Invokes ScheduleStateMachine to run in |aMicroseconds| microseconds,
   // unless it's already scheduled to run earlier, in which case the
   // request is discarded.
   void ScheduleStateMachineIn(int64_t aMicroseconds);
 
   void OnDelayedSchedule()
   {
-    MOZ_ASSERT(OnStateMachineThread());
+    MOZ_ASSERT(OnTaskQueue());
     ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
     mDelayedScheduler.CompleteRequest();
     ScheduleStateMachine();
   }
 
   void NotReached() { MOZ_DIAGNOSTIC_ASSERT(false); }
 
   // Set the media fragment end time. aEndTime is in microseconds.
@@ -751,18 +751,17 @@ protected:
   public:
     explicit DelayedScheduler(MediaDecoderStateMachine* aSelf)
       : mSelf(aSelf), mMediaTimer(new MediaTimer()) {}
 
     bool IsScheduled() const { return !mTarget.IsNull(); }
 
     void Reset()
     {
-      MOZ_ASSERT(mSelf->OnStateMachineThread(),
-                 "Must be on state machine queue to disconnect");
+      MOZ_ASSERT(mSelf->OnTaskQueue(), "Must be on state machine queue to disconnect");
       if (IsScheduled()) {
         mRequest.Disconnect();
         mTarget = TimeStamp();
       }
     }
 
     void Ensure(mozilla::TimeStamp& aTarget)
     {
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -540,17 +540,17 @@ public:
 
 // we could add MediaManager if needed
 typedef void (*WindowListenerCallback)(MediaManager *aThis,
                                        uint64_t aWindowID,
                                        StreamListeners *aListeners,
                                        void *aData);
 
 class MediaManager final : public nsIMediaManagerService,
-                               public nsIObserver
+                           public nsIObserver
 {
 public:
   static already_AddRefed<MediaManager> GetInstance();
 
   // NOTE: never Dispatch(....,NS_DISPATCH_SYNC) to the MediaManager
   // thread from the MainThread, as we NS_DISPATCH_SYNC to MainThread
   // from MediaManager thread.
   static MediaManager* Get();
--- a/dom/media/MediaRecorder.h
+++ b/dom/media/MediaRecorder.h
@@ -34,17 +34,17 @@ class AudioNode;
  * Encoder will get the raw data by track data changes, encode it by selected MIME Type, then store the encoded in EncodedBufferCache object.
  * The encoded data will be extracted on every timeslice passed from Start function call or by RequestData function.
  * Thread model:
  * When the recorder starts, it creates a "Media Encoder" thread to read data from MediaEncoder object and store buffer in EncodedBufferCache object.
  * Also extract the encoded data and create blobs on every timeslice passed from start function or RequestData function called by UA.
  */
 
 class MediaRecorder final : public DOMEventTargetHelper,
-                                public nsIDocumentActivity
+                            public nsIDocumentActivity
 {
   class Session;
 
 public:
   MediaRecorder(DOMMediaStream& aSourceMediaStream, nsPIDOMWindow* aOwnerWindow);
   MediaRecorder(AudioNode& aSrcAudioNode, uint32_t aSrcOutput, nsPIDOMWindow* aOwnerWindow);
 
   // nsWrapperCache
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -626,18 +626,18 @@ public:
   }
 
   virtual size_t SizeOfIncludingThis(
                       MallocSizeOf aMallocSizeOf) const override {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
   class Listener final : public nsIStreamListener,
-                             public nsIInterfaceRequestor,
-                             public nsIChannelEventSink
+                         public nsIInterfaceRequestor,
+                         public nsIChannelEventSink
   {
     ~Listener() {}
   public:
     explicit Listener(ChannelMediaResource* aResource) : mResource(aResource) {}
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIREQUESTOBSERVER
     NS_DECL_NSISTREAMLISTENER
--- a/dom/media/MediaStreamError.h
+++ b/dom/media/MediaStreamError.h
@@ -36,34 +36,34 @@ protected:
                     const nsAString& aMessage,
                     const nsAString& aConstraintName);
   const nsString mName;
   nsString mMessage;
   const nsString mConstraintName;
 };
 
 class MediaMgrError final : public nsISupports,
-                                public BaseMediaMgrError
+                            public BaseMediaMgrError
 {
 public:
   explicit MediaMgrError(const nsAString& aName,
                          const nsAString& aMessage =  EmptyString(),
                          const nsAString& aConstraintName =  EmptyString())
   : BaseMediaMgrError(aName, aMessage, aConstraintName) {}
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
 private:
   ~MediaMgrError() {}
 };
 
 namespace dom {
 class MediaStreamError final : public nsISupports,
-                                   public BaseMediaMgrError,
-                                   public nsWrapperCache
+                               public BaseMediaMgrError,
+                               public nsWrapperCache
 {
 public:
   MediaStreamError(nsPIDOMWindow* aParent,
                    const nsAString& aName,
                    const nsAString& aMessage = EmptyString(),
                    const nsAString& aConstraintName =  EmptyString());
 
   MediaStreamError(nsPIDOMWindow* aParent,
--- a/dom/media/RTCIdentityProviderRegistrar.h
+++ b/dom/media/RTCIdentityProviderRegistrar.h
@@ -16,17 +16,17 @@
 #include "mozilla/dom/BindingDeclarations.h"
 
 namespace mozilla {
 namespace dom {
 
 class RTCIdentityProvider;
 
 class RTCIdentityProviderRegistrar final : public nsISupports,
-                                               public nsWrapperCache
+                                           public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(RTCIdentityProviderRegistrar)
 
   explicit RTCIdentityProviderRegistrar(nsIGlobalObject* aGlobal);
 
   // As required
--- a/dom/media/RtspMediaResource.h
+++ b/dom/media/RtspMediaResource.h
@@ -204,17 +204,17 @@ public:
   }
 
   // Listener implements nsIStreamingProtocolListener as
   // mMediaStreamController's callback function.
   // It holds RtspMediaResource reference to notify the connection status and
   // data arrival. The Revoke function releases the reference when
   // RtspMediaResource::OnDisconnected is called.
   class Listener final : public nsIInterfaceRequestor,
-                             public nsIStreamingProtocolListener
+                         public nsIStreamingProtocolListener
   {
     ~Listener() {}
   public:
     explicit Listener(RtspMediaResource* aResource) : mResource(aResource) {}
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIINTERFACEREQUESTOR
     NS_DECL_NSISTREAMINGPROTOCOLLISTENER
--- a/dom/media/TextTrackCueList.h
+++ b/dom/media/TextTrackCueList.h
@@ -14,17 +14,17 @@
 #include "mozilla/ErrorResult.h"
 
 namespace mozilla {
 namespace dom {
 
 class TextTrackCue;
 
 class TextTrackCueList final : public nsISupports
-                                 , public nsWrapperCache
+                             , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TextTrackCueList)
 
   // TextTrackCueList WebIDL
   explicit TextTrackCueList(nsISupports* aParent);
 
--- a/dom/media/TextTrackRegion.h
+++ b/dom/media/TextTrackRegion.h
@@ -17,17 +17,17 @@
 
 namespace mozilla {
 namespace dom {
 
 class GlobalObject;
 class TextTrack;
 
 class TextTrackRegion final : public nsISupports,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
 public:
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TextTrackRegion)
 
   static bool RegionsEnabled(JSContext* cx, JSObject* obj)
   {
--- a/dom/media/WebVTTListener.h
+++ b/dom/media/WebVTTListener.h
@@ -16,19 +16,19 @@
 class nsIWebVTTParserWrapper;
 
 namespace mozilla {
 namespace dom {
 
 class HTMLTrackElement;
 
 class WebVTTListener final : public nsIWebVTTListener,
-                                 public nsIStreamListener,
-                                 public nsIChannelEventSink,
-                                 public nsIInterfaceRequestor
+                             public nsIStreamListener,
+                             public nsIChannelEventSink,
+                             public nsIInterfaceRequestor
 {
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_NSIWEBVTTLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSICHANNELEVENTSINK
   NS_DECL_NSIINTERFACEREQUESTOR
 
--- a/dom/media/android/AndroidMediaReader.cpp
+++ b/dom/media/android/AndroidMediaReader.cpp
@@ -38,17 +38,17 @@ AndroidMediaReader::AndroidMediaReader(A
 nsresult AndroidMediaReader::Init(MediaDecoderReader* aCloneDonor)
 {
   return NS_OK;
 }
 
 nsresult AndroidMediaReader::ReadMetadata(MediaInfo* aInfo,
                                           MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   if (!mPlugin) {
     mPlugin = GetAndroidMediaPluginHost()->CreateDecoder(mDecoder->GetResource(), mType);
     if (!mPlugin) {
       return NS_ERROR_FAILURE;
     }
   }
 
@@ -284,17 +284,17 @@ bool AndroidMediaReader::DecodeVideoFram
     break;
   }
 
   return true;
 }
 
 bool AndroidMediaReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   // This is the approximate byte position in the stream.
   int64_t pos = mDecoder->GetResource()->Tell();
 
   // Read next frame
   MPAPI::AudioFrame source;
   if (!mPlugin->ReadAudio(mPlugin, &source, mAudioSeekTimeUs)) {
     return false;
@@ -317,17 +317,17 @@ bool AndroidMediaReader::DecodeAudioData
                               MPCopy(static_cast<uint8_t *>(source.mData),
                                      source.mSize,
                                      source.mAudioChannels));
 }
 
 nsRefPtr<MediaDecoderReader::SeekPromise>
 AndroidMediaReader::Seek(int64_t aTarget, int64_t aEndTime)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   if (mHasAudio && mHasVideo) {
     // The decoder seeks/demuxes audio and video streams separately. So if
     // we seek both audio and video to aTarget, the audio stream can typically
     // seek closer to the seek target, since typically every audio block is
     // a sync point, whereas for video there are only keyframes once every few
     // seconds. So if we have both audio and video, we must seek the video
     // stream to the preceeding keyframe first, get the stream time, and then
--- a/dom/media/apple/AppleMP3Reader.cpp
+++ b/dom/media/apple/AppleMP3Reader.cpp
@@ -275,17 +275,17 @@ AppleMP3Reader::AudioSampleCallback(UInt
       break;
     }
   } while (true);
 }
 
 bool
 AppleMP3Reader::DecodeAudioData()
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread");
+  MOZ_ASSERT(OnTaskQueue());
 
   // Read AUDIO_READ_BYTES if we can
   char bytes[AUDIO_READ_BYTES];
   uint32_t numBytes = AUDIO_READ_BYTES;
 
   nsresult readrv = Read(&numBytes, bytes);
 
   // This function calls |AudioSampleCallback| above, synchronously, when it
@@ -309,32 +309,32 @@ AppleMP3Reader::DecodeAudioData()
 
   return true;
 }
 
 bool
 AppleMP3Reader::DecodeVideoFrame(bool &aKeyframeSkip,
                                  int64_t aTimeThreshold)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread");
+  MOZ_ASSERT(OnTaskQueue());
   return false;
 }
 
 
 bool
 AppleMP3Reader::HasAudio()
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread");
+  MOZ_ASSERT(OnTaskQueue());
   return mStreamReady;
 }
 
 bool
 AppleMP3Reader::HasVideo()
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread");
+  MOZ_ASSERT(OnTaskQueue());
   return false;
 }
 
 bool
 AppleMP3Reader::IsMediaSeekable()
 {
   // not used
   return true;
@@ -364,17 +364,17 @@ GetProperty(AudioFileStreamID aAudioFile
   return NS_OK;
 }
 
 
 nsresult
 AppleMP3Reader::ReadMetadata(MediaInfo* aInfo,
                              MetadataTags** aTags)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread");
+  MOZ_ASSERT(OnTaskQueue());
 
   *aTags = nullptr;
 
   /*
    * Feed bytes into the parser until we have all the metadata we need to
    * set up the decoder. When the parser has enough data, it will
    * synchronously call back to |AudioMetadataCallback| below.
    */
@@ -490,17 +490,17 @@ AppleMP3Reader::SetupDecoder()
     return;
   }
 }
 
 
 nsRefPtr<MediaDecoderReader::SeekPromise>
 AppleMP3Reader::Seek(int64_t aTime, int64_t aEndTime)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread");
+  MOZ_ASSERT(OnTaskQueue());
 
   // Find the exact frame/packet that contains |aTime|.
   mCurrentAudioFrame = aTime * mAudioSampleRate / USECS_PER_S;
   SInt64 packet = mCurrentAudioFrame / mAudioFramesPerCompressedPacket;
 
   // |AudioFileStreamSeek| will pass back through |byteOffset| the byte offset
   // into the stream it expects next time it reads.
   SInt64 byteOffset;
--- a/dom/media/directshow/DirectShowReader.cpp
+++ b/dom/media/directshow/DirectShowReader.cpp
@@ -99,17 +99,17 @@ ParseMP3Headers(MP3FrameParser *aParser,
 // and later we can use the DMO Wrapper filter and MP3 decoder DMO.
 static const GUID CLSID_MPEG_LAYER_3_DECODER_FILTER =
 { 0x38BE3000, 0xDBF4, 0x11D0, {0x86, 0x0E, 0x00, 0xA0, 0x24, 0xCF, 0xEF, 0x6D} };
 
 nsresult
 DirectShowReader::ReadMetadata(MediaInfo* aInfo,
                                MetadataTags** aTags)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   HRESULT hr;
   nsresult rv;
 
   // Create the filter graph, reference it by the GraphBuilder interface,
   // to make graph building more convenient.
   hr = CoCreateInstance(CLSID_FilterGraph,
                         nullptr,
                         CLSCTX_INPROC_SERVER,
@@ -240,17 +240,17 @@ inline float
 UnsignedByteToAudioSample(uint8_t aValue)
 {
   return aValue * (2.0f / UINT8_MAX) - 1.0f;
 }
 
 bool
 DirectShowReader::Finish(HRESULT aStatus)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   LOG("DirectShowReader::Finish(0x%x)", aStatus);
   // Notify the filter graph of end of stream.
   RefPtr<IMediaEventSink> eventSink;
   HRESULT hr = mGraph->QueryInterface(static_cast<IMediaEventSink**>(byRef(eventSink)));
   if (SUCCEEDED(hr) && eventSink) {
     eventSink->Notify(EC_COMPLETE, aStatus, 0);
   }
@@ -297,17 +297,17 @@ private:
   const uint32_t mSamples;
   const uint32_t mChannels;
   uint32_t mNextSample;
 };
 
 bool
 DirectShowReader::DecodeAudioData()
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   HRESULT hr;
 
   SampleSink* sink = mAudioSinkFilter->GetSampleSink();
   if (sink->AtEOS()) {
     // End of stream.
     return Finish(S_OK);
   }
 
@@ -344,31 +344,31 @@ DirectShowReader::DecodeAudioData()
                                       mNumChannels));
   return true;
 }
 
 bool
 DirectShowReader::DecodeVideoFrame(bool &aKeyframeSkip,
                                    int64_t aTimeThreshold)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   return false;
 }
 
 bool
 DirectShowReader::HasAudio()
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   return true;
 }
 
 bool
 DirectShowReader::HasVideo()
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   return false;
 }
 
 nsRefPtr<MediaDecoderReader::SeekPromise>
 DirectShowReader::Seek(int64_t aTargetUs, int64_t aEndTime)
 {
   nsresult res = SeekInternal(aTargetUs);
   if (NS_FAILED(res)) {
@@ -377,17 +377,17 @@ DirectShowReader::Seek(int64_t aTargetUs
     return SeekPromise::CreateAndResolve(aTargetUs, __func__);
   }
 }
 
 nsresult
 DirectShowReader::SeekInternal(int64_t aTargetUs)
 {
   HRESULT hr;
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");\
+  MOZ_ASSERT(OnTaskQueue());
 
   LOG("DirectShowReader::Seek() target=%lld", aTargetUs);
 
   hr = mControl->Pause();
   NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE);
 
   nsresult rv = ResetDecode();
   NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/media/eme/MediaKeyStatusMap.h
+++ b/dom/media/eme/MediaKeyStatusMap.h
@@ -19,17 +19,17 @@
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class ArrayBufferViewOrArrayBuffer;
 
 class MediaKeyStatusMap final : public nsISupports,
-                                    public nsWrapperCache
+                                public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MediaKeyStatusMap)
 
 public:
   explicit MediaKeyStatusMap(JSContext* aCx,
                              nsPIDOMWindow* aParent,
--- a/dom/media/eme/MediaKeySystemAccess.h
+++ b/dom/media/eme/MediaKeySystemAccess.h
@@ -17,17 +17,17 @@
 #include "mozilla/dom/MediaKeysRequestStatusBinding.h"
 
 #include "js/TypeDecls.h"
 
 namespace mozilla {
 namespace dom {
 
 class MediaKeySystemAccess final : public nsISupports,
-                                       public nsWrapperCache
+                                   public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MediaKeySystemAccess)
 
 public:
   explicit MediaKeySystemAccess(nsPIDOMWindow* aParent,
                                 const nsAString& aKeySystem);
--- a/dom/media/eme/MediaKeys.cpp
+++ b/dom/media/eme/MediaKeys.cpp
@@ -404,17 +404,17 @@ public:
     nsRefPtr<PluginCrashedEvent> event =
       PluginCrashedEvent::Constructor(document, NS_LITERAL_STRING("PluginCrashed"), init);
     event->SetTrusted(true);
     event->GetInternalNSEvent()->mFlags.mOnlyChromeDispatch = true;
 
     EventDispatcher::DispatchDOMEvent(parentWindow, nullptr, event, nullptr, nullptr);
   }
 
-  virtual bool IsStillValid()
+  virtual bool IsStillValid() override
   {
     nsCOMPtr<nsPIDOMWindow> parentWindow;
     nsCOMPtr<nsIDocument> document;
     return GetParentWindowAndDocumentIfValid(parentWindow, document);
   }
 
 private:
   virtual ~CrashHandler()
--- a/dom/media/gmp/GMPAudioDecoderParent.h
+++ b/dom/media/gmp/GMPAudioDecoderParent.h
@@ -14,17 +14,17 @@
 #include "GMPAudioDecoderProxy.h"
 
 namespace mozilla {
 namespace gmp {
 
 class GMPParent;
 
 class GMPAudioDecoderParent final : public GMPAudioDecoderProxy
-                                      , public PGMPAudioDecoderParent
+                                  , public PGMPAudioDecoderParent
 {
 public:
   NS_INLINE_DECL_REFCOUNTING(GMPAudioDecoderParent)
 
   explicit GMPAudioDecoderParent(GMPParent *aPlugin);
 
   nsresult Shutdown();
 
--- a/dom/media/gmp/GMPVideoDecoderParent.h
+++ b/dom/media/gmp/GMPVideoDecoderParent.h
@@ -16,18 +16,18 @@
 #include "GMPVideoDecoderProxy.h"
 
 namespace mozilla {
 namespace gmp {
 
 class GMPParent;
 
 class GMPVideoDecoderParent final : public PGMPVideoDecoderParent
-                                      , public GMPVideoDecoderProxy
-                                      , public GMPSharedMemManager
+                                  , public GMPVideoDecoderProxy
+                                  , public GMPSharedMemManager
 {
 public:
   NS_INLINE_DECL_REFCOUNTING(GMPVideoDecoderParent)
 
   explicit GMPVideoDecoderParent(GMPParent *aPlugin);
 
   GMPVideoHostImpl& Host();
   nsresult Shutdown();
--- a/dom/media/gstreamer/GStreamerReader.cpp
+++ b/dom/media/gstreamer/GStreamerReader.cpp
@@ -361,17 +361,17 @@ GStreamerReader::GetDataLength()
   }
 
   return streamLen - mDataOffset;
 }
 
 nsresult GStreamerReader::ReadMetadata(MediaInfo* aInfo,
                                        MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   nsresult ret = NS_OK;
 
   /*
    * Parse MP3 headers before we kick off the GStreamer pipeline otherwise there
    * might be concurrent stream operations happening on both decoding and gstreamer
    * threads which will screw the GStreamer state machine.
    */
   bool isMP3 = mDecoder->GetResource()->GetContentType().EqualsASCII(AUDIO_MP3);
@@ -633,17 +633,17 @@ nsresult GStreamerReader::ResetDecode()
 
   LOG(PR_LOG_DEBUG, "reset decode done");
 
   return res;
 }
 
 bool GStreamerReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   GstBuffer *buffer = nullptr;
 
   {
     ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
 
     if (mReachedAudioEos && !mAudioSinkBufferCount) {
       return false;
@@ -719,17 +719,17 @@ bool GStreamerReader::DecodeAudioData()
   gst_buffer_unref(buffer);
 
   return true;
 }
 
 bool GStreamerReader::DecodeVideoFrame(bool &aKeyFrameSkip,
                                        int64_t aTimeThreshold)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   GstBuffer *buffer = nullptr;
 
   {
     ReentrantMonitorAutoEnter mon(mGstThreadsMonitor);
 
     if (mReachedVideoEos && !mVideoSinkBufferCount) {
       return false;
@@ -839,17 +839,17 @@ bool GStreamerReader::DecodeVideoFrame(b
   gst_buffer_unref(buffer);
 
   return true;
 }
 
 nsRefPtr<MediaDecoderReader::SeekPromise>
 GStreamerReader::Seek(int64_t aTarget, int64_t aEndTime)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   gint64 seekPos = aTarget * GST_USECOND;
   LOG(PR_LOG_DEBUG, "%p About to seek to %" GST_TIME_FORMAT,
         mDecoder, GST_TIME_ARGS(seekPos));
 
   int flags = GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT;
   if (!gst_element_seek_simple(mPlayBin,
                                GST_FORMAT_TIME,
--- a/dom/media/mediasource/MediaSourceReader.cpp
+++ b/dom/media/mediasource/MediaSourceReader.cpp
@@ -136,17 +136,17 @@ MediaSourceReader::SizeOfAudioQueueInFra
     return 0;
   }
   return GetAudioReader()->SizeOfAudioQueueInFrames();
 }
 
 nsRefPtr<MediaDecoderReader::AudioDataPromise>
 MediaSourceReader::RequestAudioData()
 {
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnTaskQueue());
   MOZ_DIAGNOSTIC_ASSERT(mSeekPromise.IsEmpty(), "No sample requests allowed while seeking");
   MOZ_DIAGNOSTIC_ASSERT(mAudioPromise.IsEmpty(), "No duplicate sample requests");
   nsRefPtr<AudioDataPromise> p = mAudioPromise.Ensure(__func__);
   MSE_DEBUGV("mLastAudioTime=%lld", mLastAudioTime);
   if (!mAudioTrack) {
     MSE_DEBUG("called with no audio track");
     mAudioPromise.Reject(DECODE_ERROR, __func__);
     return p;
@@ -300,17 +300,17 @@ MediaSourceReader::OnAudioNotDecoded(Not
     // failing position.
     mLastAudioTime = lastAudioTime;
   }
 }
 
 nsRefPtr<MediaDecoderReader::VideoDataPromise>
 MediaSourceReader::RequestVideoData(bool aSkipToNextKeyframe, int64_t aTimeThreshold)
 {
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnTaskQueue());
   MOZ_DIAGNOSTIC_ASSERT(mSeekPromise.IsEmpty(), "No sample requests allowed while seeking");
   MOZ_DIAGNOSTIC_ASSERT(mVideoPromise.IsEmpty(), "No duplicate sample requests");
   nsRefPtr<VideoDataPromise> p = mVideoPromise.Ensure(__func__);
   MSE_DEBUGV("RequestVideoData(%d, %lld), mLastVideoTime=%lld",
              aSkipToNextKeyframe, aTimeThreshold, mLastVideoTime);
   if (!mVideoTrack) {
     MSE_DEBUG("called with no video track");
     mVideoPromise.Reject(DECODE_ERROR, __func__);
@@ -835,17 +835,17 @@ MediaSourceReader::Seek(int64_t aTime, i
 
   AttemptSeek();
   return p;
 }
 
 nsresult
 MediaSourceReader::ResetDecode()
 {
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   MSE_DEBUG("");
 
   // Any previous requests we've been waiting on are now unwanted.
   mAudioRequest.DisconnectIfExists();
   mVideoRequest.DisconnectIfExists();
   mAudioSeekRequest.DisconnectIfExists();
   mVideoSeekRequest.DisconnectIfExists();
@@ -1031,17 +1031,17 @@ MediaSourceReader::GetBuffered(dom::Time
 
   MSE_DEBUG("ranges=%s", DumpTimeRanges(intersectionRanges).get());
   return NS_OK;
 }
 
 nsRefPtr<MediaDecoderReader::WaitForDataPromise>
 MediaSourceReader::WaitForData(MediaData::Type aType)
 {
-  MOZ_ASSERT(OnDecodeThread());
+  MOZ_ASSERT(OnTaskQueue());
   ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
   nsRefPtr<WaitForDataPromise> p = WaitPromise(aType).Ensure(__func__);
   MaybeNotifyHaveData();
   return p;
 }
 
 void
 MediaSourceReader::MaybeNotifyHaveData()
--- a/dom/media/mediasource/SourceBufferDecoder.cpp
+++ b/dom/media/mediasource/SourceBufferDecoder.cpp
@@ -151,29 +151,29 @@ SourceBufferDecoder::NotifyWaitingForRes
 
 ReentrantMonitor&
 SourceBufferDecoder::GetReentrantMonitor()
 {
   return mParentDecoder->GetReentrantMonitor();
 }
 
 bool
-SourceBufferDecoder::OnStateMachineThread() const
+SourceBufferDecoder::OnStateMachineTaskQueue() const
 {
-  return mParentDecoder->OnStateMachineThread();
+  return mParentDecoder->OnStateMachineTaskQueue();
 }
 
 bool
-SourceBufferDecoder::OnDecodeThread() const
+SourceBufferDecoder::OnDecodeTaskQueue() const
 {
   // During initialization we run on our TrackBuffer's task queue.
   if (mTaskQueue) {
     return mTaskQueue->IsCurrentThreadIn();
   }
-  return mParentDecoder->OnDecodeThread();
+  return mParentDecoder->OnDecodeTaskQueue();
 }
 
 SourceBufferResource*
 SourceBufferDecoder::GetResource() const
 {
   return static_cast<SourceBufferResource*>(mResource.get());
 }
 
--- a/dom/media/mediasource/SourceBufferDecoder.h
+++ b/dom/media/mediasource/SourceBufferDecoder.h
@@ -35,18 +35,18 @@ public:
   SourceBufferDecoder(MediaResource* aResource, AbstractMediaDecoder* aParentDecoder,
                       int64_t aTimestampOffset /* microseconds */);
 
   NS_DECL_THREADSAFE_ISUPPORTS
 
   virtual bool IsMediaSeekable() final override;
   virtual bool IsShutdown() const final override;
   virtual bool IsTransportSeekable() final override;
-  virtual bool OnDecodeThread() const final override;
-  virtual bool OnStateMachineThread() const final override;
+  virtual bool OnDecodeTaskQueue() const final override;
+  virtual bool OnStateMachineTaskQueue() const final override;
   virtual int64_t GetMediaDuration() final override;
   virtual layers::ImageContainer* GetImageContainer() final override;
   virtual MediaDecoderOwner* GetOwner() final override;
   virtual SourceBufferResource* GetResource() const final override;
   virtual ReentrantMonitor& GetReentrantMonitor() final override;
   virtual VideoFrameContainer* GetVideoFrameContainer() final override;
   virtual void MetadataLoaded(nsAutoPtr<MediaInfo> aInfo,
                               nsAutoPtr<MetadataTags> aTags,
@@ -109,17 +109,17 @@ public:
     MOZ_ASSERT(NS_IsMainThread());
     ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
     mCDMProxy = aProxy;
     return NS_OK;
   }
 
   virtual CDMProxy* GetCDMProxy() override
   {
-    MOZ_ASSERT(OnDecodeThread() || NS_IsMainThread());
+    MOZ_ASSERT(OnDecodeTaskQueue() || NS_IsMainThread());
     ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
     return mCDMProxy;
   }
 #endif
 
   // Given a time convert it into an approximate byte offset from the
   // cached data. Returns -1 if no such value is computable.
   int64_t ConvertToByteOffset(double aTime);
--- a/dom/media/mediasource/TrackBuffer.cpp
+++ b/dom/media/mediasource/TrackBuffer.cpp
@@ -869,17 +869,17 @@ TrackBuffer::AbortAppendData()
   // However we must ensure that the MediaPromiseHolder handle all pending
   // promises.
   mInitializationPromise.RejectIfExists(NS_ERROR_ABORT, __func__);
 }
 
 const nsTArray<nsRefPtr<SourceBufferDecoder>>&
 TrackBuffer::Decoders()
 {
-  // XXX assert OnDecodeThread
+  // XXX assert OnDecodeTaskQueue
   return mInitializedDecoders;
 }
 
 #ifdef MOZ_EME
 nsresult
 TrackBuffer::SetCDMProxy(CDMProxy* aProxy)
 {
   ReentrantMonitorAutoEnter mon(mParentDecoder->GetReentrantMonitor());
--- a/dom/media/ogg/OggReader.cpp
+++ b/dom/media/ogg/OggReader.cpp
@@ -160,17 +160,17 @@ nsresult OggReader::Init(MediaDecoderRea
 
 nsresult OggReader::ResetDecode()
 {
   return ResetDecode(false);
 }
 
 nsresult OggReader::ResetDecode(bool start)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   nsresult res = NS_OK;
 
   if (NS_FAILED(MediaDecoderReader::ResetDecode())) {
     res = NS_ERROR_FAILURE;
   }
 
   // Discard any previously buffered packets/pages.
   ogg_sync_reset(&mOggState);
@@ -364,17 +364,17 @@ void OggReader::SetupMediaTracksInfo(con
       mInfo.mAudio.mChannels = opusState->mChannels;
     }
   }
 }
 
 nsresult OggReader::ReadMetadata(MediaInfo* aInfo,
                                  MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   // We read packets until all bitstreams have read all their header packets.
   // We record the offset of the first non-header page so that we know
   // what page to seek to when seeking to the media start.
 
   NS_ASSERTION(aTags, "Called with null MetadataTags**.");
   *aTags = nullptr;
 
@@ -666,17 +666,17 @@ nsresult OggReader::DecodeOpus(ogg_packe
 
   mDecodedAudioFrames += frames;
 
   return NS_OK;
 }
 
 bool OggReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   DebugOnly<bool> haveCodecState = mVorbisState != nullptr ||
                                    mOpusState != nullptr;
   NS_ASSERTION(haveCodecState, "Need audio codec state to decode audio");
 
   // Read the next data packet. Skip any non-data packets we encounter.
   ogg_packet* packet = 0;
   OggCodecState* codecState;
   if (mVorbisState)
@@ -890,17 +890,17 @@ nsresult OggReader::DecodeTheora(ogg_pac
     mVideoQueue.Push(v);
   }
   return NS_OK;
 }
 
 bool OggReader::DecodeVideoFrame(bool &aKeyframeSkip,
                                      int64_t aTimeThreshold)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   // Record number of frames decoded and parsed. Automatically update the
   // stats counters using the AutoNotifyDecoded stack-based class.
   AbstractMediaDecoder::AutoNotifyDecoded a(mDecoder);
 
   // Read the next data packet. Skip any non-data packets we encounter.
   ogg_packet* packet = 0;
   do {
@@ -936,17 +936,17 @@ bool OggReader::DecodeVideoFrame(bool &a
     return false;
   }
 
   return true;
 }
 
 bool OggReader::ReadOggPage(ogg_page* aPage)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   int ret = 0;
   while((ret = ogg_sync_pageseek(&mOggState, aPage)) <= 0) {
     if (ret < 0) {
       // Lost page sync, have to skip up to next page.
       continue;
     }
     // Returns a buffer that can be written too
@@ -970,17 +970,17 @@ bool OggReader::ReadOggPage(ogg_page* aP
     NS_ENSURE_TRUE(ret == 0, false);
   }
 
   return true;
 }
 
 ogg_packet* OggReader::NextOggPacket(OggCodecState* aCodecState)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   if (!aCodecState || !aCodecState->mActive) {
     return nullptr;
   }
 
   ogg_packet* packet;
   while ((packet = aCodecState->PacketOut()) == nullptr) {
     // The codec state does not have any buffered pages, so try to read another
@@ -1013,17 +1013,17 @@ GetChecksum(ogg_page* page)
                (p[1] << 8) +
                (p[2] << 16) +
                (p[3] << 24);
   return c;
 }
 
 int64_t OggReader::RangeStartTime(int64_t aOffset)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   MediaResource* resource = mDecoder->GetResource();
   NS_ENSURE_TRUE(resource != nullptr, 0);
   nsresult res = resource->Seek(nsISeekableStream::NS_SEEK_SET, aOffset);
   NS_ENSURE_SUCCESS(res, 0);
   int64_t startTime = 0;
   FindStartTime(startTime);
   return startTime;
 }
@@ -1035,18 +1035,17 @@ struct nsAutoOggSyncState {
   ~nsAutoOggSyncState() {
     ogg_sync_clear(&mState);
   }
   ogg_sync_state mState;
 };
 
 int64_t OggReader::RangeEndTime(int64_t aEndOffset)
 {
-  NS_ASSERTION(mDecoder->OnStateMachineThread() || mDecoder->OnDecodeThread(),
-               "Should be on state machine or decode thread.");
+  MOZ_ASSERT(OnTaskQueue() || mDecoder->OnStateMachineTaskQueue());
 
   MediaResource* resource = mDecoder->GetResource();
   NS_ENSURE_TRUE(resource != nullptr, -1);
   int64_t position = resource->Tell();
   int64_t endTime = RangeEndTime(0, aEndOffset, false);
   nsresult res = resource->Seek(nsISeekableStream::NS_SEEK_SET, position);
   NS_ENSURE_SUCCESS(res, -1);
   return endTime;
@@ -1176,17 +1175,17 @@ int64_t OggReader::RangeEndTime(int64_t 
     }
   }
 
   return endTime;
 }
 
 nsresult OggReader::GetSeekRanges(nsTArray<SeekRange>& aRanges)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   AutoPinned<MediaResource> resource(mDecoder->GetResource());
   nsTArray<MediaByteRange> cached;
   nsresult res = resource->GetCachedRanges(cached);
   NS_ENSURE_SUCCESS(res, res);
 
   for (uint32_t index = 0; index < cached.Length(); index++) {
     MediaByteRange& range = cached[index];
     int64_t startTime = -1;
@@ -1216,17 +1215,17 @@ nsresult OggReader::GetSeekRanges(nsTArr
 
 OggReader::SeekRange
 OggReader::SelectSeekRange(const nsTArray<SeekRange>& ranges,
                              int64_t aTarget,
                              int64_t aStartTime,
                              int64_t aEndTime,
                              bool aExact)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   int64_t so = 0;
   int64_t eo = mDecoder->GetResource()->GetLength();
   int64_t st = aStartTime;
   int64_t et = aEndTime;
   for (uint32_t i = 0; i < ranges.Length(); i++) {
     const SeekRange &r = ranges[i];
     if (r.mTimeStart < aTarget) {
       so = r.mOffsetStart;
@@ -1432,17 +1431,17 @@ OggReader::Seek(int64_t aTarget, int64_t
     return SeekPromise::CreateAndReject(res, __func__);
   } else {
     return SeekPromise::CreateAndResolve(aTarget, __func__);
   }
 }
 
 nsresult OggReader::SeekInternal(int64_t aTarget, int64_t aEndTime)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   if (mIsChained)
     return NS_ERROR_FAILURE;
   LOG(PR_LOG_DEBUG, ("%p About to seek to %lld", mDecoder, aTarget));
   nsresult res;
   MediaResource* resource = mDecoder->GetResource();
   NS_ENSURE_TRUE(resource != nullptr, NS_ERROR_FAILURE);
   int64_t adjustedTarget = aTarget;
   if (HasAudio() && mOpusState){
@@ -1589,17 +1588,17 @@ PageSync(MediaResource* aResource,
 
   return PAGE_SYNC_OK;
 }
 
 nsresult OggReader::SeekBisection(int64_t aTarget,
                                     const SeekRange& aRange,
                                     uint32_t aFuzz)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   nsresult res;
   MediaResource* resource = mDecoder->GetResource();
 
   if (aTarget == aRange.mTimeStart) {
     if (NS_FAILED(ResetDecode())) {
       return NS_ERROR_FAILURE;
     }
     res = resource->Seek(nsISeekableStream::NS_SEEK_SET, 0);
@@ -1961,18 +1960,17 @@ nsresult OggReader::GetBuffered(dom::Tim
   }
 
   return NS_OK;
 #endif
 }
 
 VideoData* OggReader::FindStartTime(int64_t& aOutStartTime)
 {
-  NS_ASSERTION(mDecoder->OnStateMachineThread() || mDecoder->OnDecodeThread(),
-               "Should be on state machine or decode thread.");
+  MOZ_ASSERT(OnTaskQueue() || mDecoder->OnStateMachineTaskQueue());
 
   // Extract the start times of the bitstreams in order to calculate
   // the duration.
   int64_t videoStartTime = INT64_MAX;
   int64_t audioStartTime = INT64_MAX;
   VideoData* videoData = nullptr;
 
   if (HasVideo()) {
--- a/dom/media/omx/MediaCodecReader.cpp
+++ b/dom/media/omx/MediaCodecReader.cpp
@@ -653,17 +653,17 @@ MediaCodecReader::PreReadMetadata()
   UpdateIsWaitingMediaResources();
 }
 
 
 nsresult
 MediaCodecReader::ReadMetadata(MediaInfo* aInfo,
                                MetadataTags** aTags)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   if (!ReallocateResources()) {
     return NS_ERROR_FAILURE;
   }
 
   bool incrementalParserNeeded =
     mDecoder->GetResource()->GetContentType().EqualsASCII(AUDIO_MP3);
   if (incrementalParserNeeded && !TriggerIncrementalParser()) {
@@ -1026,17 +1026,17 @@ MediaCodecReader::DecodeVideoFrameSync(i
   } else {
     mVideoTrack.mCodec->releaseOutputBuffer(bufferInfo.mIndex);
   }
 }
 
 nsRefPtr<MediaDecoderReader::SeekPromise>
 MediaCodecReader::Seek(int64_t aTime, int64_t aEndTime)
 {
-  MOZ_ASSERT(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   mVideoTrack.mSeekTimeUs = aTime;
   mAudioTrack.mSeekTimeUs = aTime;
   mVideoTrack.mInputEndOfStream = false;
   mVideoTrack.mOutputEndOfStream = false;
   mAudioTrack.mInputEndOfStream = false;
   mAudioTrack.mOutputEndOfStream = false;
   mAudioTrack.mFlushed = false;
--- a/dom/media/omx/MediaOmxCommonReader.cpp
+++ b/dom/media/omx/MediaOmxCommonReader.cpp
@@ -39,17 +39,17 @@ MediaOmxCommonReader::MediaOmxCommonRead
 #endif
 
   mAudioChannel = dom::AudioChannelService::GetDefaultAudioChannel();
 }
 
 #ifdef MOZ_AUDIO_OFFLOAD
 void MediaOmxCommonReader::CheckAudioOffload()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   char offloadProp[128];
   property_get("audio.offload.disable", offloadProp, "0");
   bool offloadDisable =  atoi(offloadProp) != 0;
   if (offloadDisable) {
     return;
   }
 
--- a/dom/media/omx/MediaOmxReader.cpp
+++ b/dom/media/omx/MediaOmxReader.cpp
@@ -250,17 +250,17 @@ nsresult MediaOmxReader::InitOmxDecoder(
 void MediaOmxReader::PreReadMetadata()
 {
   UpdateIsWaitingMediaResources();
 }
 
 nsresult MediaOmxReader::ReadMetadata(MediaInfo* aInfo,
                                       MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   EnsureActive();
 
   *aTags = nullptr;
 
   // Initialize the internal OMX Decoder.
   nsresult rv = InitOmxDecoder();
   if (NS_FAILED(rv)) {
     return rv;
@@ -360,17 +360,17 @@ MediaOmxReader::IsMediaSeekable()
 {
   // Check the MediaExtract flag if the source is seekable.
   return (mExtractor->flags() & MediaExtractor::CAN_SEEK);
 }
 
 bool MediaOmxReader::DecodeVideoFrame(bool &aKeyframeSkip,
                                       int64_t aTimeThreshold)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   EnsureActive();
 
   // Record number of frames decoded and parsed. Automatically update the
   // stats counters using the AutoNotifyDecoded stack-based class.
   AbstractMediaDecoder::AutoNotifyDecoded a(mDecoder);
 
   bool doSeek = mVideoSeekTimeUs != -1;
   if (doSeek) {
@@ -504,17 +504,17 @@ void MediaOmxReader::NotifyDataArrived(c
   if (duration != mLastParserDuration && mUseParserDuration) {
     mLastParserDuration = duration;
     decoder->UpdateEstimatedMediaDuration(mLastParserDuration);
   }
 }
 
 bool MediaOmxReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   EnsureActive();
 
   // This is the approximate byte position in the stream.
   int64_t pos = mDecoder->GetResource()->Tell();
 
   // Read next frame
   MPAPI::AudioFrame source;
   if (!mOmxDecoder->ReadAudio(&source, mAudioSeekTimeUs)) {
@@ -539,17 +539,17 @@ bool MediaOmxReader::DecodeAudioData()
                               OmxCopy(static_cast<uint8_t *>(source.mData),
                                       source.mSize,
                                       source.mAudioChannels));
 }
 
 nsRefPtr<MediaDecoderReader::SeekPromise>
 MediaOmxReader::Seek(int64_t aTarget, int64_t aEndTime)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   EnsureActive();
 
   VideoFrameContainer* container = mDecoder->GetVideoFrameContainer();
   if (container && container->GetImageContainer()) {
     container->GetImageContainer()->ClearAllImagesExceptFront();
   }
 
   if (mHasAudio && mHasVideo) {
--- a/dom/media/raw/RawReader.cpp
+++ b/dom/media/raw/RawReader.cpp
@@ -34,18 +34,17 @@ nsresult RawReader::ResetDecode()
 {
   mCurrentFrame = 0;
   return MediaDecoderReader::ResetDecode();
 }
 
 nsresult RawReader::ReadMetadata(MediaInfo* aInfo,
                                  MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(),
-               "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   MediaResource* resource = mDecoder->GetResource();
   NS_ASSERTION(resource, "Decoder has no media resource");
 
   if (!ReadFromResource(resource, reinterpret_cast<uint8_t*>(&mMetadata),
                         sizeof(mMetadata)))
     return NS_ERROR_FAILURE;
 
@@ -116,18 +115,17 @@ bool
 RawReader::IsMediaSeekable()
 {
   // not used
   return true;
 }
 
  bool RawReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnStateMachineThread() || mDecoder->OnDecodeThread(),
-               "Should be on state machine thread or decode thread.");
+  MOZ_ASSERT(OnTaskQueue() || mDecoder->OnStateMachineTaskQueue());
   return false;
 }
 
 // Helper method that either reads until it gets aLength bytes
 // or returns false
 bool RawReader::ReadFromResource(MediaResource *aResource, uint8_t* aBuf,
                                    uint32_t aLength)
 {
@@ -147,18 +145,17 @@ bool RawReader::ReadFromResource(MediaRe
   }
 
   return true;
 }
 
 bool RawReader::DecodeVideoFrame(bool &aKeyframeSkip,
                                      int64_t aTimeThreshold)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(),
-               "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   // Record number of frames decoded and parsed. Automatically update the
   // stats counters using the AutoNotifyDecoded stack-based class.
   AbstractMediaDecoder::AutoNotifyDecoded a(mDecoder);
 
   if (!mFrameSize)
     return false; // Metadata read failed.  We should refuse to play.
 
@@ -241,18 +238,17 @@ RawReader::Seek(int64_t aTime, int64_t a
     return SeekPromise::CreateAndReject(res, __func__);
   } else {
     return SeekPromise::CreateAndResolve(aTime, __func__);
   }
 }
 
 nsresult RawReader::SeekInternal(int64_t aTime)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(),
-               "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   MediaResource *resource = mDecoder->GetResource();
   NS_ASSERTION(resource, "Decoder has no media resource");
 
   uint32_t frame = mCurrentFrame;
   if (aTime >= UINT_MAX)
     return NS_ERROR_FAILURE;
   mCurrentFrame = aTime * mFrameRate / USECS_PER_S;
--- a/dom/media/systemservices/LoadManager.h
+++ b/dom/media/systemservices/LoadManager.h
@@ -68,17 +68,17 @@ private:
     int mAveragingMeasurements;
     float mHighLoadThreshold;
     float mLowLoadThreshold;
 
     static StaticRefPtr<LoadManagerSingleton> sSingleton;
 };
 
 class LoadManager final : public webrtc::CPULoadStateCallbackInvoker,
-                              public webrtc::CpuOveruseObserver
+                          public webrtc::CpuOveruseObserver
 {
 public:
     explicit LoadManager(LoadManagerSingleton* aManager)
         : mManager(aManager)
     {}
     ~LoadManager() {}
 
     void AddObserver(webrtc::CPULoadStateObserver * aObserver) override
--- a/dom/media/wave/WaveReader.cpp
+++ b/dom/media/wave/WaveReader.cpp
@@ -123,17 +123,17 @@ WaveReader::~WaveReader()
 nsresult WaveReader::Init(MediaDecoderReader* aCloneDonor)
 {
   return NS_OK;
 }
 
 nsresult WaveReader::ReadMetadata(MediaInfo* aInfo,
                                   MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   bool loaded = LoadRIFFChunk();
   if (!loaded) {
     return NS_ERROR_FAILURE;
   }
 
   nsAutoPtr<dom::HTMLMediaElement::MetadataTags> tags;
 
@@ -187,17 +187,17 @@ SignedShortToAudioSample<float>(int16_t 
 template <> inline int16_t
 SignedShortToAudioSample<int16_t>(int16_t aValue)
 {
   return aValue;
 }
 
 bool WaveReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   int64_t pos = GetPosition() - mWavePCMOffset;
   int64_t len = GetDataLength();
   int64_t remaining = len - pos;
   NS_ASSERTION(remaining >= 0, "Current wave position is greater than wave file length");
 
   static const int64_t BLOCK_SIZE = 4096;
   int64_t readSize = std::min(BLOCK_SIZE, remaining);
@@ -247,25 +247,25 @@ bool WaveReader::DecodeAudioData()
                                  mSampleRate));
 
   return true;
 }
 
 bool WaveReader::DecodeVideoFrame(bool &aKeyframeSkip,
                                       int64_t aTimeThreshold)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   return false;
 }
 
 nsRefPtr<MediaDecoderReader::SeekPromise>
 WaveReader::Seek(int64_t aTarget, int64_t aEndTime)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   LOG(PR_LOG_DEBUG, ("%p About to seek to %lld", mDecoder, aTarget));
 
   if (NS_FAILED(ResetDecode())) {
     return SeekPromise::CreateAndReject(NS_ERROR_FAILURE, __func__);
   }
   double d = BytesToTime(GetDataLength());
   NS_ASSERTION(d < INT64_MAX / USECS_PER_S, "Duration overflow");
   int64_t duration = static_cast<int64_t>(d * USECS_PER_S);
--- a/dom/media/webaudio/AudioContext.h
+++ b/dom/media/webaudio/AudioContext.h
@@ -60,17 +60,17 @@ class OscillatorNode;
 class PannerNode;
 class ScriptProcessorNode;
 class StereoPannerNode;
 class WaveShaperNode;
 class PeriodicWave;
 class Promise;
 
 class AudioContext final : public DOMEventTargetHelper,
-                               public nsIMemoryReporter
+                           public nsIMemoryReporter
 {
   AudioContext(nsPIDOMWindow* aParentWindow,
                bool aIsOffline,
                AudioChannel aChannel,
                uint32_t aNumberOfChannels = 0,
                uint32_t aLength = 0,
                float aSampleRate = 0.0f);
   ~AudioContext();
--- a/dom/media/webaudio/AudioDestinationNode.h
+++ b/dom/media/webaudio/AudioDestinationNode.h
@@ -15,19 +15,19 @@
 
 namespace mozilla {
 namespace dom {
 
 class AudioContext;
 class EventProxyHandler;
 
 class AudioDestinationNode final : public AudioNode
-                                     , public nsIDOMEventListener
-                                     , public nsIAudioChannelAgentCallback
-                                     , public MainThreadMediaStreamListener
+                                 , public nsIDOMEventListener
+                                 , public nsIAudioChannelAgentCallback
+                                 , public MainThreadMediaStreamListener
 {
 public:
   // This node type knows what MediaStreamGraph to use based on
   // whether it's in offline mode.
   AudioDestinationNode(AudioContext* aContext,
                        bool aIsOffline,
                        AudioChannel aChannel = AudioChannel::Normal,
                        uint32_t aNumberOfChannels = 0,
--- a/dom/media/webaudio/AudioParam.h
+++ b/dom/media/webaudio/AudioParam.h
@@ -16,17 +16,17 @@
 #include "WebAudioUtils.h"
 #include "js/TypeDecls.h"
 
 namespace mozilla {
 
 namespace dom {
 
 class AudioParam final : public nsWrapperCache,
-                             public AudioParamTimeline
+                         public AudioParamTimeline
 {
   virtual ~AudioParam();
 
 public:
   typedef void (*CallbackType)(AudioNode*);
 
   AudioParam(AudioNode* aNode,
              CallbackType aCallback,
--- a/dom/media/webaudio/BufferDecoder.cpp
+++ b/dom/media/webaudio/BufferDecoder.cpp
@@ -52,24 +52,24 @@ BufferDecoder::GetReentrantMonitor()
 bool
 BufferDecoder::IsShutdown() const
 {
   // BufferDecoder cannot be shut down.
   return false;
 }
 
 bool
-BufferDecoder::OnStateMachineThread() const
+BufferDecoder::OnStateMachineTaskQueue() const
 {
   // BufferDecoder doesn't have the concept of a state machine.
   return true;
 }
 
 bool
-BufferDecoder::OnDecodeThread() const
+BufferDecoder::OnDecodeTaskQueue() const
 {
   MOZ_ASSERT(mTaskQueueIdentity, "Forgot to call BeginDecoding?");
   return mTaskQueueIdentity->IsCurrentThreadIn();
 }
 
 MediaResource*
 BufferDecoder::GetResource() const
 {
--- a/dom/media/webaudio/BufferDecoder.h
+++ b/dom/media/webaudio/BufferDecoder.h
@@ -29,19 +29,19 @@ public:
 
   // This has to be called before decoding begins
   void BeginDecoding(MediaTaskQueue* aTaskQueueIdentity);
 
   virtual ReentrantMonitor& GetReentrantMonitor() final override;
 
   virtual bool IsShutdown() const final override;
 
-  virtual bool OnStateMachineThread() const final override;
+  virtual bool OnStateMachineTaskQueue() const final override;
 
-  virtual bool OnDecodeThread() const final override;
+  virtual bool OnDecodeTaskQueue() const final override;
 
   virtual MediaResource* GetResource() const final override;
 
   virtual void NotifyBytesConsumed(int64_t aBytes, int64_t aOffset) final override;
 
   virtual void NotifyDecodedFrames(uint32_t aParsed, uint32_t aDecoded,
                                    uint32_t aDropped) final override;
 
--- a/dom/media/webm/IntelWebMVideoDecoder.cpp
+++ b/dom/media/webm/IntelWebMVideoDecoder.cpp
@@ -348,17 +348,17 @@ IntelWebMVideoDecoder::DecodeVideoFrame(
       return false;
     }
     a.mParsed = a.mDropped;
     aKeyframeSkip = false;
     nsresult rv = mMediaDataDecoder->Flush();
     NS_ENSURE_SUCCESS(rv, false);
   }
 
-  NS_ASSERTION(mReader->GetDecoder()->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(mReader->OnTaskQueue());
   bool rv = Decode();
   {
     // Report the number of "decoded" frames as the difference in the
     // mNumSamplesOutput field since the last time we were called.
     MonitorAutoLock mon(mMonitor);
     uint64_t delta = mNumSamplesOutput - mLastReportedNumDecodedFrames;
     a.mDecoded = static_cast<uint32_t>(delta);
     mLastReportedNumDecodedFrames = mNumSamplesOutput;
--- a/dom/media/webm/SoftwareWebMVideoDecoder.cpp
+++ b/dom/media/webm/SoftwareWebMVideoDecoder.cpp
@@ -69,18 +69,17 @@ SoftwareWebMVideoDecoder::Init(unsigned 
   }
   return NS_OK;
 }
 
 bool
 SoftwareWebMVideoDecoder::DecodeVideoFrame(bool &aKeyframeSkip,
                                            int64_t aTimeThreshold)
 {
-  NS_ASSERTION(mReader->GetDecoder()->OnDecodeThread(),
-               "Should be on decode thread.");
+  MOZ_ASSERT(mReader->OnTaskQueue());
 
   // Record number of frames decoded and parsed. Automatically update the
   // stats counters using the AutoNotifyDecoded stack-based class.
   AbstractMediaDecoder::AutoNotifyDecoded a(mReader->GetDecoder());
 
   nsAutoRef<NesteggPacketHolder> holder(mReader->NextPacket(WebMReader::VIDEO));
   if (!holder) {
     return false;
--- a/dom/media/webm/WebMReader.cpp
+++ b/dom/media/webm/WebMReader.cpp
@@ -324,17 +324,20 @@ void WebMReader::Cleanup()
     nestegg_destroy(mContext);
     mContext = nullptr;
   }
 }
 
 nsresult WebMReader::ReadMetadata(MediaInfo* aInfo,
                                   MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  // We can't use OnTaskQueue() here because of the wacky initialization task
+  // queue that TrackBuffer uses. We should be able to fix this when we do
+  // bug 1148234.
+  MOZ_ASSERT(mDecoder->OnDecodeTaskQueue());
 
   nestegg_io io;
   io.read = webm_read;
   io.seek = webm_seek;
   io.tell = webm_tell;
   io.userdata = mDecoder;
   int64_t maxOffset = mDecoder->HasInitializationData() ?
     mBufferedState->GetInitEndOffset() : -1;
@@ -578,17 +581,17 @@ bool WebMReader::InitOpusDecoder()
   mSkip = mOpusParser->mPreSkip;
   mPaddingDiscarded = false;
 
   return r == OPUS_OK;
 }
 
 bool WebMReader::DecodeAudioPacket(nestegg_packet* aPacket, int64_t aOffset)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   int r = 0;
   unsigned int count = 0;
   r = nestegg_packet_count(aPacket, &count);
   if (r == -1) {
     return false;
   }
 
@@ -926,17 +929,17 @@ nsReturnRef<NesteggPacketHolder> WebMRea
     } while (true);
   }
 
   return holder.out();
 }
 
 bool WebMReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   nsAutoRef<NesteggPacketHolder> holder(NextPacket(AUDIO));
   if (!holder) {
     return false;
   }
 
   return DecodeAudioPacket(holder->mPacket, holder->mOffset);
 }
@@ -1059,17 +1062,17 @@ WebMReader::Seek(int64_t aTarget, int64_
     return SeekPromise::CreateAndReject(res, __func__);
   } else {
     return SeekPromise::CreateAndResolve(aTarget, __func__);
   }
 }
 
 nsresult WebMReader::SeekInternal(int64_t aTarget)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   if (mVideoDecoder) {
     nsresult rv = mVideoDecoder->Flush();
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   LOG(PR_LOG_DEBUG, ("Reader [%p] for Decoder [%p]: About to seek to %fs",
                      this, mDecoder, double(aTarget) / USECS_PER_S));
   if (NS_FAILED(ResetDecode())) {
--- a/dom/media/webm/WebMReader.h
+++ b/dom/media/webm/WebMReader.h
@@ -138,23 +138,23 @@ public:
   virtual nsresult ResetDecode() override;
   virtual bool DecodeAudioData() override;
 
   virtual bool DecodeVideoFrame(bool &aKeyframeSkip,
                                 int64_t aTimeThreshold) override;
 
   virtual bool HasAudio() override
   {
-    NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+    MOZ_ASSERT(OnTaskQueue());
     return mHasAudio;
   }
 
   virtual bool HasVideo() override
   {
-    NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+    MOZ_ASSERT(OnTaskQueue());
     return mHasVideo;
   }
 
   virtual nsresult ReadMetadata(MediaInfo* aInfo,
                                 MetadataTags** aTags) override;
   virtual nsRefPtr<SeekPromise>
   Seek(int64_t aTime, int64_t aEndTime) override;
 
--- a/dom/media/webspeech/recognition/SpeechGrammar.h
+++ b/dom/media/webspeech/recognition/SpeechGrammar.h
@@ -17,17 +17,17 @@
 #include "mozilla/ErrorResult.h"
 
 namespace mozilla {
 namespace dom {
 
 class GlobalObject;
 
 class SpeechGrammar final : public nsISupports,
-                                public nsWrapperCache
+                            public nsWrapperCache
 {
 public:
   explicit SpeechGrammar(nsISupports* aParent);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechGrammar)
 
   nsISupports* GetParentObject() const;
--- a/dom/media/webspeech/recognition/SpeechGrammarList.h
+++ b/dom/media/webspeech/recognition/SpeechGrammarList.h
@@ -21,17 +21,17 @@ class ErrorResult;
 
 namespace dom {
 
 class GlobalObject;
 class SpeechGrammar;
 template<typename> class Optional;
 
 class SpeechGrammarList final : public nsISupports,
-                                    public nsWrapperCache
+                                public nsWrapperCache
 {
 public:
   explicit SpeechGrammarList(nsISupports* aParent, nsISpeechRecognitionService* aRecognitionService);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechGrammarList)
 
   static already_AddRefed<SpeechGrammarList> Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
--- a/dom/media/webspeech/recognition/SpeechRecognition.h
+++ b/dom/media/webspeech/recognition/SpeechRecognition.h
@@ -51,18 +51,18 @@ PRLogModuleInfo* GetSpeechRecognitionLog
 #define SR_LOG(...) PR_LOG(GetSpeechRecognitionLog(), PR_LOG_DEBUG, (__VA_ARGS__))
 #else
 #define SR_LOG(...)
 #endif
 
 already_AddRefed<nsISpeechRecognitionService> GetSpeechRecognitionService();
 
 class SpeechRecognition final : public DOMEventTargetHelper,
-                                    public nsIObserver,
-                                    public SupportsWeakPtr<SpeechRecognition>
+                                public nsIObserver,
+                                public SupportsWeakPtr<SpeechRecognition>
 {
 public:
   MOZ_DECLARE_REFCOUNTED_TYPENAME(SpeechRecognition)
   explicit SpeechRecognition(nsPIDOMWindow* aOwnerWindow);
 
   NS_DECL_ISUPPORTS_INHERITED
 
   NS_DECL_NSIOBSERVER
--- a/dom/media/webspeech/recognition/SpeechRecognitionAlternative.h
+++ b/dom/media/webspeech/recognition/SpeechRecognitionAlternative.h
@@ -16,17 +16,17 @@
 #include "mozilla/Attributes.h"
 
 namespace mozilla {
 namespace dom {
 
 class SpeechRecognition;
 
 class SpeechRecognitionAlternative final : public nsISupports,
-                                               public nsWrapperCache
+                                           public nsWrapperCache
 {
 public:
   explicit SpeechRecognitionAlternative(SpeechRecognition* aParent);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionAlternative)
 
   nsISupports* GetParentObject() const;
--- a/dom/media/webspeech/recognition/SpeechRecognitionResult.h
+++ b/dom/media/webspeech/recognition/SpeechRecognitionResult.h
@@ -17,17 +17,17 @@
 #include "mozilla/Attributes.h"
 
 #include "SpeechRecognitionAlternative.h"
 
 namespace mozilla {
 namespace dom {
 
 class SpeechRecognitionResult final : public nsISupports,
-                                          public nsWrapperCache
+                                      public nsWrapperCache
 {
 public:
   explicit SpeechRecognitionResult(SpeechRecognition* aParent);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionResult)
 
   nsISupports* GetParentObject() const;
--- a/dom/media/webspeech/recognition/SpeechRecognitionResultList.h
+++ b/dom/media/webspeech/recognition/SpeechRecognitionResultList.h
@@ -18,17 +18,17 @@
 #include "SpeechRecognitionResult.h"
 
 namespace mozilla {
 namespace dom {
 
 class SpeechRecognition;
 
 class SpeechRecognitionResultList final : public nsISupports,
-                                              public nsWrapperCache
+                                          public nsWrapperCache
 {
 public:
   explicit SpeechRecognitionResultList(SpeechRecognition* aParent);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechRecognitionResultList)
 
   nsISupports* GetParentObject() const;
--- a/dom/media/webspeech/synth/SpeechSynthesis.h
+++ b/dom/media/webspeech/synth/SpeechSynthesis.h
@@ -19,17 +19,17 @@
 class nsIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class nsSpeechTask;
 
 class SpeechSynthesis final : public nsISupports,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
 public:
   explicit SpeechSynthesis(nsPIDOMWindow* aParent);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SpeechSynthesis)
 
   nsIDOMWindow* GetParentObject() const;
--- a/dom/media/webspeech/synth/SpeechSynthesisVoice.h
+++ b/dom/media/webspeech/synth/SpeechSynthesisVoice.h
@@ -16,17 +16,17 @@
 
 namespace mozilla {
 namespace dom {
 
 class nsSynthVoiceRegistry;
 class SpeechSynthesis;
 
 class SpeechSynthesisVoice final : public nsISupports,
-                                       public nsWrapperCache
+                                   public nsWrapperCache
 {
   friend class nsSynthVoiceRegistry;
   friend class SpeechSynthesis;
 
 public:
   SpeechSynthesisVoice(nsISupports* aParent, const nsAString& aUri);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
--- a/dom/media/wmf/WMFByteStream.h
+++ b/dom/media/wmf/WMFByteStream.h
@@ -29,17 +29,17 @@ class SharedThreadPool;
 // using Read().
 //
 // Note: This implementation attempts to be bug-compatible with Windows Media
 //       Foundation's implementation of IMFByteStream. The behaviour of WMF's
 //       IMFByteStream was determined by creating it and testing the edge cases.
 //       For details see the test code at:
 //       https://github.com/cpearce/IMFByteStreamBehaviour/
 class WMFByteStream final : public IMFByteStream
-                              , public IMFAttributes
+                          , public IMFAttributes
 {
   ~WMFByteStream();
 
 public:
   WMFByteStream(MediaResource* aResource, WMFSourceReaderCallback* aCallback);
 
   nsresult Init();
   nsresult Shutdown();
--- a/dom/media/wmf/WMFReader.cpp
+++ b/dom/media/wmf/WMFReader.cpp
@@ -149,24 +149,24 @@ WMFReader::Init(MediaDecoderReader* aClo
   }
 
   return NS_OK;
 }
 
 bool
 WMFReader::HasAudio()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   return mHasAudio;
 }
 
 bool
 WMFReader::HasVideo()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
   return mHasVideo;
 }
 
 static HRESULT
 ConfigureSourceReaderStream(IMFSourceReader *aReader,
                             const DWORD aStreamIndex,
                             const GUID& aOutputSubType,
                             const GUID* aAllowedInSubTypes,
@@ -502,17 +502,17 @@ WMFReader::CreateSourceReader()
   }
   return hr;
 }
 
 nsresult
 WMFReader::ReadMetadata(MediaInfo* aInfo,
                         MetadataTags** aTags)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   DECODER_LOG("WMFReader::ReadMetadata()");
   HRESULT hr;
 
   const bool triedToInitDXVA = mUseHwAccel;
   if (FAILED(CreateSourceReader())) {
     mSourceReader = nullptr;
     if (triedToInitDXVA && !mUseHwAccel) {
@@ -570,17 +570,17 @@ WMFReader::IsMediaSeekable()
     return false;
   }
   return true;
 }
 
 bool
 WMFReader::DecodeAudioData()
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   HRESULT hr;
   hr = mSourceReader->ReadSample(MF_SOURCE_READER_FIRST_AUDIO_STREAM,
                                  0, // control flags
                                  0, // read stream index
                                  nullptr,
                                  nullptr,
                                  nullptr);
@@ -799,17 +799,17 @@ WMFReader::CreateD3DVideoFrame(IMFSample
 
   return S_OK;
 }
 
 bool
 WMFReader::DecodeVideoFrame(bool &aKeyframeSkip,
                             int64_t aTimeThreshold)
 {
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 
   // Record number of frames decoded and parsed. Automatically update the
   // stats counters using the AutoNotifyDecoded stack-based class.
   AbstractMediaDecoder::AutoNotifyDecoded a(mDecoder);
 
   HRESULT hr;
 
   hr = mSourceReader->ReadSample(MF_SOURCE_READER_FIRST_VIDEO_STREAM,
@@ -904,17 +904,17 @@ WMFReader::Seek(int64_t aTargetUs, int64
   }
 }
 
 nsresult
 WMFReader::SeekInternal(int64_t aTargetUs)
 {
   DECODER_LOG("WMFReader::Seek() %lld", aTargetUs);
 
-  NS_ASSERTION(mDecoder->OnDecodeThread(), "Should be on decode thread.");
+  MOZ_ASSERT(OnTaskQueue());
 #ifdef DEBUG
   bool canSeek = false;
   GetSourceReaderCanSeek(mSourceReader, canSeek);
   NS_ASSERTION(canSeek, "WMFReader::Seek() should only be called if we can seek!");
 #endif
 
   nsresult rv = ResetDecode();
   NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/mobileconnection/MobileCellInfo.h
+++ b/dom/mobileconnection/MobileCellInfo.h
@@ -10,17 +10,17 @@
 #include "nsIMobileCellInfo.h"
 #include "nsPIDOMWindow.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
 class MobileCellInfo final : public nsIMobileCellInfo
-                               , public nsWrapperCache
+                           , public nsWrapperCache
 {
 public:
   NS_DECL_NSIMOBILECELLINFO
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileCellInfo)
 
   explicit MobileCellInfo(nsPIDOMWindow* aWindow);
 
--- a/dom/mobileconnection/MobileConnectionArray.h
+++ b/dom/mobileconnection/MobileConnectionArray.h
@@ -9,17 +9,17 @@
 
 #include "mozilla/dom/MobileConnection.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
 class MobileConnectionArray final : public nsISupports
-                                      , public nsWrapperCache
+                                  , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileConnectionArray)
 
   explicit MobileConnectionArray(nsPIDOMWindow* aWindow);
 
   nsPIDOMWindow*
--- a/dom/mobileconnection/MobileConnectionInfo.h
+++ b/dom/mobileconnection/MobileConnectionInfo.h
@@ -13,17 +13,17 @@
 #include "nsIMobileConnectionInfo.h"
 #include "nsPIDOMWindow.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
 class MobileConnectionInfo final : public nsIMobileConnectionInfo
-                                     , public nsWrapperCache
+                                 , public nsWrapperCache
 {
 public:
   NS_DECL_NSIMOBILECONNECTIONINFO
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileConnectionInfo)
 
   explicit MobileConnectionInfo(nsPIDOMWindow* aWindow);
 
--- a/dom/mobileconnection/MobileNetworkInfo.h
+++ b/dom/mobileconnection/MobileNetworkInfo.h
@@ -13,17 +13,17 @@
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
 class GlobalObject;
 
 class MobileNetworkInfo final : public nsIMobileNetworkInfo
-                                  , public nsWrapperCache
+                              , public nsWrapperCache
 {
 public:
   NS_DECL_NSIMOBILENETWORKINFO
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MobileNetworkInfo)
 
   explicit MobileNetworkInfo(nsPIDOMWindow* aWindow);
 
--- a/dom/mobileconnection/ipc/MobileConnectionChild.h
+++ b/dom/mobileconnection/ipc/MobileConnectionChild.h
@@ -21,17 +21,17 @@ namespace mobileconnection {
 
 /**
  * Child actor of PMobileConnection. The object is created by
  * MobileConnectionIPCService and destroyed after MobileConnectionIPCService is
  * shutdown. For multi-sim device, more than one instance will
  * be created and each instance represents a sim slot.
  */
 class MobileConnectionChild final : public PMobileConnectionChild
-                                      , public nsIMobileConnection
+                                  , public nsIMobileConnection
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIMOBILECONNECTION
 
   explicit MobileConnectionChild(uint32_t aServiceId);
 
   void
--- a/dom/mobilemessage/MobileMessageManager.h
+++ b/dom/mobilemessage/MobileMessageManager.h
@@ -21,17 +21,17 @@ class DOMRequest;
 class DOMCursor;
 struct MmsParameters;
 struct MmsSendParameters;
 struct MobileMessageFilter;
 class OwningLongOrMozSmsMessageOrMozMmsMessage;
 struct SmsSendParameters;
 
 class MobileMessageManager final : public DOMEventTargetHelper
-                                     , public nsIObserver
+                                 , public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIOBSERVER
 
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
 
   explicit MobileMessageManager(nsPIDOMWindow* aWindow);
--- a/dom/mobilemessage/ipc/SmsIPCService.h
+++ b/dom/mobilemessage/ipc/SmsIPCService.h
@@ -14,19 +14,19 @@
 
 namespace mozilla {
 namespace dom {
 namespace mobilemessage {
 
 class PSmsChild;
 
 class SmsIPCService final : public nsISmsService
-                              , public nsIMmsService
-                              , public nsIMobileMessageDatabaseService
-                              , public nsIObserver
+                          , public nsIMmsService
+                          , public nsIMobileMessageDatabaseService
+                          , public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISMSSERVICE
   NS_DECL_NSIMMSSERVICE
   NS_DECL_NSIMOBILEMESSAGEDATABASESERVICE
   NS_DECL_NSIOBSERVER
 
--- a/dom/network/Connection.h
+++ b/dom/network/Connection.h
@@ -18,18 +18,18 @@ namespace mozilla {
 namespace hal {
 class NetworkInformation;
 } // namespace hal
 
 namespace dom {
 namespace network {
 
 class Connection final : public DOMEventTargetHelper
-                           , public NetworkObserver
-                           , public nsINetworkProperties
+                       , public NetworkObserver
+                       , public nsINetworkProperties
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSINETWORKPROPERTIES
 
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
 
   explicit Connection(nsPIDOMWindow *aWindow);
--- a/dom/network/UDPSocket.h
+++ b/dom/network/UDPSocket.h
@@ -20,18 +20,18 @@ struct JSContext;
 
 namespace mozilla {
 namespace dom {
 
 struct UDPOptions;
 class StringOrBlobOrArrayBufferOrArrayBufferView;
 
 class UDPSocket final : public DOMEventTargetHelper
-                          , public nsIUDPSocketListener
-                          , public nsIUDPSocketInternal
+                      , public nsIUDPSocketListener
+                      , public nsIUDPSocketInternal
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(UDPSocket, DOMEventTargetHelper)
   NS_DECL_NSIUDPSOCKETLISTENER
   NS_DECL_NSIUDPSOCKETINTERNAL
   NS_REALLY_FORWARD_NSIDOMEVENTTARGET(DOMEventTargetHelper)
 
--- a/dom/nfc/MozNDEFRecord.h
+++ b/dom/nfc/MozNDEFRecord.h
@@ -26,17 +26,17 @@ struct JSContext;
 struct JSStructuredCloneWriter;
 
 namespace mozilla {
 namespace dom {
 
 class MozNDEFRecordOptions;
 
 class MozNDEFRecord final : public nsISupports,
-                                public nsWrapperCache
+                            public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MozNDEFRecord)
 
 public:
   MozNDEFRecord(nsISupports* aParent, TNF aTnf = TNF::Empty);
 
--- a/dom/nfc/gonk/NfcService.h
+++ b/dom/nfc/gonk/NfcService.h
@@ -14,17 +14,17 @@
 class nsIThread;
 
 namespace mozilla {
 namespace dom {
 class NfcEventOptions;
 } // namespace dom
 
 class NfcService final : public nsINfcService,
-                             public mozilla::ipc::NfcSocketListener
+                         public mozilla::ipc::NfcSocketListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSINFCSERVICE
 
   static already_AddRefed<NfcService> FactoryCreate();
 
   void DispatchNfcEvent(const mozilla::dom::NfcEventOptions& aOptions);
--- a/dom/notification/DesktopNotification.h
+++ b/dom/notification/DesktopNotification.h
@@ -30,17 +30,17 @@ namespace dom {
 class AlertServiceObserver;
 class DesktopNotification;
 
 /*
  * DesktopNotificationCenter
  * Object hangs off of the navigator object and hands out DesktopNotification objects
  */
 class DesktopNotificationCenter final : public nsISupports,
-                                            public nsWrapperCache
+                                        public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DesktopNotificationCenter)
 
   explicit DesktopNotificationCenter(nsPIDOMWindow* aWindow)
   {
     MOZ_ASSERT(aWindow);
--- a/dom/offline/nsDOMOfflineResourceList.h
+++ b/dom/offline/nsDOMOfflineResourceList.h
@@ -30,20 +30,20 @@ class nsIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 class DOMStringList;
 } // namespace dom
 } // namespace mozilla
 
 class nsDOMOfflineResourceList final : public mozilla::DOMEventTargetHelper,
-                                           public nsIDOMOfflineResourceList,
-                                           public nsIObserver,
-                                           public nsIOfflineCacheUpdateObserver,
-                                           public nsSupportsWeakReference
+                                       public nsIDOMOfflineResourceList,
+                                       public nsIObserver,
+                                       public nsIOfflineCacheUpdateObserver,
+                                       public nsSupportsWeakReference
 {
   typedef mozilla::ErrorResult ErrorResult;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMOFFLINERESOURCELIST
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIOFFLINECACHEUPDATEOBSERVER
--- a/dom/plugins/base/nsPluginHost.h
+++ b/dom/plugins/base/nsPluginHost.h
@@ -66,19 +66,19 @@ public:
   int64_t     mLastModifiedTime;
   bool        mSeen;
 
   nsRefPtr<nsInvalidPluginTag> mPrev;
   nsRefPtr<nsInvalidPluginTag> mNext;
 };
 
 class nsPluginHost final : public nsIPluginHost,
-                               public nsIObserver,
-                               public nsITimerCallback,
-                               public nsSupportsWeakReference
+                           public nsIObserver,
+                           public nsITimerCallback,
+                           public nsSupportsWeakReference
 {
   friend class nsPluginTag;
   virtual ~nsPluginHost();
 
 public:
   nsPluginHost();
 
   static already_AddRefed<nsPluginHost> GetInst();
--- a/dom/plugins/base/nsPluginInstanceOwner.h
+++ b/dom/plugins/base/nsPluginInstanceOwner.h
@@ -45,19 +45,19 @@ class gfxXlibSurface;
 #ifdef MOZ_WIDGET_QT
 #include "gfxQtNativeRenderer.h"
 #else
 #include "gfxXlibNativeRenderer.h"
 #endif
 #endif
 
 class nsPluginInstanceOwner final : public nsIPluginInstanceOwner,
-                                        public nsIDOMEventListener,
-                                        public nsIPrivacyTransitionObserver,
-                                        public nsSupportsWeakReference
+                                    public nsIDOMEventListener,
+                                    public nsIPrivacyTransitionObserver,
+                                    public nsSupportsWeakReference
 {
 public:
   nsPluginInstanceOwner();
   
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPLUGININSTANCEOWNER
   NS_DECL_NSIPRIVACYTRANSITIONOBSERVER
   
deleted file mode 100644
--- a/dom/plugins/ipc/COMMessageFilter.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "base/basictypes.h"
-
-#include "COMMessageFilter.h"
-#include "base/message_loop.h"
-#include "mozilla/plugins/PluginModuleChild.h"
-
-#include <stdio.h>
-
-namespace mozilla {
-namespace plugins {
-
-HRESULT
-COMMessageFilter::QueryInterface(REFIID riid, void** ppv)
-{
-  if (riid == IID_IUnknown || riid == IID_IMessageFilter) {
-    *ppv = static_cast<IMessageFilter*>(this);
-    AddRef();
-    return S_OK;
-  }
-  return E_NOINTERFACE;
-}
-
-DWORD COMMessageFilter::AddRef()
-{
-  ++mRefCnt;
-  return mRefCnt;
-}
-
-DWORD COMMessageFilter::Release()
-{
-  DWORD r = --mRefCnt;
-  if (0 == r)
-    delete this;
-  return r;
-}
-
-DWORD 
-COMMessageFilter::HandleInComingCall(DWORD dwCallType,
-				     HTASK htaskCaller,
-				     DWORD dwTickCount,
-				     LPINTERFACEINFO lpInterfaceInfo)
-{
-  if (mPreviousFilter)
-    return mPreviousFilter->HandleInComingCall(dwCallType, htaskCaller,
-					       dwTickCount, lpInterfaceInfo);
-  return SERVERCALL_ISHANDLED;
-}
-
-DWORD
-COMMessageFilter::RetryRejectedCall(HTASK htaskCallee,
-				    DWORD dwTickCount,
-				    DWORD dwRejectType)
-{
-  if (mPreviousFilter)
-    return mPreviousFilter->RetryRejectedCall(htaskCallee, dwTickCount,
-					      dwRejectType);
-  return -1;
-}
-
-DWORD
-COMMessageFilter::MessagePending(HTASK htaskCallee,
-				 DWORD dwTickCount,
-				 DWORD dwPendingType)
-{
-  mPlugin->FlushPendingInterruptQueue();
-  if (mPreviousFilter)
-    return mPreviousFilter->MessagePending(htaskCallee, dwTickCount,
-					   dwPendingType);
-  return PENDINGMSG_WAITNOPROCESS;
-}
-
-void
-COMMessageFilter::Initialize(PluginModuleChild* module)
-{
-  nsRefPtr<COMMessageFilter> f = new COMMessageFilter(module);
-  ::CoRegisterMessageFilter(f, getter_AddRefs(f->mPreviousFilter));
-}
-
-} // namespace plugins
-} // namespace mozilla
deleted file mode 100644
--- a/dom/plugins/ipc/COMMessageFilter.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_plugins_COMMessageFilter_h
-#define mozilla_plugins_COMMessageFilter_h
-
-#include <objidl.h>
-#include "nsISupportsImpl.h"
-#include "nsAutoPtr.h"
-
-namespace mozilla {
-namespace plugins {
-
-class PluginModuleChild;
-
-class COMMessageFilter final : public IMessageFilter
-{
-public:
-  static void Initialize(PluginModuleChild* plugin);
-
-  COMMessageFilter(PluginModuleChild* plugin)
-    : mPlugin(plugin)
-  { }
-
-  HRESULT WINAPI QueryInterface(REFIID riid, void** ppv);
-  DWORD WINAPI AddRef();
-  DWORD WINAPI Release();
-
-  DWORD WINAPI HandleInComingCall(DWORD dwCallType,
-                                  HTASK htaskCaller,
-                                  DWORD dwTickCount,
-                                  LPINTERFACEINFO lpInterfaceInfo);
-  DWORD WINAPI RetryRejectedCall(HTASK htaskCallee,
-                                 DWORD dwTickCount,
-                                 DWORD dwRejectType);
-  DWORD WINAPI MessagePending(HTASK htaskCallee,
-                              DWORD dwTickCount,
-                              DWORD dwPendingType);
-
-private:
-  nsAutoRefCnt mRefCnt;
-  PluginModuleChild* mPlugin;
-  nsRefPtr<IMessageFilter> mPreviousFilter;
-};
-
-} // namespace plugins
-} // namespace mozilla
-
-#endif // COMMessageFilter_h
--- a/dom/plugins/ipc/PluginModuleChild.cpp
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -37,17 +37,16 @@
 #include "mozilla/plugins/StreamNotifyChild.h"
 #include "mozilla/plugins/BrowserStreamChild.h"
 #include "mozilla/plugins/PluginStreamChild.h"
 #include "mozilla/dom/CrashReporterChild.h"
 
 #include "nsNPAPIPlugin.h"
 
 #ifdef XP_WIN
-#include "COMMessageFilter.h"
 #include "nsWindowsDllInterceptor.h"
 #include "mozilla/widget/AudioSession.h"
 #endif
 
 #ifdef MOZ_WIDGET_COCOA
 #include "PluginInterposeOSX.h"
 #include "PluginUtilsOSX.h"
 #endif
@@ -259,20 +258,16 @@ PluginModuleChild::RecvDisableFlashProte
 }
 
 bool
 PluginModuleChild::InitForChrome(const std::string& aPluginFilename,
                                  base::ProcessHandle aParentProcessHandle,
                                  MessageLoop* aIOLoop,
                                  IPC::Channel* aChannel)
 {
-#ifdef XP_WIN
-    COMMessageFilter::Initialize(this);
-#endif
-
     NS_ASSERTION(aChannel, "need a channel");
 
     if (!InitGraphics())
         return false;
 
     mPluginFilename = aPluginFilename.c_str();
     nsCOMPtr<nsIFile> localFile;
     NS_NewLocalFile(NS_ConvertUTF8toUTF16(mPluginFilename),
--- a/dom/plugins/ipc/PluginModuleParent.cpp
+++ b/dom/plugins/ipc/PluginModuleParent.cpp
@@ -2896,17 +2896,17 @@ PluginModuleChromeParent::OnCrash(DWORD 
         KillProcess(OtherProcess(), 1, false);
     }
 }
 
 #endif // MOZ_CRASHREPORTER_INJECTOR
 
 #ifdef MOZ_ENABLE_PROFILER_SPS
 class PluginProfilerObserver final : public nsIObserver,
-                                         public nsSupportsWeakReference
+                                     public nsSupportsWeakReference
 {
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIOBSERVER
 
     explicit PluginProfilerObserver(PluginModuleParent* pmp)
       : mPmp(pmp)
     {}
--- a/dom/plugins/ipc/moz.build
+++ b/dom/plugins/ipc/moz.build
@@ -45,17 +45,16 @@ EXPORTS.mozilla.plugins += [
     'TaskFactory.h',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     EXPORTS.mozilla.plugins += [
         'PluginSurfaceParent.h',
     ]
     UNIFIED_SOURCES += [
-        'COMMessageFilter.cpp',
         'PluginHangUIParent.cpp',
         'PluginSurfaceParent.cpp',
     ]
     SOURCES += [
         'MiniShmParent.cpp', # Issues with CreateEvent
     ]
     DEFINES['MOZ_HANGUI_PROCESS_NAME'] = '"plugin-hang-ui%s"' % CONFIG['BIN_SUFFIX']
     LOCAL_INCLUDES += [
--- a/dom/power/PowerManager.h
+++ b/dom/power/PowerManager.h
@@ -17,17 +17,17 @@
 class nsPIDOMWindow;
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
 
 class PowerManager final : public nsIDOMMozWakeLockListener
-                             , public nsWrapperCache
+                         , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PowerManager)
   NS_DECL_NSIDOMMOZWAKELOCKLISTENER
 
   nsresult Init(nsIDOMWindow *aWindow);
   nsresult Shutdown();
--- a/dom/presentation/PresentationDeviceManager.h
+++ b/dom/presentation/PresentationDeviceManager.h
@@ -11,19 +11,19 @@
 #include "nsIPresentationDeviceManager.h"
 #include "nsIPresentationDeviceProvider.h"
 #include "nsCOMArray.h"
 
 namespace mozilla {
 namespace dom {
 
 class PresentationDeviceManager final : public nsIPresentationDeviceManager
-                                          , public nsIPresentationDeviceListener
-                                          , public nsIPresentationDeviceEventListener
-                                          , public nsIObserver
+                                      , public nsIPresentationDeviceListener
+                                      , public nsIPresentationDeviceEventListener
+                                      , public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIPRESENTATIONDEVICEMANAGER
   NS_DECL_NSIPRESENTATIONDEVICELISTENER
   NS_DECL_NSIPRESENTATIONDEVICEEVENTLISTENER
   NS_DECL_NSIOBSERVER
 
--- a/dom/promise/PromiseCallback.cpp
+++ b/dom/promise/PromiseCallback.cpp
@@ -260,17 +260,16 @@ WrapperPromiseCallback::Call(JSContext* 
           if (script) {
             fileName = JS_GetScriptFilename(script);
             lineNumber = JS_GetScriptBaseLineNumber(aCx, script);
           }
         }
       }
 
       // We're back in aValue's compartment here.
-      JS::Rooted<JSString*> stack(aCx, JS_GetEmptyString(JS_GetRuntime(aCx)));
       JS::Rooted<JSString*> fn(aCx, JS_NewStringCopyZ(aCx, fileName));
       if (!fn) {
         // Out of memory. Promise will stay unresolved.
         JS_ClearPendingException(aCx);
         return;
       }
 
       JS::Rooted<JSString*> message(aCx,
@@ -278,17 +277,17 @@ WrapperPromiseCallback::Call(JSContext* 
           "then() cannot return same Promise that it resolves."));
       if (!message) {
         // Out of memory. Promise will stay unresolved.
         JS_ClearPendingException(aCx);
         return;
       }
 
       JS::Rooted<JS::Value> typeError(aCx);
-      if (!JS::CreateError(aCx, JSEXN_TYPEERR, stack, fn, lineNumber, 0,
+      if (!JS::CreateError(aCx, JSEXN_TYPEERR, JS::NullPtr(), fn, lineNumber, 0,
                            nullptr, message, &typeError)) {
         // Out of memory. Promise will stay unresolved.
         JS_ClearPendingException(aCx);
         return;
       }
 
       mNextPromise->RejectInternal(aCx, typeError);
       return;
--- a/dom/quota/QuotaManager.cpp
+++ b/dom/quota/QuotaManager.cpp
@@ -258,18 +258,18 @@ private:
 // certain origin. Created when nsIQuotaManager::GetUsageForURI is called.
 // May be canceled with nsIQuotaRequest::Cancel. Runs three times, first
 // on the main thread, next on the IO thread, and then finally again on the main
 // thread. While on the IO thread the runnable will calculate the size of all
 // files in the origin's directory before dispatching itself back to the main
 // thread. When on the main thread the runnable will call the callback and then
 // notify the QuotaManager that the job has been completed.
 class AsyncUsageRunnable final : public UsageInfo,
-                                     public nsRunnable,
-                                     public nsIQuotaRequest
+                                 public nsRunnable,
+                                 public nsIQuotaRequest
 {
   enum CallbackState {
     // Not yet run.
     Pending = 0,
 
     // Running on the main thread in the callback for OpenAllowed.
     OpenAllowed,
 
--- a/dom/quota/QuotaManager.h
+++ b/dom/quota/QuotaManager.h
@@ -64,17 +64,17 @@ struct OriginParams
   { }
 
   nsCString mOrigin;
   PersistenceType mPersistenceType;
   bool mIsApp;
 };
 
 class QuotaManager final : public nsIQuotaManager,
-                               public nsIObserver
+                           public nsIObserver
 {
   friend class AsyncUsageRunnable;
   friend class CollectOriginsHelper;
   friend class FinalizeOriginEvictionRunnable;
   friend class GroupInfo;
   friend class OriginClearRunnable;
   friend class OriginInfo;
   friend class QuotaObject;
--- a/dom/quota/nsIOfflineStorage.h
+++ b/dom/quota/nsIOfflineStorage.h
@@ -81,26 +81,26 @@ protected:
   PersistenceType mPersistenceType;
   nsCString mGroup;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsIOfflineStorage, NS_OFFLINESTORAGE_IID)
 
 #define NS_DECL_NSIOFFLINESTORAGE                                              \
   NS_IMETHOD_(const nsACString&)                                               \
-  Id() override;                                                           \
+  Id() override;                                                               \
                                                                                \
   NS_IMETHOD_(Client*)                                                         \
-  GetClient() override;                                                    \
+  GetClient() override;                                                        \
                                                                                \
   NS_IMETHOD_(bool)                                                            \
-  IsOwnedByProcess(ContentParent* aOwner) override;                        \
+  IsOwnedByProcess(ContentParent* aOwner) override;                            \
                                                                                \
   NS_IMETHOD_(const nsACString&)                                               \
-  Origin() override;                                                       \
+  Origin() override;                                                           \
                                                                                \
   NS_IMETHOD_(nsresult)                                                        \
-  Close() override;                                                        \
+  Close() override;                                                            \
                                                                                \
   NS_IMETHOD_(void)                                                            \
   Invalidate() override;
 
 #endif // nsIOfflineStorage_h__
--- a/dom/requestsync/RequestSyncWifiService.h
+++ b/dom/requestsync/RequestSyncWifiService.h
@@ -10,17 +10,17 @@
 #include "mozilla/dom/network/Types.h"
 #include "mozilla/Hal.h"
 #include "nsIObserver.h"
 
 namespace mozilla {
 namespace dom {
 
 class RequestSyncWifiService final : public nsISupports
-                                       , public NetworkObserver
+                                   , public NetworkObserver
 {
 public:
   NS_DECL_ISUPPORTS
 
   static void Init();
 
   static already_AddRefed<RequestSyncWifiService> GetInstance();
 
--- a/dom/security/nsCORSListenerProxy.cpp
+++ b/dom/security/nsCORSListenerProxy.cpp
@@ -912,18 +912,18 @@ nsCORSListenerProxy::UpdateChannel(nsICh
 }
 
 //////////////////////////////////////////////////////////////////////////
 // Preflight proxy
 
 // Class used as streamlistener and notification callback when
 // doing the initial OPTIONS request for a CORS check
 class nsCORSPreflightListener final : public nsIStreamListener,
-                                          public nsIInterfaceRequestor,
-                                          public nsIChannelEventSink
+                                      public nsIInterfaceRequestor,
+                                      public nsIChannelEventSink
 {
 public:
   nsCORSPreflightListener(nsIChannel* aOuterChannel,
                           nsIStreamListener* aOuterListener,
                           nsISupports* aOuterContext,
                           nsIPrincipal* aReferrerPrincipal,
                           const nsACString& aRequestMethod,
                           bool aWithCredentials)
--- a/dom/security/nsCORSListenerProxy.h
+++ b/dom/security/nsCORSListenerProxy.h
@@ -25,19 +25,19 @@ nsresult
 NS_StartCORSPreflight(nsIChannel* aRequestChannel,
                       nsIStreamListener* aListener,
                       nsIPrincipal* aPrincipal,
                       bool aWithCredentials,
                       nsTArray<nsCString>& aACUnsafeHeaders,
                       nsIChannel** aPreflightChannel);
 
 class nsCORSListenerProxy final : public nsIStreamListener,
-                                      public nsIInterfaceRequestor,
-                                      public nsIChannelEventSink,
-                                      public nsIAsyncVerifyRedirectCallback
+                                  public nsIInterfaceRequestor,
+                                  public nsIChannelEventSink,
+                                  public nsIAsyncVerifyRedirectCallback
 {
 public:
   nsCORSListenerProxy(nsIStreamListener* aOuter,
                       nsIPrincipal* aRequestingPrincipal,
                       bool aWithCredentials);
   nsCORSListenerProxy(nsIStreamListener* aOuter,
                       nsIPrincipal* aRequestingPrincipal,
                       bool aWithCredentials,
--- a/dom/security/nsCSPContext.h
+++ b/dom/security/nsCSPContext.h
@@ -94,17 +94,17 @@ class CSPViolationReportListener : publi
   protected:
     virtual ~CSPViolationReportListener();
 };
 
 // The POST of the violation report (if it happens) should not follow
 // redirects, per the spec. hence, we implement an nsIChannelEventSink
 // with an object so we can tell XHR to abort if a redirect happens.
 class CSPReportRedirectSink final : public nsIChannelEventSink,
-                                        public nsIInterfaceRequestor
+                                    public nsIInterfaceRequestor
 {
   public:
     NS_DECL_NSICHANNELEVENTSINK
     NS_DECL_NSIINTERFACEREQUESTOR
     NS_DECL_ISUPPORTS
 
   public:
     CSPReportRedirectSink();
--- a/dom/smil/TimeEvent.h
+++ b/dom/smil/TimeEvent.h
@@ -9,17 +9,17 @@
 #include "mozilla/dom/Event.h"
 #include "mozilla/dom/TimeEventBinding.h"
 #include "nsIDOMTimeEvent.h"
 
 namespace mozilla {
 namespace dom {
 
 class TimeEvent final : public Event,
-                            public nsIDOMTimeEvent
+                        public nsIDOMTimeEvent
 {
 public:
   TimeEvent(EventTarget* aOwner,
             nsPresContext* aPresContext,
             InternalSMILTimeEvent* aEvent);
 
   // nsISupports interface:
   NS_DECL_ISUPPORTS_INHERITED
--- a/dom/smil/nsSMILAnimationController.h
+++ b/dom/smil/nsSMILAnimationController.h
@@ -37,17 +37,17 @@ class SVGAnimationElement;
 // be performed at a document-level.
 //
 // The animation controller can contain many child time containers (timed
 // document root objects) which may correspond to SVG document fragments within
 // a compound document. These time containers can be paused individually or
 // here, at the document level.
 //
 class nsSMILAnimationController final : public nsSMILTimeContainer,
-                                            public nsARefreshObserver
+                                        public nsARefreshObserver
 {
 public:
   explicit nsSMILAnimationController(nsIDocument* aDoc);
 
   // Clears mDocument pointer. (Called by our nsIDocument when it's going away)
   void Disconnect();
 
   // nsSMILContainer
--- a/dom/storage/DOMStorageIPC.h
+++ b/dom/storage/DOMStorageIPC.h
@@ -18,17 +18,17 @@ namespace dom {
 
 class DOMLocalStorageManager;
 
 // Child side of the IPC protocol, exposes as DB interface but
 // is responsible to send all requests to the parent process
 // and expects asynchronous answers. Those are then transparently
 // forwarded back to consumers on the child process.
 class DOMStorageDBChild final : public DOMStorageDBBridge
-                                  , public PStorageChild
+                              , public PStorageChild
 {
   virtual ~DOMStorageDBChild();
 
 public:
   explicit DOMStorageDBChild(DOMLocalStorageManager* aManager);
 
   NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
   NS_IMETHOD_(MozExternalRefCountType) Release(void);
@@ -102,17 +102,17 @@ private:
 
 
 // Receives async requests from child processes and is responsible
 // to send back responses from the DB thread.  Exposes as a fake
 // DOMStorageCache consumer.
 // Also responsible for forwardning all chrome operation notifications
 // such as cookie cleaning etc to the child process.
 class DOMStorageDBParent final : public PStorageParent
-                                   , public DOMStorageObserverSink
+                               , public DOMStorageObserverSink
 {
   virtual ~DOMStorageDBParent();
 
 public:
   DOMStorageDBParent();
 
   virtual mozilla::ipc::IProtocol*
   CloneProtocol(Channel* aChannel,
--- a/dom/svg/DOMSVGAnimatedNumberList.h
+++ b/dom/svg/DOMSVGAnimatedNumberList.h
@@ -30,17 +30,17 @@ class SVGNumberList;
  * and will go a long way to helping you understand the architecture here.
  *
  * This class is strongly intertwined with DOMSVGNumberList and DOMSVGNumber.
  * Our DOMSVGNumberList base and anim vals are friends and take care of nulling
  * out our pointers to them when they die (making our pointers to them true
  * weak refs).
  */
 class DOMSVGAnimatedNumberList final : public nsISupports,
-                                           public nsWrapperCache
+                                       public nsWrapperCache
 {
   friend class DOMSVGNumberList;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedNumberList)
 
   /**
--- a/dom/svg/DOMSVGLength.h
+++ b/dom/svg/DOMSVGLength.h
@@ -70,17 +70,17 @@ class ErrorResult;
  *
  * To use these classes for <length> attributes as well as <list-of-length>
  * attributes, we would need to take a bit from mListIndex and use that to
  * indicate whether the object belongs to a list or non-list attribute, then
  * if-else as appropriate. The bug for doing that work is:
  * https://bugzilla.mozilla.org/show_bug.cgi?id=571734
  */
 class DOMSVGLength final : public nsIDOMSVGLength,
-                               public nsWrapperCache
+                           public nsWrapperCache
 {
   friend class AutoChangeLengthNotifier;
 
   /**
    * Ctor for creating the object returned by nsSVGLength2::ToDOMBaseVal/ToDOMAnimVal
    */
   DOMSVGLength(nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal);
 
--- a/dom/svg/DOMSVGLengthList.h
+++ b/dom/svg/DOMSVGLengthList.h
@@ -34,17 +34,17 @@ class DOMSVGLength;
  * responsible for nulling out our DOMSVGAnimatedLengthList's pointer to us
  * when we die, essentially making its pointer to us a weak pointer. Similarly,
  * our DOMSVGLength items are friends of us and responsible for nulling out our
  * pointers to them.
  *
  * Our DOM items are created lazily on demand as and when script requests them.
  */
 class DOMSVGLengthList final : public nsISupports,
-                                   public nsWrapperCache
+                               public nsWrapperCache
 {
   friend class AutoChangeLengthListNotifier;
   friend class DOMSVGLength;
 
   ~DOMSVGLengthList() {
     // Our mAList's weak ref to us must be nulled out when we die. If GC has
     // unlinked us using the cycle collector code, then that has already
     // happened, and mAList is null.
--- a/dom/svg/DOMSVGNumber.h
+++ b/dom/svg/DOMSVGNumber.h
@@ -29,17 +29,17 @@ namespace mozilla {
  *
  * For the DOM wrapper classes for non-list SVGNumber, see nsSVGNumber2.h.
  *
  * See the architecture comment in DOMSVGAnimatedNumberList.h.
  *
  * See the comment in DOMSVGLength.h (yes, LENGTH), which applies here too.
  */
 class DOMSVGNumber final : public nsISupports
-                             , public nsWrapperCache
+                         , public nsWrapperCache
 {
   friend class AutoChangeNumberNotifier;
 
   ~DOMSVGNumber() {
     // Our mList's weak ref to us must be nulled out when we die. If GC has
     // unlinked us using the cycle collector code, then that has already
     // happened, and mList is null.
     if (mList) {
--- a/dom/svg/DOMSVGNumberList.h
+++ b/dom/svg/DOMSVGNumberList.h
@@ -34,17 +34,17 @@ class DOMSVGNumber;
  * responsible for nulling out our DOMSVGAnimatedNumberList's pointer to us
  * when we die, essentially making its pointer to us a weak pointer. Similarly,
  * our DOMSVGNumber items are friends of us and responsible for nulling out our
  * pointers to them.
  *
  * Our DOM items are created lazily on demand as and when script requests them.
  */
 class DOMSVGNumberList final : public nsISupports,
-                                   public nsWrapperCache
+                               public nsWrapperCache
 {
   friend class AutoChangeNumberListNotifier;
   friend class DOMSVGNumber;
 
   ~DOMSVGNumberList() {
     // Our mAList's weak ref to us must be nulled out when we die. If GC has
     // unlinked us using the cycle collector code, then that has already
     // happened, and mAList is null.
--- a/dom/svg/DOMSVGPathSeg.h
+++ b/dom/svg/DOMSVGPathSeg.h
@@ -37,35 +37,35 @@ namespace mozilla {
                          uint32_t aListIndex,                                 \
                          bool aIsAnimValItem)                                 \
     : DOMSVGPathSeg(aList, aListIndex, aIsAnimValItem)                        \
   {                                                                           \
     CHECK_ARG_COUNT_IN_SYNC(segType);                                         \
   }                                                                           \
   /* From DOMSVGPathSeg: */                                                   \
   virtual uint32_t                                                            \
-  Type() const override                                                   \
+  Type() const override                                                       \
   {                                                                           \
     return segType;                                                           \
   }                                                                           \
   virtual DOMSVGPathSeg*                                                      \
-  Clone() override                                                        \
+  Clone() override                                                            \
   {                                                                           \
     /* InternalItem() + 1, because we're skipping the encoded seg type */     \
     float *args = IsInList() ? InternalItem() + 1 : mArgs;                    \
     return new DOMSVGPathSeg##segName(args);                                  \
   }                                                                           \
   virtual float*                                                              \
-  PtrToMemberArgs() override                                              \
+  PtrToMemberArgs() override                                                  \
   {                                                                           \
     return mArgs;                                                             \
   }                                                                           \
                                                                               \
   virtual JSObject*                                                           \
-  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override  \
+  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override      \
   {                                                                           \
     return dom::SVGPathSeg##segName##Binding::Wrap(aCx, this, aGivenProto);   \
   }
 
 
 /**
  * Class DOMSVGPathSeg
  *
--- a/dom/svg/DOMSVGPathSegList.h
+++ b/dom/svg/DOMSVGPathSegList.h
@@ -42,17 +42,17 @@ class SVGAnimatedPathSegList;
  *
  * This class is strongly intertwined with DOMSVGPathSeg. Our DOMSVGPathSeg
  * items are friends of us and responsible for nulling out our pointers to
  * them when they die.
  *
  * Our DOM items are created lazily on demand as and when script requests them.
  */
 class DOMSVGPathSegList final : public nsISupports,
-                                    public nsWrapperCache
+                                public nsWrapperCache
 {
   friend class AutoChangePathSegListNotifier;
   friend class DOMSVGPathSeg;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPathSegList)
 
--- a/dom/svg/DOMSVGPointList.h
+++ b/dom/svg/DOMSVGPointList.h
@@ -43,17 +43,17 @@ class SVGAnimatedPointList;
  *
  * This class is strongly intertwined with DOMSVGPoint. Our DOMSVGPoint
  * items are friends of us and responsible for nulling out our pointers to
  * them when they die.
  *
  * Our DOM items are created lazily on demand as and when script requests them.
  */
 class DOMSVGPointList final : public nsISupports,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
   friend class AutoChangePointListNotifier;
   friend class nsISVGPoint;
   friend class mozilla::DOMSVGPoint;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPointList)
--- a/dom/svg/DOMSVGStringList.h
+++ b/dom/svg/DOMSVGStringList.h
@@ -39,17 +39,17 @@ class SVGStringList;
  * DOMSVGString items to maintain. As far as script is concerned, objects
  * of this class contain a list of strings, not a list of mutable objects
  * like the other SVG list types. As a result, unlike the other SVG list
  * types, this class does not create its items lazily on demand and store
  * them so it can return the same objects each time. It simply returns a new
  * string each time any given item is requested.
  */
 class DOMSVGStringList final : public nsISupports
-                                 , public nsWrapperCache
+                             , public nsWrapperCache
 {
   friend class AutoChangeStringListNotifier;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGStringList)
 
   nsSVGElement* GetParentObject() const
--- a/dom/svg/DOMSVGTransformList.h
+++ b/dom/svg/DOMSVGTransformList.h
@@ -29,17 +29,17 @@ class SVGTransform;
  * Class DOMSVGTransformList
  *
  * This class is used to create the DOM tearoff objects that wrap internal
  * SVGTransformList objects.
  *
  * See the architecture comment in SVGAnimatedTransformList.h.
  */
 class DOMSVGTransformList final : public nsISupports,
-                                      public nsWrapperCache
+                                  public nsWrapperCache
 {
   friend class AutoChangeTransformListNotifier;
   friend class dom::SVGTransform;
 
   ~DOMSVGTransformList() {
     // Our mAList's weak ref to us must be nulled out when we die. If GC has
     // unlinked us using the cycle collector code, then that has already
     // happened, and mAList is null.
--- a/dom/svg/SVGAElement.h
+++ b/dom/svg/SVGAElement.h
@@ -18,17 +18,17 @@ namespace mozilla {
 class EventChainPostVisitor;
 class EventChainPreVisitor;
 
 namespace dom {
 
 typedef SVGGraphicsElement SVGAElementBase;
 
 class SVGAElement final : public SVGAElementBase,
-                              public Link
+                          public Link
 {
 protected:
   explicit SVGAElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   friend nsresult (::NS_NewSVGAElement(nsIContent **aResult,
                                        already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
 
 public:
--- a/dom/svg/SVGAnimatedPreserveAspectRatio.h
+++ b/dom/svg/SVGAnimatedPreserveAspectRatio.h
@@ -107,17 +107,17 @@ public:
     virtual nsSMILValue GetBaseValue() const override;
     virtual void ClearAnimValue() override;
     virtual nsresult SetAnimValue(const nsSMILValue& aValue) override;
   };
 };
 
 namespace dom {
 class DOMSVGAnimatedPreserveAspectRatio final : public nsISupports,
-                                                    public nsWrapperCache
+                                                public nsWrapperCache
 {
   ~DOMSVGAnimatedPreserveAspectRatio();
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGAnimatedPreserveAspectRatio)
 
   DOMSVGAnimatedPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
                                     nsSVGElement *aSVGElement)
--- a/dom/svg/SVGMPathElement.h
+++ b/dom/svg/SVGMPathElement.h
@@ -16,17 +16,17 @@ nsresult NS_NewSVGMPathElement(nsIConten
 
 typedef nsSVGElement SVGMPathElementBase;
 
 namespace mozilla {
 namespace dom {
 class SVGPathElement;
 
 class SVGMPathElement final : public SVGMPathElementBase,
-                                  public nsStubMutationObserver
+                              public nsStubMutationObserver
 {
 protected:
   friend nsresult (::NS_NewSVGMPathElement(nsIContent **aResult,
                                            already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGMPathElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   ~SVGMPathElement();
 
   virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
--- a/dom/svg/SVGPreserveAspectRatio.h
+++ b/dom/svg/SVGPreserveAspectRatio.h
@@ -108,17 +108,17 @@ private:
   uint8_t mAlign;
   uint8_t mMeetOrSlice;
   bool mDefer;
 };
 
 namespace dom {
 
 class DOMSVGPreserveAspectRatio final : public nsISupports,
-                                            public nsWrapperCache
+                                        public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPreserveAspectRatio)
 
   DOMSVGPreserveAspectRatio(SVGAnimatedPreserveAspectRatio* aVal,
                             nsSVGElement *aSVGElement,
                             bool aIsBaseValue)
--- a/dom/svg/SVGScriptElement.h
+++ b/dom/svg/SVGScriptElement.h
@@ -19,17 +19,17 @@ nsresult NS_NewSVGScriptElement(nsIConte
                                 mozilla::dom::FromParser aFromParser);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGElement SVGScriptElementBase;
 
 class SVGScriptElement final : public SVGScriptElementBase,
-                                   public nsScriptElement
+                               public nsScriptElement
 {
 protected:
   friend nsresult (::NS_NewSVGScriptElement(nsIContent **aResult,
                                             already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
                                             mozilla::dom::FromParser aFromParser));
   SVGScriptElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo,
                    FromParser aFromParser);
 
--- a/dom/svg/SVGStyleElement.h
+++ b/dom/svg/SVGStyleElement.h
@@ -15,18 +15,18 @@ nsresult NS_NewSVGStyleElement(nsIConten
                                already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 typedef nsSVGElement SVGStyleElementBase;
 
 namespace mozilla {
 namespace dom {
 
 class SVGStyleElement final : public SVGStyleElementBase,
-                                  public nsStyleLinkElement,
-                                  public nsStubMutationObserver
+                              public nsStyleLinkElement,
+                              public nsStubMutationObserver
 {
 protected:
   friend nsresult (::NS_NewSVGStyleElement(nsIContent **aResult,
                                            already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGStyleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   ~SVGStyleElement();
 
   virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
--- a/dom/svg/SVGSymbolElement.h
+++ b/dom/svg/SVGSymbolElement.h
@@ -15,17 +15,17 @@ nsresult NS_NewSVGSymbolElement(nsIConte
                                 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef nsSVGElement SVGSymbolElementBase;
 
 class SVGSymbolElement final : public SVGSymbolElementBase,
-                                   public SVGTests
+                               public SVGTests
 {
 protected:
   friend nsresult (::NS_NewSVGSymbolElement(nsIContent **aResult,
                                             already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGSymbolElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   ~SVGSymbolElement();
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
 
--- a/dom/svg/SVGTitleElement.h
+++ b/dom/svg/SVGTitleElement.h
@@ -13,17 +13,17 @@
 typedef nsSVGElement SVGTitleElementBase;
 
 nsresult NS_NewSVGTitleElement(nsIContent **aResult,
                                already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 namespace mozilla {
 namespace dom {
 
 class SVGTitleElement final : public SVGTitleElementBase,
-                                  public nsStubMutationObserver
+                              public nsStubMutationObserver
 {
 protected:
   friend nsresult (::NS_NewSVGTitleElement(nsIContent **aResult,
                                            already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGTitleElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   ~SVGTitleElement();
 
   virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
--- a/dom/svg/SVGUseElement.h
+++ b/dom/svg/SVGUseElement.h
@@ -25,17 +25,17 @@ nsresult NS_NewSVGUseElement(nsIContent 
                              already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
 
 namespace mozilla {
 namespace dom {
 
 typedef SVGGraphicsElement SVGUseElementBase;
 
 class SVGUseElement final : public SVGUseElementBase,
-                                public nsStubMutationObserver
+                            public nsStubMutationObserver
 {
   friend class ::nsSVGUseFrame;
 protected:
   friend nsresult (::NS_NewSVGUseElement(nsIContent **aResult,
                                          already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
   explicit SVGUseElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
   virtual ~SVGUseElement();
   virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
--- a/dom/system/gonk/AudioManager.h
+++ b/dom/system/gonk/AudioManager.h
@@ -34,17 +34,17 @@ class SwitchEvent;
 typedef Observer<SwitchEvent> SwitchObserver;
 } // namespace hal
 
 namespace dom {
 namespace gonk {
 class RecoverTask;
 class AudioChannelVolInitCallback;
 class AudioManager final : public nsIAudioManager
-                             , public nsIObserver
+                         , public nsIObserver
 {
 public:
   static already_AddRefed<AudioManager> GetInstance();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSIAUDIOMANAGER
   NS_DECL_NSIOBSERVER
 
--- a/dom/system/gonk/SystemWorkerManager.h
+++ b/dom/system/gonk/SystemWorkerManager.h
@@ -32,18 +32,18 @@ namespace mozilla {
 namespace ipc {
   class KeyStore;
 }
 
 namespace dom {
 namespace gonk {
 
 class SystemWorkerManager final : public nsIObserver,
-                                      public nsIInterfaceRequestor,
-                                      public nsISystemWorkerManager
+                                  public nsIInterfaceRequestor,
+                                  public nsISystemWorkerManager
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIINTERFACEREQUESTOR
   NS_DECL_NSISYSTEMWORKERMANAGER
 
   nsresult Init();
--- a/dom/system/gonk/nsVolumeMountLock.h
+++ b/dom/system/gonk/nsVolumeMountLock.h
@@ -21,18 +21,18 @@ namespace system {
 
 /* The VolumeMountLock is designed so that it can be used in the Child or
  * Parent process. While the VolumeMountLock object exists, then the
  * VolumeManager/AutoMounter will prevent a mounted volume from being
  * shared with the PC.
  */
 
 class nsVolumeMountLock final : public nsIVolumeMountLock,
-                                    public nsIObserver,
-                                    public nsSupportsWeakReference
+                                public nsIObserver,
+                                public nsSupportsWeakReference
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIVOLUMEMOUNTLOCK
 
   static already_AddRefed<nsVolumeMountLock> Create(const nsAString& volumeName);
 
--- a/dom/system/gonk/nsVolumeService.h
+++ b/dom/system/gonk/nsVolumeService.h
@@ -27,17 +27,17 @@ class Volume;
 
 /***************************************************************************
 * The nsVolumeData class encapsulates the data that is updated/maintained
 * on the main thread in order to support the nsIVolume and nsIVolumeService
 * classes.
 */
 
 class nsVolumeService final : public nsIVolumeService,
-                                  public nsIDOMMozWakeLockListener
+                              public nsIDOMMozWakeLockListener
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIVOLUMESERVICE
   NS_DECL_NSIDOMMOZWAKELOCKLISTENER
 
   nsVolumeService();
 
--- a/dom/telephony/CallsList.h
+++ b/dom/telephony/CallsList.h
@@ -10,17 +10,17 @@
 #include "mozilla/dom/telephony/TelephonyCommon.h"
 
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
 class CallsList final : public nsISupports,
-                            public nsWrapperCache
+                        public nsWrapperCache
 {
   nsRefPtr<Telephony> mTelephony;
   nsRefPtr<TelephonyCallGroup> mGroup;
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CallsList)
 
--- a/dom/telephony/MMICall.h
+++ b/dom/telephony/MMICall.h
@@ -20,17 +20,17 @@
 
 struct JSContext;
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class MMICall final : public nsISupports,
-                          public nsWrapperCache
+                      public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MMICall)
 
   MMICall(nsPIDOMWindow* aWindow, const nsAString& aServiceCode);
 
   nsPIDOMWindow*
--- a/dom/telephony/Telephony.h
+++ b/dom/telephony/Telephony.h
@@ -26,17 +26,17 @@ namespace telephony {
 
 class TelephonyDialCallback;
 
 } // namespace telephony
 
 class OwningTelephonyCallOrTelephonyCallGroup;
 
 class Telephony final : public DOMEventTargetHelper,
-                            private nsITelephonyListener
+                        private nsITelephonyListener
 {
   /**
    * Class Telephony doesn't actually expose nsITelephonyListener.
    * Instead, it owns an nsITelephonyListener derived instance mListener
    * and passes it to nsITelephonyService. The onreceived events are first
    * delivered to mListener and then forwarded to its owner, Telephony. See
    * also bug 775997 comment #51.
    */
--- a/dom/telephony/TelephonyCallId.h
+++ b/dom/telephony/TelephonyCallId.h
@@ -13,17 +13,17 @@
 #include "nsWrapperCache.h"
 
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class TelephonyCallId final : public nsISupports,
-                                  public nsWrapperCache
+                              public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TelephonyCallId)
 
   TelephonyCallId(nsPIDOMWindow* aWindow, const nsAString& aNumber,
                   uint16_t aNumberPresentation, const nsAString& aName,
                   uint16_t aNamePresentation);
--- a/dom/telephony/TelephonyDialCallback.h
+++ b/dom/telephony/TelephonyDialCallback.h
@@ -19,17 +19,17 @@
 
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 namespace telephony {
 
 class TelephonyDialCallback final : public TelephonyCallback,
-                                        public nsITelephonyDialCallback
+                                    public nsITelephonyDialCallback
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSITELEPHONYDIALCALLBACK
 
   TelephonyDialCallback(nsPIDOMWindow* aWindow, Telephony* aTelephony,
                         Promise* aPromise);
 
--- a/dom/telephony/USSDSession.h
+++ b/dom/telephony/USSDSession.h
@@ -19,17 +19,17 @@
 #include "nsWrapperCache.h"
 
 struct JSContext;
 
 namespace mozilla {
 namespace dom {
 
 class USSDSession final : public nsISupports,
-                              public nsWrapperCache
+                          public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(USSDSession)
 
   USSDSession(nsPIDOMWindow* aWindow, nsITelephonyService* aService,
               uint32_t aServiceId);
 
--- a/dom/telephony/ipc/TelephonyIPCService.h
+++ b/dom/telephony/ipc/TelephonyIPCService.h
@@ -12,18 +12,18 @@
 #include "nsITelephonyService.h"
 
 BEGIN_TELEPHONY_NAMESPACE
 
 class IPCTelephonyRequest;
 class PTelephonyChild;
 
 class TelephonyIPCService final : public nsITelephonyService
-                                     , public nsITelephonyListener
-                                     , public nsIObserver
+                                , public nsITelephonyListener
+                                , public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSITELEPHONYSERVICE
   NS_DECL_NSITELEPHONYLISTENER
   NS_DECL_NSIOBSERVER
 
   TelephonyIPCService();
--- a/dom/tests/browser/browser_ConsoleAPITests.js
+++ b/dom/tests/browser/browser_ConsoleAPITests.js
@@ -166,20 +166,20 @@ function testConsoleGroup(aMessageObject
   if (aMessageObject.level == "groupEnd") {
     startTimeTest();
   }
 }
 
 function startTraceTest() {
   gLevel = "trace";
   gArgs = [
-    {columnNumber: 8, filename: TEST_URI, functionName: "window.foobar585956c", language: 2, lineNumber: 6},
-    {columnNumber: 15, filename: TEST_URI, functionName: "foobar585956b", language: 2, lineNumber: 11},
-    {columnNumber: 15, filename: TEST_URI, functionName: "foobar585956a", language: 2, lineNumber: 15},
-    {columnNumber: 0, filename: TEST_URI, functionName: "onclick", language: 2, lineNumber: 1}
+    {columnNumber: 9, filename: TEST_URI, functionName: "window.foobar585956c", language: 2, lineNumber: 6},
+    {columnNumber: 16, filename: TEST_URI, functionName: "foobar585956b", language: 2, lineNumber: 11},
+    {columnNumber: 16, filename: TEST_URI, functionName: "foobar585956a", language: 2, lineNumber: 15},
+    {columnNumber: 1, filename: TEST_URI, functionName: "onclick", language: 2, lineNumber: 1}
   ];
 
   let button = gWindow.document.getElementById("test-trace");
   ok(button, "found #test-trace button");
   EventUtils.synthesizeMouseAtCenter(button, {}, gWindow);
 }
 
 function startLocationTest() {
--- a/dom/time/TimeManager.h
+++ b/dom/time/TimeManager.h
@@ -13,17 +13,17 @@
 namespace mozilla {
 namespace dom {
 
 class Date;
 
 namespace time {
 
 class TimeManager final : public nsISupports
-                            , public nsWrapperCache
+                        , public nsWrapperCache
 {
 public:
   static bool PrefEnabled(JSContext* aCx, JSObject* aGlobal)
   {
 #ifdef MOZ_TIME_MANAGER
     return true;
 #else
     return false;
--- a/dom/tv/TVProgram.h
+++ b/dom/tv/TVProgram.h
@@ -12,17 +12,17 @@
 class nsITVProgramData;
 
 namespace mozilla {
 namespace dom {
 
 class TVChannel;
 
 class TVProgram final : public nsISupports
-                          , public nsWrapperCache
+                      , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(TVProgram)
 
   TVProgram(nsISupports* aOwner,
             TVChannel* aChannel,
             nsITVProgramData* aData);
--- a/dom/voicemail/Voicemail.h
+++ b/dom/voicemail/Voicemail.h
@@ -18,17 +18,17 @@ struct JSContext;
 class nsPIDOMWindow;
 
 namespace mozilla {
 namespace dom {
 
 class VoicemailStatus;
 
 class Voicemail final : public DOMEventTargetHelper,
-                            private nsIVoicemailListener
+                        private nsIVoicemailListener
 {
   /**
    * Class Voicemail doesn't actually expose nsIVoicemailListener. Instead, it
    * owns an nsIVoicemailListener derived instance mListener and passes it to
    * nsIVoicemailService. The onreceived events are first delivered to
    * mListener and then forwarded to its owner, Voicemail. See also bug 775997
    * comment #51.
    */
--- a/dom/voicemail/VoicemailStatus.h
+++ b/dom/voicemail/VoicemailStatus.h
@@ -12,17 +12,17 @@
 #include "nsIVoicemailService.h" // For nsIVoicemailProvider.
 #include "nsString.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 namespace dom {
 
 class VoicemailStatus final : public nsISupports
-                                , public nsWrapperCache
+                            , public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(VoicemailStatus)
 
   VoicemailStatus(nsISupports* aParent,
                   nsIVoicemailProvider* aProvider);
 
--- a/dom/voicemail/ipc/VoicemailIPCService.h
+++ b/dom/voicemail/ipc/VoicemailIPCService.h
@@ -12,17 +12,17 @@
 #include "nsAutoPtr.h"
 #include "nsIVoicemailService.h"
 
 namespace mozilla {
 namespace dom {
 namespace voicemail {
 
 class VoicemailIPCService final : public PVoicemailChild
-                                    , public nsIVoicemailService
+                                , public nsIVoicemailService
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIVOICEMAILSERVICE
 
   VoicemailIPCService();
 
   bool
--- a/dom/voicemail/ipc/VoicemailParent.h
+++ b/dom/voicemail/ipc/VoicemailParent.h
@@ -14,17 +14,17 @@
 #include "nsIVoicemailService.h"
 #include "nsString.h"
 
 namespace mozilla {
 namespace dom {
 namespace voicemail {
 
 class VoicemailParent final : public PVoicemailParent
-                                , public nsIVoicemailListener
+                            , public nsIVoicemailListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIVOICEMAILLISTENER
 
   VoicemailParent() { MOZ_COUNT_CTOR(VoicemailParent); }
 
   bool
--- a/dom/wifi/WifiCertService.h
+++ b/dom/wifi/WifiCertService.h
@@ -11,17 +11,17 @@
 #include "nsNSSShutDown.h"
 #include "nsThread.h"
 #include "mozilla/dom/WifiOptionsBinding.h"
 
 namespace mozilla {
 namespace dom {
 
 class WifiCertService final : public nsIWifiCertService,
-                                  public nsNSSShutDownObject
+                              public nsNSSShutDownObject
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIWIFICERTSERVICE
 
   static already_AddRefed<WifiCertService>
   FactoryCreate();
   void DispatchResult(const mozilla::dom::WifiCertServiceResultOptions& aOptions);
--- a/dom/workers/DataStore.h
+++ b/dom/workers/DataStore.h
@@ -94,17 +94,17 @@ protected:
   virtual ~WorkerDataStore() {}
 
 private:
   nsMainThreadPtrHandle<DataStore> mBackingStore;
   nsRefPtr<DataStoreChangeEventProxy> mEventProxy;
 };
 
 class DataStoreChangeEventProxy final : public nsIDOMEventListener
-                                          , public WorkerFeature
+                                      , public WorkerFeature
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIDOMEVENTLISTENER
 
   DataStoreChangeEventProxy(WorkerPrivate* aWorkerPrivate,
                             WorkerDataStore* aWorkerStore);
 
--- a/dom/workers/ScriptLoader.cpp
+++ b/dom/workers/ScriptLoader.cpp
@@ -217,18 +217,18 @@ private:
 
   void
   ShutdownScriptLoader(JSContext* aCx,
                        WorkerPrivate* aWorkerPrivate,
                        bool aResult);
 };
 
 class ScriptLoaderRunnable final : public WorkerFeature,
-                                       public nsIRunnable,
-                                       public nsIStreamLoaderObserver
+                                   public nsIRunnable,
+                                   public nsIStreamLoaderObserver
 {
   friend class ScriptExecutorRunnable;
 
   WorkerPrivate* mWorkerPrivate;
   nsCOMPtr<nsIEventTarget> mSyncLoopTarget;
   nsTArray<ScriptLoadInfo> mLoadInfos;
   bool mIsMainScript;
   WorkerScriptType mWorkerScriptType;
--- a/dom/workers/ServiceWorkerClients.h
+++ b/dom/workers/ServiceWorkerClients.h
@@ -15,17 +15,17 @@
 #include "mozilla/dom/ClientsBinding.h"
 #include "mozilla/ErrorResult.h"
 
 namespace mozilla {
 namespace dom {
 namespace workers {
 
 class ServiceWorkerClients final : public nsISupports,
-                                       public nsWrapperCache
+                                   public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ServiceWorkerClients)
 
   explicit ServiceWorkerClients(ServiceWorkerGlobalScope* aWorkerScope);
 
   already_AddRefed<Promise>
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -375,18 +375,16 @@ public:
   void
   UpdateFailed(const ErrorEventInit& aErrorDesc) override
   {
     AutoJSAPI jsapi;
     jsapi.Init(mWindow);
 
     JSContext* cx = jsapi.cx();
 
-    JS::Rooted<JSString*> stack(cx, JS_GetEmptyString(JS_GetRuntime(cx)));
-
     JS::Rooted<JS::Value> fnval(cx);
     if (!ToJSValue(cx, aErrorDesc.mFilename, &fnval)) {
       JS_ClearPendingException(cx);
       mPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
       return;
     }
     JS::Rooted<JSString*> fn(cx, fnval.toString());
 
@@ -394,17 +392,17 @@ public:
     if (!ToJSValue(cx, aErrorDesc.mMessage, &msgval)) {
       JS_ClearPendingException(cx);
       mPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
       return;
     }
     JS::Rooted<JSString*> msg(cx, msgval.toString());
 
     JS::Rooted<JS::Value> error(cx);
-    if (!JS::CreateError(cx, JSEXN_ERR, stack, fn, aErrorDesc.mLineno,
+    if (!JS::CreateError(cx, JSEXN_ERR, JS::NullPtr(), fn, aErrorDesc.mLineno,
                          aErrorDesc.mColno, nullptr, msg, &error)) {
       JS_ClearPendingException(cx);
       mPromise->MaybeReject(NS_ERROR_DOM_ABORT_ERR);
       return;
     }
 
     mPromise->MaybeReject(cx, error);
   }
@@ -479,17 +477,17 @@ GetRequiredScopeStringPrefix(const nsACS
   }
 
   aPrefix.Append(dir);
   return NS_OK;
 }
 } // anonymous namespace
 
 class ServiceWorkerRegisterJob final : public ServiceWorkerJob,
-                                           public nsIStreamLoaderObserver
+                                       public nsIStreamLoaderObserver
 {
   friend class ContinueInstallTask;
 
   nsCString mScope;
   nsCString mScriptSpec;
   nsRefPtr<ServiceWorkerRegistrationInfo> mRegistration;
   nsRefPtr<ServiceWorkerUpdateFinishCallback> mCallback;
   nsCOMPtr<nsIPrincipal> mPrincipal;
--- a/dom/workers/WorkerScope.cpp
+++ b/dom/workers/WorkerScope.cpp
@@ -608,18 +608,18 @@ public:
 
 private:
   nsRefPtr<WorkerScopeUnregisterRunnable> mRunnable;
   State mState;
   bool mValue;
 };
 
 class WorkerScopeUnregisterRunnable final : public nsRunnable
-                                              , public nsIServiceWorkerUnregisterCallback
-                                              , public WorkerFeature
+                                          , public nsIServiceWorkerUnregisterCallback
+                                          , public WorkerFeature
 {
   WorkerPrivate* mWorkerPrivate;
   nsString mScope;
 
   // Worker thread only.
   nsRefPtr<Promise> mWorkerPromise;
   bool mCleanedUp;
 
--- a/dom/workers/WorkerScope.h
+++ b/dom/workers/WorkerScope.h
@@ -231,17 +231,17 @@ public:
   IMPL_EVENT_HANDLER(beforeevicted)
   IMPL_EVENT_HANDLER(evicted)
   IMPL_EVENT_HANDLER(fetch)
   IMPL_EVENT_HANDLER(install)
   IMPL_EVENT_HANDLER(message)
 };
 
 class WorkerDebuggerGlobalScope final : public DOMEventTargetHelper,
-                                            public nsIGlobalObject
+                                        public nsIGlobalObject
 {
   WorkerPrivate* mWorkerPrivate;
 
 public:
   explicit WorkerDebuggerGlobalScope(WorkerPrivate* aWorkerPrivate);
 
   NS_DECL_ISUPPORTS_INHERITED
 
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -310,17 +310,17 @@ private:
     mProxy->Teardown();
     mProxy = nullptr;
 
     return NS_OK;
   }
 };
 
 class LoadStartDetectionRunnable final : public nsRunnable,
-                                             public nsIDOMEventListener
+                                         public nsIDOMEventListener
 {
   WorkerPrivate* mWorkerPrivate;
   nsRefPtr<Proxy> mProxy;
   nsRefPtr<nsXMLHttpRequest> mXHR;
   XMLHttpRequest* mXMLHttpRequestPrivate;
   nsString mEventType;
   uint32_t mChannelId;
   bool mReceivedLoadStart;
--- a/dom/workers/XMLHttpRequest.h
+++ b/dom/workers/XMLHttpRequest.h
@@ -24,17 +24,17 @@ class File;
 
 BEGIN_WORKERS_NAMESPACE
 
 class Proxy;
 class XMLHttpRequestUpload;
 class WorkerPrivate;
 
 class XMLHttpRequest final: public nsXHREventTarget,
-                                public WorkerFeature
+                            public WorkerFeature
 {
 public:
   struct StateData
   {
     nsString mResponseText;
     nsString mResponseURL;
     uint32_t mStatus;
     nsCString mStatusText;
--- a/dom/xbl/nsXBLService.cpp
+++ b/dom/xbl/nsXBLService.cpp
@@ -163,17 +163,17 @@ public:
   {
   }
 };
 
 // nsXBLStreamListener, a helper class used for
 // asynchronous parsing of URLs
 /* Header file */
 class nsXBLStreamListener final : public nsIStreamListener,
-                                      public nsIDOMEventListener
+                                  public nsIDOMEventListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSIDOMEVENTLISTENER
 
   nsXBLStreamListener(nsIDocument* aBoundDocument,
--- a/dom/xml/CDATASection.h
+++ b/dom/xml/CDATASection.h
@@ -9,17 +9,17 @@
 #include "mozilla/Attributes.h"
 #include "nsIDOMCDATASection.h"
 #include "mozilla/dom/Text.h"
 
 namespace mozilla {
 namespace dom {
 
 class CDATASection final : public Text,
-                               public nsIDOMCDATASection
+                           public nsIDOMCDATASection
 {
 private:
   void Init()
   {
     MOZ_ASSERT(mNodeInfo->NodeType() == nsIDOMNode::CDATA_SECTION_NODE,
                "Bad NodeType in aNodeInfo");
   }
 
--- a/dom/xslt/xpath/XPathResult.h
+++ b/dom/xslt/xpath/XPathResult.h
@@ -40,18 +40,18 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPathRe
 
 namespace mozilla {
 namespace dom {
 
 /**
  * A class for evaluating an XPath expression string
  */
 class XPathResult final : public nsIXPathResult,
-                              public nsStubMutationObserver,
-                              public nsWrapperCache
+                          public nsStubMutationObserver,
+                          public nsWrapperCache
 {
     ~XPathResult();
 
 public:
     explicit XPathResult(nsINode* aParent);
     XPathResult(const XPathResult &aResult);
 
     enum {
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -60,19 +60,19 @@ getSpec(nsIChannel* aChannel, nsAString&
     }
 
     nsAutoCString spec;
     uri->GetSpec(spec);
     AppendUTF8toUTF16(spec, aSpec);
 }
 
 class txStylesheetSink final : public nsIXMLContentSink,
-                                   public nsIExpatSink,
-                                   public nsIStreamListener,
-                                   public nsIInterfaceRequestor
+                               public nsIExpatSink,
+                               public nsIStreamListener,
+                               public nsIInterfaceRequestor
 {
 public:
     txStylesheetSink(txStylesheetCompiler* aCompiler, nsIParser* aParser);
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSIEXPATSINK
     NS_DECL_NSISTREAMLISTENER
     NS_DECL_NSIREQUESTOBSERVER
--- a/dom/xslt/xslt/txMozillaXMLOutput.h
+++ b/dom/xslt/xslt/txMozillaXMLOutput.h
@@ -24,17 +24,17 @@ class nsIDOMElement;
 class nsIStyleSheet;
 class nsIDOMNode;
 class nsITransformObserver;
 class nsNodeInfoManager;
 class nsIDocument;
 class nsINode;
 
 class txTransformNotifier final : public nsIScriptLoaderObserver,
-                                      public nsICSSLoaderObserver
+                                  public nsICSSLoaderObserver
 {
 public:
     txTransformNotifier();
 
     NS_DECL_ISUPPORTS
     NS_DECL_NSISCRIPTLOADEROBSERVER
     
     // nsICSSLoaderObserver
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.h
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.h
@@ -45,20 +45,20 @@ class GlobalObject;
 "@mozilla.org/document-transformer;1?type=xslt"
 
 #define XSLT_MSGS_URL  "chrome://global/locale/xslt/xslt.properties"
 
 /**
  * txMozillaXSLTProcessor is a front-end to the XSLT Processor.
  */
 class txMozillaXSLTProcessor final : public nsIXSLTProcessor,
-                                         public nsIXSLTProcessorPrivate,
-                                         public nsIDocumentTransformer,
-                                         public nsStubMutationObserver,
-                                         public nsWrapperCache
+                                     public nsIXSLTProcessorPrivate,
+                                     public nsIDocumentTransformer,
+                                     public nsStubMutationObserver,
+                                     public nsWrapperCache
 {
 public:
     /**
      * Creates a new txMozillaXSLTProcessor
      */
     txMozillaXSLTProcessor();
 
     // nsISupports interface
--- a/dom/xslt/xslt/txStylesheetCompiler.h
+++ b/dom/xslt/xslt/txStylesheetCompiler.h
@@ -182,17 +182,17 @@ struct txStylesheetAttr
 {
     int32_t mNamespaceID;
     nsCOMPtr<nsIAtom> mLocalName;
     nsCOMPtr<nsIAtom> mPrefix;
     nsString mValue;
 };
 
 class txStylesheetCompiler final : private txStylesheetCompilerState,
-                                       public txACompileObserver
+                                   public txACompileObserver
 {
 public:
     friend class txStylesheetCompilerState;
     friend bool TX_XSLTFunctionAvailable(nsIAtom* aName,
                                            int32_t aNameSpaceID);
     txStylesheetCompiler(const nsAString& aStylesheetURI,
                          mozilla::net::ReferrerPolicy  aReferrerPolicy,
                          txACompileObserver* aObserver);
--- a/dom/xul/XULDocument.h
+++ b/dom/xul/XULDocument.h
@@ -82,21 +82,21 @@ private:
 /**
  * The XUL document class
  */
 
 namespace mozilla {
 namespace dom {
 
 class XULDocument final : public XMLDocument,
-                              public nsIXULDocument,
-                              public nsIDOMXULDocument,
-                              public nsIStreamLoaderObserver,
-                              public nsICSSLoaderObserver,
-                              public nsIOffThreadScriptReceiver
+                          public nsIXULDocument,
+                          public nsIDOMXULDocument,
+                          public nsIStreamLoaderObserver,
+                          public nsICSSLoaderObserver,
+                          public nsIOffThreadScriptReceiver
 {
 public:
     XULDocument();
 
     // nsISupports interface
     NS_DECL_ISUPPORTS_INHERITED
     NS_DECL_NSISTREAMLOADEROBSERVER
 
--- a/dom/xul/nsXULContentSink.h
+++ b/dom/xul/nsXULContentSink.h
@@ -18,17 +18,17 @@
 class nsIDocument;
 class nsIScriptSecurityManager;
 class nsAttrName;
 class nsXULPrototypeDocument;
 class nsXULPrototypeElement;
 class nsXULPrototypeNode;
 
 class XULContentSinkImpl final : public nsIXMLContentSink,
-                                     public nsIExpatSink
+                                 public nsIExpatSink
 {
 public:
     XULContentSinkImpl();
 
     // nsISupports
     NS_DECL_CYCLE_COLLECTING_ISUPPORTS
     NS_DECL_NSIEXPATSINK
 
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -119,17 +119,17 @@ uint32_t             nsXULPrototypeAttri
 uint32_t             nsXULPrototypeAttribute::gNumAttributes;
 uint32_t             nsXULPrototypeAttribute::gNumCacheTests;
 uint32_t             nsXULPrototypeAttribute::gNumCacheHits;
 uint32_t             nsXULPrototypeAttribute::gNumCacheSets;
 uint32_t             nsXULPrototypeAttribute::gNumCacheFills;
 #endif
 
 class nsXULElementTearoff final : public nsIDOMElementCSSInlineStyle,
-                                      public nsIFrameLoaderOwner
+                                  public nsIFrameLoaderOwner
 {
   ~nsXULElementTearoff() {}
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsXULElementTearoff,
                                            nsIDOMElementCSSInlineStyle)
 
--- a/dom/xul/nsXULElement.h
+++ b/dom/xul/nsXULElement.h
@@ -363,17 +363,17 @@ enum {
 
 ASSERT_NODE_FLAGS_SPACE(ELEMENT_TYPE_SPECIFIC_BITS_OFFSET + 3);
 
 #undef XUL_ELEMENT_FLAG_BIT
 
 class nsScriptEventHandlerOwnerTearoff;
 
 class nsXULElement final : public nsStyledElement,
-                               public nsIDOMXULElement
+                           public nsIDOMXULElement
 {
 public:
     explicit nsXULElement(already_AddRefed<mozilla::dom::NodeInfo> aNodeInfo);
 
     static nsresult
     Create(nsXULPrototypeElement* aPrototype, nsIDocument* aDocument,
            bool aIsScriptable, bool aIsRoot, mozilla::dom::Element** aResult);
 
--- a/dom/xul/templates/nsXULTemplateQueryProcessorRDF.h
+++ b/dom/xul/templates/nsXULTemplateQueryProcessorRDF.h
@@ -36,17 +36,17 @@ extern PRLogModuleInfo* gXULTemplateLog;
 class nsIContent;
 class nsIRDFCompositeDataSource;
 class nsXULTemplateResultRDF;
 
 /**
  * An object that generates results from a query on an RDF graph
  */
 class nsXULTemplateQueryProcessorRDF final : public nsIXULTemplateQueryProcessor,
-                                                 public nsIRDFObserver
+                                             public nsIRDFObserver
 {
 public:
     typedef nsTArray<nsRefPtr<nsXULTemplateResultRDF> > ResultArray;
 
     nsXULTemplateQueryProcessorRDF();
 
     nsresult InitGlobals();
 
--- a/dom/xul/templates/nsXULTemplateQueryProcessorXML.h
+++ b/dom/xul/templates/nsXULTemplateQueryProcessorXML.h
@@ -114,17 +114,17 @@ public:
         : mQuery(aQuery),
           mBindingSet(aBindingSet),
           mResults(aResults),
           mPosition(0)
     {}
 };
 
 class nsXULTemplateQueryProcessorXML final : public nsIXULTemplateQueryProcessor,
-                                                 public nsIDOMEventListener
+                                             public nsIDOMEventListener
 {
 public:
 
     nsXULTemplateQueryProcessorXML()
         : mGenerationStarted(false)
     {}
 
     // nsISupports interface
--- a/editor/composer/nsEditingSession.h
+++ b/editor/composer/nsEditingSession.h
@@ -39,18 +39,18 @@ class nsITimer;
 class nsComposerCommandsUpdater;
 class nsIChannel;
 class nsIControllers;
 class nsIDocShell;
 class nsIEditor;
 class nsIWebProgress;
 
 class nsEditingSession final : public nsIEditingSession,
-                                   public nsIWebProgressListener,
-                                   public nsSupportsWeakReference
+                               public nsIWebProgressListener,
+                               public nsSupportsWeakReference
 {
 public:
 
   nsEditingSession();
 
   // nsISupports
   NS_DECL_ISUPPORTS
 
--- a/editor/libeditor/nsHTMLEditor.h
+++ b/editor/libeditor/nsHTMLEditor.h
@@ -60,24 +60,24 @@ struct IMEState;
 } // namespace widget
 } // namespace mozilla
 
 /**
  * The HTML editor implementation.<br>
  * Use to edit HTML document represented as a DOM tree. 
  */
 class nsHTMLEditor final : public nsPlaintextEditor,
-                               public nsIHTMLEditor,
-                               public nsIHTMLObjectResizer,
-                               public nsIHTMLAbsPosEditor,
-                               public nsITableEditor,
-                               public nsIHTMLInlineTableEditor,
-                               public nsIEditorStyleSheets,
-                               public nsICSSLoaderObserver,
-                               public nsStubMutationObserver
+                           public nsIHTMLEditor,
+                           public nsIHTMLObjectResizer,
+                           public nsIHTMLAbsPosEditor,
+                           public nsITableEditor,
+                           public nsIHTMLInlineTableEditor,
+                           public nsIEditorStyleSheets,
+                           public nsICSSLoaderObserver,
+                           public nsStubMutationObserver
 {
   typedef enum {eNoOp, eReplaceParent=1, eInsertParent=2} BlockTransformationType;
 
 public:
 
   enum ResizingRequestID
   {
     kX      = 0,
--- a/editor/txmgr/nsTransactionManager.h
+++ b/editor/txmgr/nsTransactionManager.h
@@ -19,17 +19,17 @@
 class nsITransaction;
 class nsITransactionListener;
 class nsTransactionItem;
 
 /** implementation of a transaction manager object.
  *
  */
 class nsTransactionManager final : public nsITransactionManager
-                                     , public nsSupportsWeakReference
+                                 , public nsSupportsWeakReference
 {
 private:
 
   int32_t                mMaxTransactionCount;
   nsTransactionStack     mDoStack;
   nsTransactionStack     mUndoStack;
   nsTransactionStack     mRedoStack;
   nsCOMArray<nsITransactionListener> mListeners;
--- a/editor/txtsvc/nsTextServicesDocument.h
+++ b/editor/txtsvc/nsTextServicesDocument.h
@@ -28,17 +28,17 @@ class nsISelection;
 class nsISelectionController;
 class nsITextServicesFilter;
 class nsString;
 
 /** implementation of a text services object.
  *
  */
 class nsTextServicesDocument final : public nsITextServicesDocument,
-                                         public nsIEditActionListener
+                                     public nsIEditActionListener
 {
 private:
   static nsIAtom *sAAtom;
   static nsIAtom *sAddressAtom;
   static nsIAtom *sBigAtom;
   static nsIAtom *sBAtom;
   static nsIAtom *sCiteAtom;
   static nsIAtom *sCodeAtom;
--- a/embedding/browser/nsDocShellTreeOwner.h
+++ b/embedding/browser/nsDocShellTreeOwner.h
@@ -56,22 +56,22 @@ class nsICDocShellTreeOwner : public nsI
 public:
     NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICDOCSHELLTREEOWNER_IID)
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsICDocShellTreeOwner,
                               NS_ICDOCSHELLTREEOWNER_IID)
 
 class nsDocShellTreeOwner final : public nsIDocShellTreeOwner,
-                                      public nsIBaseWindow,
-                                      public nsIInterfaceRequestor,
-                                      public nsIWebProgressListener,
-                                      public nsIDOMEventListener,
-                                      public nsICDocShellTreeOwner,
-                                      public nsSupportsWeakReference
+                                  public nsIBaseWindow,
+                                  public nsIInterfaceRequestor,
+                                  public nsIWebProgressListener,
+                                  public nsIDOMEventListener,
+                                  public nsICDocShellTreeOwner,
+                                  public nsSupportsWeakReference
 {
 friend class nsWebBrowser;
 friend class nsCommandHandler;
 
 public:
     NS_DECL_ISUPPORTS
 
     NS_DECL_NSIBASEWINDOW
--- a/embedding/browser/nsWebBrowser.h
+++ b/embedding/browser/nsWebBrowser.h
@@ -68,29 +68,29 @@ public:
 };
 
 //  {cda5863a-aa9c-411e-be49-ea0d525ab4b5} -
 #define NS_WEBBROWSER_CID \
 {0xcda5863a, 0xaa9c, 0x411e, { 0xbe, 0x49, 0xea, 0x0d, 0x52, 0x5a, 0xb4, 0xb5 }}
 
 
 class nsWebBrowser final : public nsIWebBrowser,
-                               public nsIWebNavigation,
-                               public nsIWebBrowserSetup,
-                               public nsIDocShellTreeItem,
-                               public nsIBaseWindow,
-                               public nsIScrollable,
-                               public nsITextScroll,
-                               public nsIInterfaceRequestor,
-                               public nsIWebBrowserPersist,
-                               public nsIWebBrowserFocus,
-                               public nsIWebProgressListener,
-                               public nsIWebBrowserStream,
-                               public nsIWidgetListener,
-                               public nsSupportsWeakReference
+                           public nsIWebNavigation,
+                           public nsIWebBrowserSetup,
+                           public nsIDocShellTreeItem,
+                           public nsIBaseWindow,
+                           public nsIScrollable,
+                           public nsITextScroll,
+                           public nsIInterfaceRequestor,
+                           public nsIWebBrowserPersist,
+                           public nsIWebBrowserFocus,
+                           public nsIWebProgressListener,
+                           public nsIWebBrowserStream,
+                           public nsIWidgetListener,
+                           public nsSupportsWeakReference
 {
   friend class nsDocShellTreeOwner;
 public:
   nsWebBrowser();
 
   NS_DECL_ISUPPORTS
 
   NS_DECL_NSIBASEWINDOW
--- a/embedding/components/printingui/ipc/PrintProgressDialogChild.h
+++ b/embedding/components/printingui/ipc/PrintProgressDialogChild.h
@@ -10,18 +10,18 @@
 #include "nsIWebProgressListener.h"
 
 class nsIObserver;
 
 namespace mozilla {
 namespace embedding {
 
 class PrintProgressDialogChild final : public PPrintProgressDialogChild,
-                                           public nsIWebProgressListener,
-                                           public nsIPrintProgressParams
+                                       public nsIWebProgressListener,
+                                       public nsIPrintProgressParams
 {
   NS_DECL_ISUPPORTS
   NS_DECL_NSIWEBPROGRESSLISTENER
   NS_DECL_NSIPRINTPROGRESSPARAMS
 
 public:
   MOZ_IMPLICIT PrintProgressDialogChild(nsIObserver* aOpenObserver);
 
--- a/embedding/components/printingui/ipc/PrintProgressDialogParent.h
+++ b/embedding/components/printingui/ipc/PrintProgressDialogParent.h
@@ -9,17 +9,17 @@
 #include "nsIObserver.h"
 
 class nsIPrintProgressParams;
 class nsIWebProgressListener;
 
 namespace mozilla {
 namespace embedding {
 class PrintProgressDialogParent final : public PPrintProgressDialogParent,
-                                            public nsIObserver
+                                        public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIOBSERVER
 
   MOZ_IMPLICIT PrintProgressDialogParent();
 
   void SetWebProgressListener(nsIWebProgressListener* aListener);
--- a/extensions/cookie/nsPermissionManager.h
+++ b/extensions/cookie/nsPermissionManager.h
@@ -24,18 +24,18 @@
 class nsIPermission;
 class nsIIDNService;
 class mozIStorageConnection;
 class mozIStorageAsyncStatement;
 
 ////////////////////////////////////////////////////////////////////////////////
 
 class nsPermissionManager final : public nsIPermissionManager,
-                                      public nsIObserver,
-                                      public nsSupportsWeakReference
+                                  public nsIObserver,
+                                  public nsSupportsWeakReference
 {
 public:
   class PermissionEntry
   {
   public:
     PermissionEntry(int64_t aID, uint32_t aType, uint32_t aPermission,
                     uint32_t aExpireType, int64_t aExpireTime,
                     int64_t aModificationTime)
--- a/extensions/gio/nsGIOProtocolHandler.cpp
+++ b/extensions/gio/nsGIOProtocolHandler.cpp
@@ -878,17 +878,17 @@ mount_operation_ask_password (GMountOper
   nsMemory::Free(user);
   nsMemory::Free(pass);
   g_mount_operation_reply(mount_op, G_MOUNT_OPERATION_HANDLED);
 }
 
 //-----------------------------------------------------------------------------
 
 class nsGIOProtocolHandler final : public nsIProtocolHandler
-                                     , public nsIObserver
+                                 , public nsIObserver
 {
   public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIPROTOCOLHANDLER
     NS_DECL_NSIOBSERVER
 
     nsresult Init();
 
--- a/extensions/permissions/nsContentBlocker.h
+++ b/extensions/permissions/nsContentBlocker.h
@@ -11,18 +11,18 @@
 #include "nsIPrefBranch.h"
 #include "mozilla/Attributes.h"
 
 class nsIPrefBranch;
 
 ////////////////////////////////////////////////////////////////////////////////
 
 class nsContentBlocker final : public nsIContentPolicy,
-                                   public nsIObserver,
-                                   public nsSupportsWeakReference
+                               public nsIObserver,
+                               public nsSupportsWeakReference
 {
 public:
 
   // nsISupports
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTENTPOLICY
   NS_DECL_NSIOBSERVER
 
--- a/extensions/spellcheck/hunspell/src/mozHunspell.h
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.h
@@ -77,19 +77,19 @@
 
 #define MOZ_HUNSPELL_CONTRACTID "@mozilla.org/spellchecker/engine;1"
 #define MOZ_HUNSPELL_CID         \
 /* 56c778e4-1bee-45f3-a689-886692a97fe7 */   \
 { 0x56c778e4, 0x1bee, 0x45f3, \
   { 0xa6, 0x89, 0x88, 0x66, 0x92, 0xa9, 0x7f, 0xe7 } }
 
 class mozHunspell final : public mozISpellCheckingEngine,
-                              public nsIObserver,
-                              public nsSupportsWeakReference,
-                              public nsIMemoryReporter
+                          public nsIObserver,
+                          public nsSupportsWeakReference,
+                          public nsIMemoryReporter
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_MOZISPELLCHECKINGENGINE
   NS_DECL_NSIOBSERVER
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(mozHunspell, mozISpellCheckingEngine)
 
   mozHunspell();
--- a/extensions/spellcheck/src/mozInlineSpellChecker.h
+++ b/extensions/spellcheck/src/mozInlineSpellChecker.h
@@ -112,19 +112,19 @@ protected:
 
   nsresult GetDocument(nsIDOMDocument** aDocument);
   nsresult PositionToCollapsedRange(nsIDOMDocument* aDocument,
                                     nsIDOMNode* aNode, int32_t aOffset,
                                     nsIDOMRange** aRange);
 };
 
 class mozInlineSpellChecker final : public nsIInlineSpellChecker,
-                                        public nsIEditActionListener,
-                                        public nsIDOMEventListener,
-                                        public nsSupportsWeakReference
+                                    public nsIEditActionListener,
+                                    public nsIDOMEventListener,
+                                    public nsSupportsWeakReference
 {
 private:
   friend class mozInlineSpellStatus;
   friend class InitEditorSpellCheckCallback;
   friend class UpdateCurrentDictionaryCallback;
   friend class AutoChangeNumPendingSpellChecks;
   friend class mozInlineSpellResume;
 
--- a/extensions/spellcheck/src/mozPersonalDictionary.h
+++ b/extensions/spellcheck/src/mozPersonalDictionary.h
@@ -22,18 +22,18 @@
 #define MOZ_PERSONALDICTIONARY_CID         \
 { /* 7EF52EAF-B7E1-462B-87E2-5D1DBACA9048 */  \
 0X7EF52EAF, 0XB7E1, 0X462B, \
   { 0X87, 0XE2, 0X5D, 0X1D, 0XBA, 0XCA, 0X90, 0X48 } }
 
 class mozPersonalDictionaryLoader;
 
 class mozPersonalDictionary final : public mozIPersonalDictionary,
-                                        public nsIObserver,
-                                        public nsSupportsWeakReference
+                                    public nsIObserver,
+                                    public nsSupportsWeakReference
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_MOZIPERSONALDICTIONARY
   NS_DECL_NSIOBSERVER
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(mozPersonalDictionary, mozIPersonalDictionary)
 
   mozPersonalDictionary();
--- a/gfx/2d/ExtendInputEffectD2D1.h
+++ b/gfx/2d/ExtendInputEffectD2D1.h
@@ -29,17 +29,17 @@ enum {
 // ExtendInput effect can extend the input rect, and not just make it smaller.
 // The added margins are filled with transparent black.
 // Some effects have different output depending on their input effect's output
 // rect, for example the Border effect (which repeats the edges of its input
 // effect's output rect) or the component transfer and color matrix effects
 // (which can transform transparent pixels into non-transparent ones, but only
 // inside their input effect's output rect).
 class ExtendInputEffectD2D1 final : public ID2D1EffectImpl
-                                      , public ID2D1DrawTransform
+                                  , public ID2D1DrawTransform
 {
 public:
   // ID2D1EffectImpl
   IFACEMETHODIMP Initialize(ID2D1EffectContext* pContextInternal, ID2D1TransformGraph* pTransformGraph);
   IFACEMETHODIMP PrepareForRender(D2D1_CHANGE_TYPE changeType);
   IFACEMETHODIMP SetGraph(ID2D1TransformGraph* pGraph);
 
   // IUnknown
--- a/gfx/2d/RadialGradientEffectD2D1.h
+++ b/gfx/2d/RadialGradientEffectD2D1.h
@@ -34,17 +34,17 @@ enum {
   RADIAL_PROP_CENTER_1,
   RADIAL_PROP_CENTER_2,
   RADIAL_PROP_RADIUS_1,
   RADIAL_PROP_RADIUS_2,
   RADIAL_PROP_TRANSFORM
 };
 
 class RadialGradientEffectD2D1 final : public ID2D1EffectImpl
-                                         , public ID2D1DrawTransform
+                                     , public ID2D1DrawTransform
 {
 public:
   // ID2D1EffectImpl
   IFACEMETHODIMP Initialize(ID2D1EffectContext* pContextInternal, ID2D1TransformGraph* pTransformGraph);
   IFACEMETHODIMP PrepareForRender(D2D1_CHANGE_TYPE changeType);
   IFACEMETHODIMP SetGraph(ID2D1TransformGraph* pGraph);
 
   // IUnknown
--- a/gfx/layers/client/ClientPaintedLayer.h
+++ b/gfx/layers/client/ClientPaintedLayer.h
@@ -23,17 +23,17 @@ class gfxContext;
 namespace mozilla {
 namespace layers {
 
 class CompositableClient;
 class ShadowableLayer;
 class SpecificLayerAttributes;
 
 class ClientPaintedLayer : public PaintedLayer,
-                          public ClientLayer {
+                           public ClientLayer {
 public:
   typedef RotatedContentBuffer::PaintState PaintState;
   typedef RotatedContentBuffer::ContentType ContentType;
 
   explicit ClientPaintedLayer(ClientLayerManager* aLayerManager,
                              LayerManager::PaintedLayerCreationHint aCreationHint = LayerManager::NONE) :
     PaintedLayer(aLayerManager, static_cast<ClientLayer*>(this), aCreationHint),
     mContentClient(nullptr)
--- a/gfx/layers/client/ClientTiledPaintedLayer.h
+++ b/gfx/layers/client/ClientTiledPaintedLayer.h
@@ -31,17 +31,17 @@ class SpecificLayerAttributes;
  * thread via the layers protocol. Tiles are uploaded by the buffers
  * asynchonously without using IPC, that means they are not safe for cross-
  * process use (bug 747811). Each tile has a TextureHost/Client pair but
  * they communicate directly rather than using the Texture protocol.
  *
  * There is no ContentClient for tiled layers. There is a ContentHost, however.
  */
 class ClientTiledPaintedLayer : public PaintedLayer,
-                               public ClientLayer
+                                public ClientLayer
 {
   typedef PaintedLayer Base;
 
 public:
   explicit ClientTiledPaintedLayer(ClientLayerManager* const aManager,
                                   ClientLayerManager::PaintedLayerCreationHint aCreationHint = LayerManager::NONE);
 
 protected:
--- a/gfx/layers/client/ContentClient.h
+++ b/gfx/layers/client/ContentClient.h
@@ -124,17 +124,17 @@ public:
 
   virtual void Updated(const nsIntRegion& aRegionToDraw,
                        const nsIntRegion& aVisibleRegion,
                        bool aDidSelfCopy) = 0;
 };
 
 // thin wrapper around RotatedContentBuffer, for on-mtc
 class ContentClientBasic final : public ContentClient
-                                   , protected RotatedContentBuffer
+                               , protected RotatedContentBuffer
 {
 public:
   ContentClientBasic();
 
   typedef RotatedContentBuffer::PaintState PaintState;
   typedef RotatedContentBuffer::ContentType ContentType;
 
   virtual void Clear() override { RotatedContentBuffer::Clear(); }
--- a/gfx/layers/composite/PaintedLayerComposite.h
+++ b/gfx/layers/composite/PaintedLayerComposite.h
@@ -29,17 +29,17 @@ namespace layers {
  * non-tiled PaintedLayers and single or double buffering.
  */
 
 class CompositableHost;
 class ContentHost;
 class TiledLayerComposer;
 
 class PaintedLayerComposite : public PaintedLayer,
-                             public LayerComposite
+                              public LayerComposite
 {
 public:
   explicit PaintedLayerComposite(LayerManagerComposite *aManager);
 
 protected:
   virtual ~PaintedLayerComposite();
 
 public:
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -1501,17 +1501,17 @@ CompositorParent::RequestNotifyLayerTree
  * This class handles layer updates pushed directly from child
  * processes to the compositor thread.  It's associated with a
  * CompositorParent on the compositor thread.  While it uses the
  * PCompositor protocol to manage these updates, it doesn't actually
  * drive compositing itself.  For that it hands off work to the
  * CompositorParent it's associated with.
  */
 class CrossProcessCompositorParent final : public PCompositorParent,
-                                               public ShadowLayersManager
+                                           public ShadowLayersManager
 {
   friend class CompositorParent;
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(CrossProcessCompositorParent)
 public:
   CrossProcessCompositorParent(Transport* aTransport, ProcessId aOtherProcess)
     : mTransport(aTransport)
     , mChildProcessId(aOtherProcess)
--- a/gfx/layers/ipc/CompositorParent.h
+++ b/gfx/layers/ipc/CompositorParent.h
@@ -138,17 +138,17 @@ public:
 
   virtual void ObserveUpdate(uint64_t aLayersId, bool aActive) = 0;
 
 protected:
   virtual ~CompositorUpdateObserver() {}
 };
 
 class CompositorParent final : public PCompositorParent,
-                                   public ShadowLayersManager
+                               public ShadowLayersManager
 {
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(CompositorParent)
   friend class CompositorVsyncObserver;
 
 public:
   explicit CompositorParent(nsIWidget* aWidget,
                             bool aUseExternalSurfaceSize = false,
                             int aSurfaceWidth = -1, int aSurfaceHeight = -1);
--- a/gfx/layers/ipc/ImageBridgeChild.h
+++ b/gfx/layers/ipc/ImageBridgeChild.h
@@ -97,18 +97,18 @@ bool InImageBridgeChildThread();
  * CompositableHost happens. In this (unlikely) case the layer is not composited
  * until the layer transaction happens. This means this scenario is not harmful.
  *
  * Since sending an image through imageBridge triggers compositing, the main thread is
  * not used at all (except for the very first transaction that provides the
  * CompositableHost with an AsyncID).
  */
 class ImageBridgeChild final : public PImageBridgeChild
-                                 , public CompositableForwarder
-                                 , public AsyncTransactionTrackersHolder
+                             , public CompositableForwarder
+                             , public AsyncTransactionTrackersHolder
 {
   friend class ImageContainer;
   typedef InfallibleTArray<AsyncParentMessageData> AsyncParentMessageArray;
 public:
 
   /**
    * Creates the image bridge with a dedicated thread for ImageBridgeChild.
    *
--- a/gfx/layers/ipc/ImageBridgeParent.h
+++ b/gfx/layers/ipc/ImageBridgeParent.h
@@ -33,17 +33,17 @@ class Shmem;
 namespace layers {
 
 /**
  * ImageBridgeParent is the manager Protocol of ImageContainerParent.
  * It's purpose is mainly to setup the IPDL connection. Most of the
  * interesting stuff is in ImageContainerParent.
  */
 class ImageBridgeParent final : public PImageBridgeParent,
-                                    public CompositableParentManager
+                                public CompositableParentManager
 {
 public:
   typedef InfallibleTArray<CompositableOperation> EditArray;
   typedef InfallibleTArray<EditReply> EditReplyArray;
   typedef InfallibleTArray<AsyncChildMessageData> AsyncChildMessageArray;
 
   ImageBridgeParent(MessageLoop* aLoop, Transport* aTransport, ProcessId aChildProcessId);
   ~ImageBridgeParent();
--- a/gfx/layers/opengl/TextureHostOGL.h
+++ b/gfx/layers/opengl/TextureHostOGL.h
@@ -180,18 +180,18 @@ protected:
  *
  * Depending on the underlying TextureImage, may support texture tiling, so
  * make sure to check AsBigImageIterator() and use the texture accordingly.
  *
  * This TextureSource can be used without a TextureHost and manage it's own
  * GL texture(s).
  */
 class TextureImageTextureSourceOGL final : public DataTextureSource
-                                             , public TextureSourceOGL
-                                             , public BigImageIterator
+                                         , public TextureSourceOGL
+                                         , public BigImageIterator
 {
 public:
   explicit TextureImageTextureSourceOGL(CompositorOGL *aCompositor,
                                         TextureFlags aFlags = TextureFlags::DEFAULT)
     : mCompositor(aCompositor)
     , mFlags(aFlags)
     , mIterating(false)
   {}
--- a/gfx/src/nsRegion.cpp
+++ b/gfx/src/nsRegion.cpp
@@ -331,33 +331,33 @@ void nsRegion::SimplifyOutwardByArea(uin
     }
     uint32_t totalArea = ComputeMergedAreaIncrease(topRects, topRectsEnd,
                                                    bottomRects, bottomRectsEnd);
 
     if (totalArea <= aThreshold) {
       // merge the rects into tmpRect
       rect = MergeRects(topRects, topRectsEnd, bottomRects, bottomRectsEnd, tmpRect);
 
+      // set topRects to where the newly merged rects will be so that we use them
+      // as our next set of topRects
+      topRects = destRect;
       // copy the merged rects back into the destination
       topRectsEnd = CopyRow(destRect, tmpRect, rect);
-      topRects = destRect;
-      bottomRects = bottomRectsEnd;
-      destRect = topRects;
     } else {
       // copy the unmerged rects
       destRect = CopyRow(destRect, topRects, topRectsEnd);
 
       topRects = bottomRects;
       topRectsEnd = bottomRectsEnd;
-      bottomRects = bottomRectsEnd;
       if (bottomRectsEnd == end) {
         // copy the last row when we are done
         topRectsEnd = CopyRow(destRect, topRects, topRectsEnd);
       }
     }
+    bottomRects = bottomRectsEnd;
   } while (bottomRectsEnd != end);
 
 
   uint32_t reducedCount = topRectsEnd - pixman_region32_rectangles(&this->mImpl, &n);
   // pixman has a special representation for
   // regions of 1 rectangle. So just use the
   // bounds in that case
   if (reducedCount > 1) {
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -41,17 +41,17 @@
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 static FT_Library gPlatformFTLibrary = nullptr;
 
 class FreetypeReporter final : public nsIMemoryReporter,
-                                   public CountingAllocatorBase<FreetypeReporter>
+                               public CountingAllocatorBase<FreetypeReporter>
 {
 private:
     ~FreetypeReporter() {}
 
 public:
     NS_DECL_ISUPPORTS
 
     static void* Malloc(FT_Memory, long size)
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -139,17 +139,17 @@ static void ShutdownCMS();
 
 #include "mozilla/gfx/2D.h"
 #include "mozilla/gfx/SourceSurfaceCairo.h"
 using namespace mozilla::gfx;
 
 /* Class to listen for pref changes so that chrome code can dynamically
    force sRGB as an output profile. See Bug #452125. */
 class SRGBOverrideObserver final : public nsIObserver,
-                                       public nsSupportsWeakReference
+                                   public nsSupportsWeakReference
 {
     ~SRGBOverrideObserver() {}
 public:
     NS_DECL_ISUPPORTS
     NS_DECL_NSIOBSERVER
 };
 
 /// This override of the LogForwarder, initially used for the critical graphics
--- a/image/decoders/icon/nsIconURI.h
+++ b/image/decoders/icon/nsIconURI.h
@@ -8,17 +8,17 @@
 #define nsMozIconURI_h__
 
 #include "nsIIconURI.h"
 #include "nsCOMPtr.h"
 #include "nsString.h"
 #include "nsIIPCSerializableURI.h"
 
 class nsMozIconURI final : public nsIMozIconURI
-                             , public nsIIPCSerializableURI
+                         , public nsIIPCSerializableURI
 {
 public:
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIURI
   NS_DECL_NSIMOZICONURI
   NS_DECL_NSIIPCSERIALIZABLEURI
 
   // nsMozIconURI
--- a/image/src/RasterImage.h
+++ b/image/src/RasterImage.h
@@ -141,20 +141,20 @@ class SourceBuffer;
 inline MOZ_CONSTEXPR uint32_t
 DecodeFlags(uint32_t aFlags)
 {
   return aFlags & (imgIContainer::FLAG_DECODE_NO_PREMULTIPLY_ALPHA |
                    imgIContainer::FLAG_DECODE_NO_COLORSPACE_CONVERSION);
 }
 
 class RasterImage final : public ImageResource
-                            , public nsIProperties
-                            , public SupportsWeakPtr<RasterImage>
+                        , public nsIProperties
+                        , public SupportsWeakPtr<RasterImage>
 #ifdef DEBUG
-                            , public imgIContainerDebug
+                        , public imgIContainerDebug
 #endif
 {
   // (no public constructor - use ImageFactory)
   virtual ~RasterImage();
 
 public:
   MOZ_DECLARE_REFCOUNTED_TYPENAME(RasterImage)
   NS_DECL_THREADSAFE_ISUPPORTS
--- a/image/src/SVGDocumentWrapper.h
+++ b/image/src/SVGDocumentWrapper.h
@@ -31,18 +31,18 @@ struct nsIntSize;
 namespace mozilla {
 namespace dom {
 class SVGSVGElement;
 }
 
 namespace image {
 
 class SVGDocumentWrapper final : public nsIStreamListener,
-                                     public nsIObserver,
-                                     nsSupportsWeakReference
+                                 public nsIObserver,
+                                 nsSupportsWeakReference
 {
 public:
   SVGDocumentWrapper();
 
   NS_DECL_ISUPPORTS
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSIOBSERVER
--- a/image/src/VectorImage.h
+++ b/image/src/VectorImage.h
@@ -22,17 +22,17 @@ namespace image {
 
 struct SVGDrawingParameters;
 class  SVGDocumentWrapper;
 class  SVGRootRenderingObserver;
 class  SVGLoadEventListener;
 class  SVGParseCompleteListener;
 
 class VectorImage final : public ImageResource,
-                              public nsIStreamListener
+                          public nsIStreamListener
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSIREQUESTOBSERVER
   NS_DECL_NSISTREAMLISTENER
   NS_DECL_IMGICONTAINER
 
   // (no public constructor - use ImageFactory)
--- a/image/src/imgLoader.h
+++ b/image/src/imgLoader.h
@@ -207,20 +207,20 @@ private:
 };
 
 enum class AcceptedMimeTypes : uint8_t {
   IMAGES,
   IMAGES_AND_DOCUMENTS,
 };
 
 class imgLoader final : public imgILoader,
-                            public nsIContentSniffer,
-                            public imgICache,
-                            public nsSupportsWeakReference,
-                            public nsIObserver
+                        public nsIContentSniffer,
+                        public imgICache,
+                        public nsSupportsWeakReference,
+                        public nsIObserver
 {
   virtual ~imgLoader();
 
 public:
   typedef mozilla::image::ImageURL ImageURL;
   typedef nsRefPtrHashtable<nsCStringHashKey, imgCacheEntry> imgCacheTable;
   typedef nsTHashtable<nsPtrHashKey<imgRequest>> imgSet;
   typedef mozilla::net::ReferrerPolicy ReferrerPolicy;
--- a/image/src/imgRequest.h
+++ b/image/src/imgRequest.h
@@ -38,20 +38,20 @@ class Image;
 class ImageURL;
 class ProgressTracker;
 } // namespace image
 } // namespace mozilla
 
 struct NewPartResult;
 
 class imgRequest final : public nsIStreamListener,
-                             public nsIThreadRetargetableStreamListener,
-                             public nsIChannelEventSink,
-                             public nsIInterfaceRequestor,
-                             public nsIAsyncVerifyRedirectCallback
+                         public nsIThreadRetargetableStreamListener,
+                         public nsIChannelEventSink,
+                         public nsIInterfaceRequestor,
+                         public nsIAsyncVerifyRedirectCallback
 {
   typedef mozilla::image::Image Image;
   typedef mozilla::image::ImageURL ImageURL;
   typedef mozilla::image::ProgressTracker ProgressTracker;
   typedef mozilla::net::ReferrerPolicy ReferrerPolicy;
 
 public:
   explicit imgRequest(imgLoader* aLoader);
--- a/ipc/bluetooth/BluetoothDaemonConnection.cpp
+++ b/ipc/bluetooth/BluetoothDaemonConnection.cpp
@@ -186,17 +186,17 @@ BluetoothDaemonPDUConsumer::BluetoothDae
 BluetoothDaemonPDUConsumer::~BluetoothDaemonPDUConsumer()
 { }
 
 //
 // BluetoothDaemonConnectionIO
 //
 
 class BluetoothDaemonConnectionIO final : public UnixSocketWatcher
-                                            , public ConnectionOrientedSocketIO
+                                        , public ConnectionOrientedSocketIO
 {
 public:
   BluetoothDaemonConnectionIO(MessageLoop* aIOLoop, int aFd,
                               ConnectionStatus aConnectionStatus,
                               BluetoothDaemonConnection* aConnection,
                               BluetoothDaemonPDUConsumer* aConsumer);
 
   SocketBase* GetSocketBase();
--- a/ipc/glue/MessagePump.cpp
+++ b/ipc/glue/MessagePump.cpp
@@ -37,17 +37,17 @@ using namespace mozilla::ipc;
 NS_DEFINE_NAMED_CID(NS_TIMER_CID);
 
 static mozilla::DebugOnly<MessagePump::Delegate*> gFirstDelegate;
 
 namespace mozilla {
 namespace ipc {
 
 class DoWorkRunnable final : public nsICancelableRunnable,
-                                 public nsITimerCallback
+                             public nsITimerCallback
 {
 public:
   explicit DoWorkRunnable(MessagePump* aPump)
   : mPump(aPump)
   {
     MOZ_ASSERT(aPump);
   }
 
--- a/ipc/glue/WindowsMessageLoop.cpp
+++ b/ipc/glue/WindowsMessageLoop.cpp
@@ -99,16 +99,17 @@ nsTArray<HWND>* gNeuteredWindows = nullp
 
 typedef nsTArray<nsAutoPtr<DeferredMessage> > DeferredMessageArray;
 DeferredMessageArray* gDeferredMessages = nullptr;
 
 HHOOK gDeferredGetMsgHook = nullptr;
 HHOOK gDeferredCallWndProcHook = nullptr;
 
 DWORD gUIThreadId = 0;
+HWND gCOMWindow = 0;
 
 // WM_GETOBJECT id pulled from uia headers
 #define MOZOBJID_UIAROOT -25
 
 LRESULT CALLBACK
 DeferredMessageHook(int nCode,
                     WPARAM wParam,
                     LPARAM lParam)
@@ -335,23 +336,25 @@ ProcessOrDeferMessage(HWND hwnd,
       return 0;
 
     // We only support a query for our IAccessible or UIA pointers.
     // This should be safe, and needs to be sync.
 #if defined(ACCESSIBILITY)
    case WM_GETOBJECT: {
       if (!::GetPropW(hwnd, k3rdPartyWindowProp)) {
         DWORD objId = static_cast<DWORD>(lParam);
-        WNDPROC oldWndProc = (WNDPROC)GetProp(hwnd, kOldWndProcProp);
-        if ((objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT) && oldWndProc) {
-          return CallWindowProcW(oldWndProc, hwnd, uMsg, wParam, lParam);
+        if ((objId == OBJID_CLIENT || objId == MOZOBJID_UIAROOT)) {
+          WNDPROC oldWndProc = (WNDPROC)GetProp(hwnd, kOldWndProcProp);
+          if (oldWndProc) {
+            return CallWindowProcW(oldWndProc, hwnd, uMsg, wParam, lParam);
+          }
         }
       }
-      break;
-    }
+      return DefWindowProc(hwnd, uMsg, wParam, lParam);
+   }
 #endif // ACCESSIBILITY
 
     default: {
       // Unknown messages only are logged in debug builds and sent to
       // DefWindowProc.
       if (uMsg && uMsg == mozilla::widget::sAppShellGeckoMsgId) {
         // Widget's registered native event callback
         deferred = new DeferredSendMessage(hwnd, uMsg, wParam,