Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 22 Apr 2019 16:35:03 +0000
changeset 529184 44928a7f57454b09e22399f2bb45f715015c267b
parent 529183 3073770e06f157040f4c64951b7e8425e1ad7bbe
child 529185 dddeb70e81e72d019d4309ac2dd138b7f03c1a2b
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1519636
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D28329
accessible/base/nsAccessibilityService.cpp
browser/app/winlauncher/DllBlocklistWin.cpp
browser/app/winlauncher/LauncherProcessWin.cpp
caps/OriginAttributes.cpp
caps/OriginAttributes.h
caps/nsJSPrincipals.cpp
caps/tests/gtest/TestOriginAttributes.cpp
dom/base/DocumentOrShadowRoot.cpp
dom/base/SelectionChangeEventDispatcher.h
dom/base/nsDOMWindowUtils.cpp
dom/base/nsGlobalWindowOuter.cpp
dom/base/nsHistory.h
dom/base/nsIDocumentObserver.h
dom/gamepad/GamepadRemapping.cpp
dom/html/HTMLLinkElement.cpp
dom/indexedDB/ActorsParent.cpp
dom/ipc/ContentChild.cpp
dom/ipc/ContentParent.cpp
dom/media/GraphDriver.h
dom/media/VideoUtils.cpp
dom/media/webrtc/MediaEngineWebRTC.cpp
dom/quota/Client.h
dom/simpledb/ActorsParent.cpp
dom/workers/WorkerError.cpp
dom/workers/WorkerPrivate.cpp
dom/workers/sharedworkers/SharedWorkerService.cpp
gfx/gl/GLContext.cpp
gfx/layers/apz/src/APZCTreeManager.cpp
gfx/layers/ipc/CompositorBridgeParent.h
gfx/layers/ipc/CompositorVsyncScheduler.cpp
gfx/webrender_bindings/RenderThread.cpp
gfx/webrender_bindings/WebRenderAPI.cpp
gfx/webrender_bindings/WebRenderAPI.h
js/public/TraceKind.h
js/public/TrackedOptimizationInfo.h
js/src/gc/Marking.cpp
js/src/gc/RootMarking.cpp
js/src/jit/arm/Assembler-arm.h
js/src/jit/arm/MacroAssembler-arm.cpp
js/src/jit/arm64/Assembler-arm64.h
js/src/jit/arm64/MacroAssembler-arm64-inl.h
js/src/jit/arm64/MacroAssembler-arm64.cpp
js/src/jsapi.cpp
js/src/vm/Scope.cpp
js/src/vm/Scope.h
js/src/vm/TypeInference-inl.h
js/src/wasm/WasmBaselineCompile.cpp
js/src/wasm/WasmFrameIter.cpp
layout/base/nsRefreshDriver.cpp
layout/generic/nsBlockFrame.cpp
layout/generic/nsTextFrame.cpp
layout/painting/nsDisplayList.h
layout/style/ServoTypes.h
layout/svg/nsSVGPatternFrame.cpp
mozglue/misc/ImportDir.h
mozglue/misc/NativeNt.h
netwerk/protocol/http/HttpBaseChannel.cpp
netwerk/protocol/http/nsHttpChannel.cpp
netwerk/protocol/http/nsHttpConnection.cpp
netwerk/protocol/http/nsHttpHandler.h
netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
testing/mochitest/ssltunnel/ssltunnel.cpp
toolkit/profile/nsToolkitProfileService.cpp
toolkit/xre/Bootstrap.h
toolkit/xre/LauncherResult.h
xpcom/glue/FileUtils.cpp
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -1390,17 +1390,18 @@ nsAccessibilityService::CreateAccessible
     case eHTMLTableRowType: {
       // Accessible HTML table row may be a child of tbody/tfoot/thead of
       // accessible HTML table or a direct child of accessible of HTML table.
       Accessible* table = aContext->IsTable() ? aContext : nullptr;
       if (!table && aContext->Parent() && aContext->Parent()->IsTable())
         table = aContext->Parent();
 
       if (table) {
-        nsIContent* parentContent = aContent->GetParentOrHostNode()->AsContent();
+        nsIContent* parentContent =
+            aContent->GetParentOrHostNode()->AsContent();
         nsIFrame* parentFrame = nullptr;
         if (parentContent) {
           parentFrame = parentContent->GetPrimaryFrame();
           if (!parentFrame || !parentFrame->IsTableWrapperFrame()) {
             parentContent = parentContent->GetParentOrHostNode()->AsContent();
             if (parentContent) {
               parentFrame = parentContent->GetPrimaryFrame();
             }
--- a/browser/app/winlauncher/DllBlocklistWin.cpp
+++ b/browser/app/winlauncher/DllBlocklistWin.cpp
@@ -341,25 +341,24 @@ LauncherVoidResult InitializeDllBlocklis
 
   mozilla::nt::PEHeaders ourExeImage(ourModule);
   if (!ourExeImage) {
     return LAUNCHER_ERROR_FROM_WIN32(ERROR_BAD_EXE_FORMAT);
   }
 
   // As part of our mitigation of binary tampering, copy our import directory
   // from the original in our executable file.
-  LauncherVoidResult importDirRestored =
-    RestoreImportDirectory(aFullImagePath, ourExeImage, aChildProcess,
-                           ourModule);
+  LauncherVoidResult importDirRestored = RestoreImportDirectory(
+      aFullImagePath, ourExeImage, aChildProcess, ourModule);
   if (importDirRestored.isErr()) {
     return importDirRestored;
   }
 
   Maybe<nt::PEHeaders::IATThunks> ntdllThunks =
-    ourExeImage.GetIATThunksForModule("ntdll.dll");
+      ourExeImage.GetIATThunksForModule("ntdll.dll");
   if (!ntdllThunks) {
     return LAUNCHER_ERROR_FROM_WIN32(ERROR_INVALID_DATA);
   }
 
   PIMAGE_THUNK_DATA firstIatThunk = ntdllThunks.value().mFirstThunk;
   SIZE_T iatLength = ntdllThunks.value().Length();
   SIZE_T bytesWritten;
 
--- a/browser/app/winlauncher/LauncherProcessWin.cpp
+++ b/browser/app/winlauncher/LauncherProcessWin.cpp
@@ -36,20 +36,19 @@
 #endif  // defined(MOZ_LAUNCHER_PROCESS)
 
 /**
  * At this point the child process has been created in a suspended state. Any
  * additional startup work (eg, blocklist setup) should go here.
  *
  * @return Ok if browser startup should proceed
  */
-static mozilla::LauncherVoidResult PostCreationSetup(const wchar_t* aFullImagePath,
-                                                     HANDLE aChildProcess,
-                                                     HANDLE aChildMainThread,
-                                                     const bool aIsSafeMode) {
+static mozilla::LauncherVoidResult PostCreationSetup(
+    const wchar_t* aFullImagePath, HANDLE aChildProcess,
+    HANDLE aChildMainThread, const bool aIsSafeMode) {
   // The launcher process's DLL blocking code is incompatible with ASAN because
   // it is able to execute before ASAN itself has even initialized.
   // Also, the AArch64 build doesn't yet have a working interceptor.
 #if defined(MOZ_ASAN) || defined(_M_ARM64)
   return mozilla::Ok();
 #else
   return mozilla::InitializeDllBlocklistOOP(aFullImagePath, aChildProcess);
 #endif  // defined(MOZ_ASAN) || defined(_M_ARM64)
@@ -327,19 +326,18 @@ Maybe<int> LauncherMain(int& argc, wchar
   if (!createOk) {
     HandleLauncherError(LAUNCHER_ERROR_FROM_LAST());
     return Nothing();
   }
 
   nsAutoHandle process(pi.hProcess);
   nsAutoHandle mainThread(pi.hThread);
 
-  LauncherVoidResult setupResult =
-      PostCreationSetup(argv[0], process.get(), mainThread.get(),
-                        isSafeMode.value());
+  LauncherVoidResult setupResult = PostCreationSetup(
+      argv[0], process.get(), mainThread.get(), isSafeMode.value());
   if (setupResult.isErr()) {
     HandleLauncherError(setupResult);
     ::TerminateProcess(process.get(), 1);
     return Nothing();
   }
 
   if (::ResumeThread(mainThread.get()) == static_cast<DWORD>(-1)) {
     HandleLauncherError(LAUNCHER_ERROR_FROM_LAST());
--- a/caps/OriginAttributes.cpp
+++ b/caps/OriginAttributes.cpp
@@ -263,17 +263,18 @@ class MOZ_STACK_CLASS PopulateFromSuffix
 
     if (aName.EqualsLiteral("firstPartyDomain")) {
       MOZ_RELEASE_ASSERT(mOriginAttributes->mFirstPartyDomain.IsEmpty());
       mOriginAttributes->mFirstPartyDomain.Assign(aValue);
       return true;
     }
 
     if (aName.EqualsLiteral("geckoViewUserContextId")) {
-      MOZ_RELEASE_ASSERT(mOriginAttributes->mGeckoViewSessionContextId.IsEmpty());
+      MOZ_RELEASE_ASSERT(
+          mOriginAttributes->mGeckoViewSessionContextId.IsEmpty());
       mOriginAttributes->mGeckoViewSessionContextId.Assign(aValue);
       return true;
     }
 
     // No other attributes are supported.
     return false;
   }
 
--- a/caps/OriginAttributes.h
+++ b/caps/OriginAttributes.h
@@ -151,17 +151,18 @@ class OriginAttributesPattern : public d
     }
 
     if (mFirstPartyDomain.WasPassed() &&
         mFirstPartyDomain.Value() != aAttrs.mFirstPartyDomain) {
       return false;
     }
 
     if (mGeckoViewSessionContextId.WasPassed() &&
-        mGeckoViewSessionContextId.Value() != aAttrs.mGeckoViewSessionContextId) {
+        mGeckoViewSessionContextId.Value() !=
+            aAttrs.mGeckoViewSessionContextId) {
       return false;
     }
 
     return true;
   }
 
   bool Overlaps(const OriginAttributesPattern& aOther) const {
     if (mAppId.WasPassed() && aOther.mAppId.WasPassed() &&
@@ -186,18 +187,20 @@ class OriginAttributesPattern : public d
       return false;
     }
 
     if (mFirstPartyDomain.WasPassed() && aOther.mFirstPartyDomain.WasPassed() &&
         mFirstPartyDomain.Value() != aOther.mFirstPartyDomain.Value()) {
       return false;
     }
 
-    if (mGeckoViewSessionContextId.WasPassed() && aOther.mGeckoViewSessionContextId.WasPassed() &&
-        mGeckoViewSessionContextId.Value() != aOther.mGeckoViewSessionContextId.Value()) {
+    if (mGeckoViewSessionContextId.WasPassed() &&
+        aOther.mGeckoViewSessionContextId.WasPassed() &&
+        mGeckoViewSessionContextId.Value() !=
+            aOther.mGeckoViewSessionContextId.Value()) {
       return false;
     }
 
     return true;
   }
 };
 
 }  // namespace mozilla
--- a/caps/nsJSPrincipals.cpp
+++ b/caps/nsJSPrincipals.cpp
@@ -284,18 +284,18 @@ static bool ReadPrincipalInfo(JSStructur
 #endif
   }
 
   return true;
 }
 
 static StaticRefPtr<nsIPrincipal> sActiveWorkerPrincipal;
 
-nsJSPrincipals::AutoSetActiveWorkerPrincipal::AutoSetActiveWorkerPrincipal
-    (nsIPrincipal* aPrincipal) {
+nsJSPrincipals::AutoSetActiveWorkerPrincipal::AutoSetActiveWorkerPrincipal(
+    nsIPrincipal* aPrincipal) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_RELEASE_ASSERT(!sActiveWorkerPrincipal);
   sActiveWorkerPrincipal = aPrincipal;
 }
 
 nsJSPrincipals::AutoSetActiveWorkerPrincipal::~AutoSetActiveWorkerPrincipal() {
   sActiveWorkerPrincipal = nullptr;
 }
--- a/caps/tests/gtest/TestOriginAttributes.cpp
+++ b/caps/tests/gtest/TestOriginAttributes.cpp
@@ -4,17 +4,17 @@
 #include "gtest/gtest.h"
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/Preferences.h"
 #include "nsNetUtil.h"
 
 using mozilla::OriginAttributes;
 using mozilla::Preferences;
 
-static void TestSuffix(const OriginAttributes& attrs) {
+static void TestSuffix(const OriginAttributes &attrs) {
   nsAutoCString suffix;
   attrs.CreateSuffix(suffix);
 
   OriginAttributes attrsFromSuffix;
   bool success = attrsFromSuffix.PopulateFromSuffix(suffix);
   EXPECT_TRUE(success);
 
   EXPECT_EQ(attrs, attrsFromSuffix);
--- a/dom/base/DocumentOrShadowRoot.cpp
+++ b/dom/base/DocumentOrShadowRoot.cpp
@@ -356,18 +356,17 @@ Element* DocumentOrShadowRoot::ElementFr
   QueryNodesFromPoint(*this, aX, aY, options, flush, Multiple::No, elements);
   return elements.SafeElementAt(0);
 }
 
 void DocumentOrShadowRoot::NodesFromRect(float aX, float aY, float aTopSize,
                                          float aRightSize, float aBottomSize,
                                          float aLeftSize,
                                          bool aIgnoreRootScrollFrame,
-                                         bool aFlushLayout,
-                                         bool aOnlyVisible,
+                                         bool aFlushLayout, bool aOnlyVisible,
                                          nsTArray<RefPtr<nsINode>>& aReturn) {
   // Following the same behavior of elementFromPoint,
   // we don't return anything if either coord is negative
   if (!aIgnoreRootScrollFrame && (aX < 0 || aY < 0)) {
     return;
   }
 
   nscoord x = nsPresContext::CSSPixelsToAppUnits(aX - aLeftSize);
--- a/dom/base/SelectionChangeEventDispatcher.h
+++ b/dom/base/SelectionChangeEventDispatcher.h
@@ -15,17 +15,17 @@
 class nsINode;
 class nsRange;
 
 namespace mozilla {
 
 namespace dom {
 class Document;
 class Selection;
-}
+}  // namespace dom
 
 class SelectionChangeEventDispatcher final {
  public:
   // SelectionChangeEventDispatcher has to participate in cycle collection
   // because it holds strong references to nsINodes in its mOldRanges array.
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(
       SelectionChangeEventDispatcher)
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(SelectionChangeEventDispatcher)
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -1161,18 +1161,17 @@ nsDOMWindowUtils::NodesFromRect(float aX
   NS_ENSURE_STATE(doc);
 
   nsSimpleContentList* list = new nsSimpleContentList(doc);
   NS_ADDREF(list);
   *aReturn = list;
 
   AutoTArray<RefPtr<nsINode>, 8> nodes;
   doc->NodesFromRect(aX, aY, aTopSize, aRightSize, aBottomSize, aLeftSize,
-                     aIgnoreRootScrollFrame, aFlushLayout, aOnlyVisible,
-                     nodes);
+                     aIgnoreRootScrollFrame, aFlushLayout, aOnlyVisible, nodes);
   list->SetCapacity(nodes.Length());
   for (auto& node : nodes) {
     list->AppendElement(node->AsContent());
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -2819,18 +2819,18 @@ void nsPIDOMWindowOuter::SetInitialKeybo
 
   if (aShowAccelerators != UIStateChangeType_NoChange) {
     windowRoot->SetShowAccelerators(aShowAccelerators == UIStateChangeType_Set);
   }
   if (aShowFocusRings != UIStateChangeType_NoChange) {
     windowRoot->SetShowFocusRings(aShowFocusRings == UIStateChangeType_Set);
   }
 
-  nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(
-      this, aShowAccelerators, aShowFocusRings);
+  nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(this, aShowAccelerators,
+                                                        aShowFocusRings);
 }
 
 Element* nsPIDOMWindowOuter::GetFrameElementInternal() const {
   return mFrameElement;
 }
 
 void nsPIDOMWindowOuter::SetFrameElementInternal(Element* aFrameElement) {
   mFrameElement = aFrameElement;
@@ -6277,19 +6277,17 @@ void nsGlobalWindowOuter::ReallyCloseWin
            This works because we reach this code when we shouldn't only
            in the particular circumstance that we belong to a tab
            that has just been closed (and is therefore already missing
            from the list of browsers) (and has an unload handler
            that closes the window). */
         // XXXbz now that we have mHavePendingClose, is this needed?
         bool isTab;
         if (rootWin == this || !bwin ||
-            (NS_SUCCEEDED(
-                 bwin->IsTabContentWindow(this, &isTab)) &&
-             isTab)) {
+            (NS_SUCCEEDED(bwin->IsTabContentWindow(this, &isTab)) && isTab)) {
           treeOwnerAsWin->Destroy();
         }
       }
     }
 
     CleanUp();
   }
 }
@@ -6844,18 +6842,18 @@ void nsGlobalWindowOuter::SetKeyboardInd
 
   if (aShowAccelerators != UIStateChangeType_NoChange) {
     windowRoot->SetShowAccelerators(aShowAccelerators == UIStateChangeType_Set);
   }
   if (aShowFocusRings != UIStateChangeType_NoChange) {
     windowRoot->SetShowFocusRings(aShowFocusRings == UIStateChangeType_Set);
   }
 
-  nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(
-      this, aShowAccelerators, aShowFocusRings);
+  nsContentUtils::SetKeyboardIndicatorsOnRemoteChildren(this, aShowAccelerators,
+                                                        aShowFocusRings);
 
   bool newShouldShowFocusRing = ShouldShowFocusRing();
   if (mInnerWindow && nsGlobalWindowInner::Cast(mInnerWindow)->mHasFocus &&
       mInnerWindow->mFocusedElement &&
       oldShouldShowFocusRing != newShouldShowFocusRing) {
     // Update focusedNode's state.
     if (newShouldShowFocusRing) {
       mInnerWindow->mFocusedElement->AddStates(NS_EVENT_STATE_FOCUSRING);
--- a/dom/base/nsHistory.h
+++ b/dom/base/nsHistory.h
@@ -7,18 +7,18 @@
 #define nsHistory_h___
 
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/HistoryBinding.h"
 #include "mozilla/dom/ChildSHistory.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
-#include "nsIWeakReferenceUtils.h"// for nsWeakPtr
-#include "nsPIDOMWindow.h"  // for GetParentObject
+#include "nsIWeakReferenceUtils.h"  // for nsWeakPtr
+#include "nsPIDOMWindow.h"          // for GetParentObject
 #include "nsStringFwd.h"
 #include "nsWrapperCache.h"
 
 class nsIDocShell;
 class nsISHistory;
 class nsIWeakReference;
 class nsPIDOMWindowInner;
 
--- a/dom/base/nsIDocumentObserver.h
+++ b/dom/base/nsIDocumentObserver.h
@@ -89,34 +89,34 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumen
 #define NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD \
   virtual void EndLoad(mozilla::dom::Document*) override;
 
 #define NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED     \
   virtual void ContentStateChanged(mozilla::dom::Document*, \
                                    nsIContent* aContent,    \
                                    mozilla::EventStates aStateMask) override;
 
-#define NS_DECL_NSIDOCUMENTOBSERVER                 \
-  NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE           \
-  NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE             \
-  NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD             \
-  NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD               \
-  NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED   \
+#define NS_DECL_NSIDOCUMENTOBSERVER               \
+  NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE         \
+  NS_DECL_NSIDOCUMENTOBSERVER_ENDUPDATE           \
+  NS_DECL_NSIDOCUMENTOBSERVER_BEGINLOAD           \
+  NS_DECL_NSIDOCUMENTOBSERVER_ENDLOAD             \
+  NS_DECL_NSIDOCUMENTOBSERVER_CONTENTSTATECHANGED \
   NS_DECL_NSIMUTATIONOBSERVER
 
 #define NS_IMPL_NSIDOCUMENTOBSERVER_CORE_STUB(_class)  \
   void _class::BeginUpdate(mozilla::dom::Document*) {} \
   void _class::EndUpdate(mozilla::dom::Document*) {}   \
   NS_IMPL_NSIMUTATIONOBSERVER_CORE_STUB(_class)
 
 #define NS_IMPL_NSIDOCUMENTOBSERVER_LOAD_STUB(_class) \
   void _class::BeginLoad(mozilla::dom::Document*) {}  \
   void _class::EndLoad(mozilla::dom::Document*) {}
 
-#define NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(_class)                 \
-  void _class::ContentStateChanged(mozilla::dom::Document*,            \
-                                   nsIContent* aContent,               \
+#define NS_IMPL_NSIDOCUMENTOBSERVER_STATE_STUB(_class)      \
+  void _class::ContentStateChanged(mozilla::dom::Document*, \
+                                   nsIContent* aContent,    \
                                    mozilla::EventStates aStateMask) {}
 
 #define NS_IMPL_NSIDOCUMENTOBSERVER_CONTENT(_class) \
   NS_IMPL_NSIMUTATIONOBSERVER_CONTENT(_class)
 
 #endif /* nsIDocumentObserver_h___ */
--- a/dom/gamepad/GamepadRemapping.cpp
+++ b/dom/gamepad/GamepadRemapping.cpp
@@ -125,235 +125,232 @@ class DefaultRemapper final : public Gam
   }
 
  private:
   uint32_t numAxes;
   uint32_t numButtons;
 };
 
 class ADT1Remapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 3:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString("Axis idx '%d' doesn't support in ADT1Remapper().",
+                            aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 3:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in ADT1Remapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString("Button idx '%d' doesn't support in ADT1Remapper().",
+                          aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in ADT1Remapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
+    const std::map<uint32_t, uint32_t> buttonMapping = {
         {3, BUTTON_INDEX_TERTIARY},
         {4, BUTTON_INDEX_QUATERNARY},
         {6, BUTTON_INDEX_LEFT_SHOULDER},
         {7, BUTTON_INDEX_RIGHT_SHOULDER},
         {12, BUTTON_INDEX_META},
         {13, BUTTON_INDEX_LEFT_THUMBSTICK},
-        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}
-      };
+        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
 
 class TwoAxesEightKeysRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return 0;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return 0; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT - 1;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT - 1;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_LEFT,
+                                AxisNegativeAsButton(aValue));
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_RIGHT,
+                                AxisPositiveAsButton(aValue));
+        break;
+      case 1:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_UP,
+                                AxisNegativeAsButton(aValue));
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_DOWN,
+                                AxisPositiveAsButton(aValue));
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in TwoAxesEightKeysRemapper().",
+                aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_LEFT, AxisNegativeAsButton(aValue));
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_RIGHT, AxisPositiveAsButton(aValue));
-          break;
-        case 1:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_UP, AxisNegativeAsButton(aValue));
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_DOWN, AxisPositiveAsButton(aValue));
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in TwoAxesEightKeysRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in TwoAxesEightKeysRemapper().",
+              aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in TwoAxesEightKeysRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
+    const std::map<uint32_t, uint32_t> buttonMapping = {
         {0, BUTTON_INDEX_QUATERNARY},
         {2, BUTTON_INDEX_PRIMARY},
-        {3, BUTTON_INDEX_TERTIARY}
-      };
+        {3, BUTTON_INDEX_TERTIARY}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
 
 class StadiaControllerRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return STADIA_BUTTON_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return STADIA_BUTTON_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 3:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, aValue);
+        break;
+      case 5:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in StadiaControllerRemapper().",
+                aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 3:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, aValue);
-          break;
-        case 5:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in StadiaControllerRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (STADIA_BUTTON_COUNT <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in StadiaControllerRemapper().",
+              aButton)
+              .get());
+      return;
+    }
 
-      if (STADIA_BUTTON_COUNT <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in StadiaControllerRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      service->NewButtonEvent(aIndex, aButton, aPressed);
-    }
+    service->NewButtonEvent(aIndex, aButton, aPressed);
+  }
 
  private:
   enum STADIAButtons {
     STADIA_BUTTON_EXTRA1 = BUTTON_INDEX_COUNT,
     STADIA_BUTTON_EXTRA2,
     STADIA_BUTTON_COUNT
   };
 };
@@ -444,1059 +441,1006 @@ class Dualshock4Remapper final : public 
  private:
   enum Dualshock4Buttons {
     DUALSHOCK_BUTTON_TOUCHPAD = BUTTON_INDEX_COUNT,
     DUALSHOCK_BUTTON_COUNT
   };
 };
 
 class LogitechDInputRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
 
-    virtual uint32_t GetButtonCount() const override {
-      // The Logitech button (BUTTON_INDEX_META) is not accessible through the
-      // device's D-mode.
-      return BUTTON_INDEX_COUNT - 1;
+  virtual uint32_t GetButtonCount() const override {
+    // The Logitech button (BUTTON_INDEX_META) is not accessible through the
+    // device's D-mode.
+    return BUTTON_INDEX_COUNT - 1;
+  }
+
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in LogitechDInputRemapper().",
+                aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in LogitechDInputRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in LogitechDInputRemapper().",
+              aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in LogitechDInputRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
+    const std::map<uint32_t, uint32_t> buttonMapping = {
         {0, BUTTON_INDEX_TERTIARY},
         {1, BUTTON_INDEX_PRIMARY},
-        {2, BUTTON_INDEX_SECONDARY}
-      };
+        {2, BUTTON_INDEX_SECONDARY}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
 
 class SwitchJoyConRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return 2;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return 2; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
+    service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+  }
+
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
         GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
-
-      service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
-
-      service->NewButtonEvent(aIndex, aButton, aPressed);
-    }
+    service->NewButtonEvent(aIndex, aButton, aPressed);
+  }
 };
 
 class SwitchProRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
 
-    virtual uint32_t GetButtonCount() const override {
-      // The Switch Pro controller has a Capture button that has no equivalent in
-      // the Standard Gamepad.
-      return SWITCHPRO_BUTTON_COUNT;
+  virtual uint32_t GetButtonCount() const override {
+    // The Switch Pro controller has a Capture button that has no equivalent in
+    // the Standard Gamepad.
+    return SWITCHPRO_BUTTON_COUNT;
+  }
+
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
+    service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+  }
+
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
         GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
-
-      service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    service->NewButtonEvent(aIndex, aButton, aPressed);
+  }
 
-      service->NewButtonEvent(aIndex, aButton, aPressed);
-    }
-
-private:
+ private:
   enum SwitchProButtons {
     SWITCHPRO_BUTTON_EXTRA = BUTTON_INDEX_COUNT,
     SWITCHPRO_BUTTON_COUNT
   };
 };
 
 class NvShieldRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return SHIELD_BUTTON_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return SHIELD_BUTTON_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 3:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in NvShieldRemapper().", aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 3:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in NvShieldRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in NvShieldRemapper().", aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in NvShieldRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
+    const std::map<uint32_t, uint32_t> buttonMapping = {
         {2, BUTTON_INDEX_META},
         {3, BUTTON_INDEX_TERTIARY},
         {4, BUTTON_INDEX_QUATERNARY},
         {5, SHIELD_BUTTON_CIRCLE},
         {6, BUTTON_INDEX_LEFT_SHOULDER},
         {7, BUTTON_INDEX_RIGHT_SHOULDER},
         {9, BUTTON_INDEX_BACK_SELECT},
         {11, BUTTON_INDEX_START},
         {13, BUTTON_INDEX_LEFT_THUMBSTICK},
-        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}
-      };
+        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 
-private:
+ private:
   enum ShieldButtons {
     SHIELD_BUTTON_CIRCLE = BUTTON_INDEX_COUNT,
     SHIELD_BUTTON_COUNT
   };
 };
 
 class NvShield2017Remapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return SHIELD2017_BUTTON_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return SHIELD2017_BUTTON_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 3:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in NvShield2017Remapper().",
+                aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 3:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in NvShield2017Remapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in NvShield2017Remapper().",
+              aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in NvShield2017Remapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
+    const std::map<uint32_t, uint32_t> buttonMapping = {
         {2, BUTTON_INDEX_META},
         {3, BUTTON_INDEX_TERTIARY},
         {4, BUTTON_INDEX_QUATERNARY},
         {5, BUTTON_INDEX_START},
         {6, BUTTON_INDEX_LEFT_SHOULDER},
         {7, BUTTON_INDEX_RIGHT_SHOULDER},
         {8, BUTTON_INDEX_BACK_SELECT},
         {11, SHIELD2017_BUTTON_PLAYPAUSE},
         {13, BUTTON_INDEX_LEFT_THUMBSTICK},
-        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}
-      };
+        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 
-private:
+ private:
   enum Shield2017Buttons {
     SHIELD2017_BUTTON_PLAYPAUSE = BUTTON_INDEX_COUNT,
     SHIELD2017_BUTTON_COUNT
   };
 };
 
 class IBuffaloRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return 2;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return 2; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT - 1; /* no meta */
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT - 1; /* no meta */
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_LEFT,
+                                AxisNegativeAsButton(aValue));
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_RIGHT,
+                                AxisPositiveAsButton(aValue));
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_UP,
+                                AxisNegativeAsButton(aValue));
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_DOWN,
+                                AxisPositiveAsButton(aValue));
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in IBuffaloRemapper().", aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_LEFT, AxisNegativeAsButton(aValue));
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_RIGHT, AxisPositiveAsButton(aValue));
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_UP, AxisNegativeAsButton(aValue));
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_DPAD_DOWN, AxisPositiveAsButton(aValue));
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in IBuffaloRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
-
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in IBuffaloRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in IBuffaloRemapper().", aButton)
+              .get());
+      return;
+    }
 
-      const std::map<uint32_t, uint32_t> buttonMapping = {
-        {0, BUTTON_INDEX_SECONDARY},
-        {1, BUTTON_INDEX_PRIMARY},
-        {2, BUTTON_INDEX_QUATERNARY},
-        {3, BUTTON_INDEX_TERTIARY},
-        {5, BUTTON_INDEX_RIGHT_TRIGGER},
-        {6, BUTTON_INDEX_BACK_SELECT},
-        {7, BUTTON_INDEX_START}
-      };
+    const std::map<uint32_t, uint32_t> buttonMapping = {
+        {0, BUTTON_INDEX_SECONDARY},     {1, BUTTON_INDEX_PRIMARY},
+        {2, BUTTON_INDEX_QUATERNARY},    {3, BUTTON_INDEX_TERTIARY},
+        {5, BUTTON_INDEX_RIGHT_TRIGGER}, {6, BUTTON_INDEX_BACK_SELECT},
+        {7, BUTTON_INDEX_START}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
 
 class XSkillsRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return GAMECUBE_BUTTON_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return GAMECUBE_BUTTON_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 3:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in XSkillsRemapper().", aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 3:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in XSkillsRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in XSkillsRemapper().", aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in XSkillsRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
-        {0, BUTTON_INDEX_PRIMARY},  // A
-        {1, BUTTON_INDEX_TERTIARY}, // B
-        {2, BUTTON_INDEX_SECONDARY},  // X
-        {3, BUTTON_INDEX_QUATERNARY}, // Y
+    const std::map<uint32_t, uint32_t> buttonMapping = {
+        {0, BUTTON_INDEX_PRIMARY},     // A
+        {1, BUTTON_INDEX_TERTIARY},    // B
+        {2, BUTTON_INDEX_SECONDARY},   // X
+        {3, BUTTON_INDEX_QUATERNARY},  // Y
         {4, GAMECUBE_BUTTON_LEFT_TRIGGER_CLICK},
         {5, GAMECUBE_BUTTON_RIGHT_TRIGGER_CLICK},
         {6, BUTTON_INDEX_RIGHT_SHOULDER},
         {7, BUTTON_INDEX_START},
         {8, BUTTON_INDEX_DPAD_LEFT},
         {9, BUTTON_INDEX_DPAD_RIGHT},
         {10, BUTTON_INDEX_DPAD_DOWN},
-        {11, BUTTON_INDEX_DPAD_UP}
-      };
+        {11, BUTTON_INDEX_DPAD_UP}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 
-private:
+ private:
   enum GamecubeButtons {
     GAMECUBE_BUTTON_LEFT_TRIGGER_CLICK = BUTTON_INDEX_COUNT,
     GAMECUBE_BUTTON_RIGHT_TRIGGER_CLICK,
     GAMECUBE_BUTTON_COUNT
   };
 };
 
 class BoomN64PsxRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT - 1;  // no meta
-    }
-
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT - 1;  // no meta
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in BoomN64PsxRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in BoomN64PsxRemapper().", aAxis)
+                .get());
+        break;
+    }
+  }
 
-      const std::vector<uint32_t> buttonMapping = {
-        BUTTON_INDEX_QUATERNARY,
-        BUTTON_INDEX_SECONDARY,
-        BUTTON_INDEX_PRIMARY,
-        BUTTON_INDEX_TERTIARY,
-        BUTTON_INDEX_LEFT_TRIGGER,
-        BUTTON_INDEX_RIGHT_TRIGGER,
-        BUTTON_INDEX_LEFT_SHOULDER,
-        BUTTON_INDEX_RIGHT_SHOULDER,
-        BUTTON_INDEX_BACK_SELECT,
-        BUTTON_INDEX_LEFT_THUMBSTICK,
-        BUTTON_INDEX_RIGHT_THUMBSTICK,
-        BUTTON_INDEX_START,
-        BUTTON_INDEX_DPAD_UP,
-        BUTTON_INDEX_DPAD_RIGHT,
-        BUTTON_INDEX_DPAD_DOWN,
-        BUTTON_INDEX_DPAD_LEFT
-      };
-
-      if (buttonMapping.size() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in BoomN64PsxRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      service->NewButtonEvent(aIndex, buttonMapping[aButton], aPressed);
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-private:
+    const std::vector<uint32_t> buttonMapping = {
+        BUTTON_INDEX_QUATERNARY,       BUTTON_INDEX_SECONDARY,
+        BUTTON_INDEX_PRIMARY,          BUTTON_INDEX_TERTIARY,
+        BUTTON_INDEX_LEFT_TRIGGER,     BUTTON_INDEX_RIGHT_TRIGGER,
+        BUTTON_INDEX_LEFT_SHOULDER,    BUTTON_INDEX_RIGHT_SHOULDER,
+        BUTTON_INDEX_BACK_SELECT,      BUTTON_INDEX_LEFT_THUMBSTICK,
+        BUTTON_INDEX_RIGHT_THUMBSTICK, BUTTON_INDEX_START,
+        BUTTON_INDEX_DPAD_UP,          BUTTON_INDEX_DPAD_RIGHT,
+        BUTTON_INDEX_DPAD_DOWN,        BUTTON_INDEX_DPAD_LEFT};
+
+    if (buttonMapping.size() <= aIndex) {
+      NS_WARNING(nsPrintfCString(
+                     "Button idx '%d' doesn't support in BoomN64PsxRemapper().",
+                     aButton)
+                     .get());
+      return;
+    }
+
+    service->NewButtonEvent(aIndex, buttonMapping[aButton], aPressed);
+  }
+
+ private:
   enum GamecubeButtons {
     GAMECUBE_BUTTON_LEFT_TRIGGER_CLICK = BUTTON_INDEX_COUNT,
     GAMECUBE_BUTTON_RIGHT_TRIGGER_CLICK,
     GAMECUBE_BUTTON_COUNT
   };
 };
 
 class AnalogGamepadRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return ANALOG_GAMEPAD_BUTTON_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return ANALOG_GAMEPAD_BUTTON_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 3:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in AnalogGamepadRemapper().",
+                aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 3:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in AnalogGamepadRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in AnalogGamepadRemapper().",
+              aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in AnalogGamepadRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
+    const std::map<uint32_t, uint32_t> buttonMapping = {
         {3, BUTTON_INDEX_TERTIARY},
         {4, BUTTON_INDEX_QUATERNARY},
         {6, BUTTON_INDEX_LEFT_SHOULDER},
         {7, BUTTON_INDEX_RIGHT_SHOULDER},
         {10, BUTTON_INDEX_BACK_SELECT},
         {11, BUTTON_INDEX_META},
         {12, BUTTON_INDEX_START},
         {13, BUTTON_INDEX_LEFT_THUMBSTICK},
         {14, BUTTON_INDEX_RIGHT_THUMBSTICK},
         {16, ANALOG_GAMEPAD_BUTTON_EXTRA},
-        {17, ANALOG_GAMEPAD_BUTTON_EXTRA2}
-      };
+        {17, ANALOG_GAMEPAD_BUTTON_EXTRA2}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 
-private:
+ private:
   enum AnalogGamepadButtons {
     ANALOG_GAMEPAD_BUTTON_EXTRA = BUTTON_INDEX_COUNT,
     ANALOG_GAMEPAD_BUTTON_EXTRA2,
     ANALOG_GAMEPAD_BUTTON_COUNT
   };
 };
 
 class RazerServalRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT - 1; /* no meta */
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT - 1; /* no meta */
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 3:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in RazerServalRemapper().",
+                aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 3:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in RazerServalRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
-
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in RazerServalRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in RazerServalRemapper().",
+              aButton)
+              .get());
+      return;
+    }
 
-      const std::map<uint32_t, uint32_t> buttonMapping = {
-        {3, BUTTON_INDEX_TERTIARY},
-        {4, BUTTON_INDEX_QUATERNARY},
-        {6, BUTTON_INDEX_LEFT_SHOULDER},
-        {7, BUTTON_INDEX_RIGHT_SHOULDER},
-        {10, BUTTON_INDEX_BACK_SELECT},
-        {11, BUTTON_INDEX_START},
-        {12, BUTTON_INDEX_START},
-        {13, BUTTON_INDEX_LEFT_THUMBSTICK},
-        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}
-      };
+    const std::map<uint32_t, uint32_t> buttonMapping = {
+        {3, BUTTON_INDEX_TERTIARY},         {4, BUTTON_INDEX_QUATERNARY},
+        {6, BUTTON_INDEX_LEFT_SHOULDER},    {7, BUTTON_INDEX_RIGHT_SHOULDER},
+        {10, BUTTON_INDEX_BACK_SELECT},     {11, BUTTON_INDEX_START},
+        {12, BUTTON_INDEX_START},           {13, BUTTON_INDEX_LEFT_THUMBSTICK},
+        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
 
 class MogaProRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT - 1; /* no meta */
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT - 1; /* no meta */
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                  double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 3:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 4:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 5:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in MogaProRemapper().", aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 3:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 4:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
-                                  aValue > 0.1f);
-          break;
-        case 5:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in MogaProRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
-
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in MogaProRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in MogaProRemapper().", aButton)
+              .get());
+      return;
+    }
 
-      const std::map<uint32_t, uint32_t> buttonMapping = {
-        {3, BUTTON_INDEX_TERTIARY},
-        {4, BUTTON_INDEX_QUATERNARY},
-        {6, BUTTON_INDEX_LEFT_SHOULDER},
-        {7, BUTTON_INDEX_RIGHT_SHOULDER},
-        {11, BUTTON_INDEX_START},
-        {13, BUTTON_INDEX_LEFT_THUMBSTICK},
-        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}
-      };
+    const std::map<uint32_t, uint32_t> buttonMapping = {
+        {3, BUTTON_INDEX_TERTIARY},         {4, BUTTON_INDEX_QUATERNARY},
+        {6, BUTTON_INDEX_LEFT_SHOULDER},    {7, BUTTON_INDEX_RIGHT_SHOULDER},
+        {11, BUTTON_INDEX_START},           {13, BUTTON_INDEX_LEFT_THUMBSTICK},
+        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
 
 class OnLiveWirelessRemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                    double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 3:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 4:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 5:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 9:
+        FetchDpadFromAxis(aIndex, aValue);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString(
+                "Axis idx '%d' doesn't support in OnLiveWirelessRemapper().",
+                aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, aValue > 0.1f);
-          break;
-        case 3:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 4:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 5:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, aValue > 0.1f);
-          break;
-        case 9:
-          FetchDpadFromAxis(aIndex, aValue);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in OnLiveWirelessRemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString(
+              "Button idx '%d' doesn't support in OnLiveWirelessRemapper().",
+              aButton)
+              .get());
+      return;
+    }
 
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in OnLiveWirelessRemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
-
-      const std::map<uint32_t, uint32_t> buttonMapping = {
+    const std::map<uint32_t, uint32_t> buttonMapping = {
         {3, BUTTON_INDEX_TERTIARY},
         {4, BUTTON_INDEX_QUATERNARY},
         {6, BUTTON_INDEX_LEFT_SHOULDER},
         {7, BUTTON_INDEX_RIGHT_SHOULDER},
         {12, BUTTON_INDEX_META},
         {13, BUTTON_INDEX_LEFT_THUMBSTICK},
-        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}
-      };
+        {14, BUTTON_INDEX_RIGHT_THUMBSTICK}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
 
 class OUYARemapper final : public GamepadRemapper {
-  public:
-    virtual uint32_t GetAxisCount() const override {
-      return AXIS_INDEX_COUNT;
-    }
+ public:
+  virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
+
+  virtual uint32_t GetButtonCount() const override {
+    return BUTTON_INDEX_COUNT;
+  }
 
-    virtual uint32_t GetButtonCount() const override {
-      return BUTTON_INDEX_COUNT;
+  virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
+                                  double aValue) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
-                                    double aValue) const override {
-      RefPtr<GamepadPlatformService> service =
-        GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
+    switch (aAxis) {
+      case 0:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
+        break;
+      case 1:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
+        break;
+      case 2:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      case 3:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
+        break;
+      case 4:
+        service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
+        break;
+      case 5:
+        service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER,
+                                aValue > 0.1f);
+        break;
+      default:
+        NS_WARNING(
+            nsPrintfCString("Axis idx '%d' doesn't support in OUYARemapper().",
+                            aAxis)
+                .get());
+        break;
+    }
+  }
 
-      switch (aAxis) {
-        case 0:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_X, aValue);
-          break;
-        case 1:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_LEFT_STICK_Y, aValue);
-          break;
-        case 2:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_LEFT_TRIGGER, aValue > 0.1f);
-          break;
-        case 3:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_X, aValue);
-          break;
-        case 4:
-          service->NewAxisMoveEvent(aIndex, AXIS_INDEX_RIGHT_STICK_Y, aValue);
-          break;
-        case 5:
-          service->NewButtonEvent(aIndex, BUTTON_INDEX_RIGHT_TRIGGER, aValue > 0.1f);
-          break;
-        default:
-          NS_WARNING(
-              nsPrintfCString(
-                  "Axis idx '%d' doesn't support in OUYARemapper().", aAxis)
-                  .get());
-          break;
-      }
+  virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
+                                bool aPressed) const override {
+    RefPtr<GamepadPlatformService> service =
+        GamepadPlatformService::GetParentService();
+    if (!service) {
+      return;
     }
 
-    virtual void RemapButtonEvent(uint32_t aIndex, uint32_t aButton,
-                                  bool aPressed) const override {
-      RefPtr<GamepadPlatformService> service =
-          GamepadPlatformService::GetParentService();
-      if (!service) {
-        return;
-      }
-
-      if (GetButtonCount() <= aIndex) {
-        NS_WARNING(
-              nsPrintfCString(
-                  "Button idx '%d' doesn't support in OUYARemapper().",
-                  aButton)
-                  .get());
-        return;
-      }
+    if (GetButtonCount() <= aIndex) {
+      NS_WARNING(
+          nsPrintfCString("Button idx '%d' doesn't support in OUYARemapper().",
+                          aButton)
+              .get());
+      return;
+    }
 
-      const std::map<uint32_t, uint32_t> buttonMapping = {
-        {1, BUTTON_INDEX_TERTIARY},
-        {2, BUTTON_INDEX_QUATERNARY},
-        {3, BUTTON_INDEX_SECONDARY},
-        {6, BUTTON_INDEX_LEFT_THUMBSTICK},
-        {7, BUTTON_INDEX_RIGHT_THUMBSTICK},
-        {8, BUTTON_INDEX_DPAD_UP},
-        {9, BUTTON_INDEX_DPAD_DOWN},
-        {10, BUTTON_INDEX_DPAD_LEFT},
-        {11, BUTTON_INDEX_DPAD_RIGHT},
-        {15, BUTTON_INDEX_META}
-      };
+    const std::map<uint32_t, uint32_t> buttonMapping = {
+        {1, BUTTON_INDEX_TERTIARY},         {2, BUTTON_INDEX_QUATERNARY},
+        {3, BUTTON_INDEX_SECONDARY},        {6, BUTTON_INDEX_LEFT_THUMBSTICK},
+        {7, BUTTON_INDEX_RIGHT_THUMBSTICK}, {8, BUTTON_INDEX_DPAD_UP},
+        {9, BUTTON_INDEX_DPAD_DOWN},        {10, BUTTON_INDEX_DPAD_LEFT},
+        {11, BUTTON_INDEX_DPAD_RIGHT},      {15, BUTTON_INDEX_META}};
 
-      auto find = buttonMapping.find(aButton);
-      if (find != buttonMapping.end()) {
-        service->NewButtonEvent(aIndex, find->second, aPressed);
-      } else {
-        service->NewButtonEvent(aIndex, aButton, aPressed);
-      }
+    auto find = buttonMapping.find(aButton);
+    if (find != buttonMapping.end()) {
+      service->NewButtonEvent(aIndex, find->second, aPressed);
+    } else {
+      service->NewButtonEvent(aIndex, aButton, aPressed);
     }
+  }
 };
-      
+
 already_AddRefed<GamepadRemapper> GetGamepadRemapper(
     const uint16_t aVendorId, const uint16_t aProductId) {
   const std::vector<GamepadRemappingData> remappingRules = {
       {GamepadId::kAsusTekProduct4500, new ADT1Remapper()},
       {GamepadId::kDragonRiseProduct0011, new TwoAxesEightKeysRemapper()},
       {GamepadId::kGoogleProduct2c40, new ADT1Remapper()},
       {GamepadId::kGoogleProduct9400, new StadiaControllerRemapper()},
       {GamepadId::kLogitechProductc216, new LogitechDInputRemapper()},
@@ -1514,18 +1458,17 @@ already_AddRefed<GamepadRemapper> GetGam
       {GamepadId::kPrototypeVendorProduct9401, new AnalogGamepadRemapper()},
       {GamepadId::kRazer1532Product0900, new RazerServalRemapper()},
       {GamepadId::kSonyProduct05c4, new Dualshock4Remapper()},
       {GamepadId::kSonyProduct09cc, new Dualshock4Remapper()},
       {GamepadId::kSonyProduct0ba0, new Dualshock4Remapper()},
       {GamepadId::kVendor20d6Product6271, new MogaProRemapper()},
       {GamepadId::kVendor2378Product1008, new OnLiveWirelessRemapper()},
       {GamepadId::kVendor2378Product100a, new OnLiveWirelessRemapper()},
-      {GamepadId::kVendor2836Product0001, new OUYARemapper()}
-  };
+      {GamepadId::kVendor2836Product0001, new OUYARemapper()}};
   const GamepadId id = static_cast<GamepadId>((aVendorId << 16) | aProductId);
 
   for (uint32_t i = 0; i < remappingRules.size(); ++i) {
     if (id == remappingRules[i].id) {
       return do_AddRef(remappingRules[i].remapping.get());
     }
   }
 
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -339,20 +339,19 @@ nsresult HTMLLinkElement::AfterSetAttr(i
       }
 
       if ((aName == nsGkAtoms::as || aName == nsGkAtoms::type ||
            aName == nsGkAtoms::crossorigin || aName == nsGkAtoms::media) &&
           IsInComposedDoc()) {
         UpdatePreload(aName, aValue, aOldValue);
       }
 
-      const bool forceUpdate = dropSheet || aName == nsGkAtoms::title ||
-                               aName == nsGkAtoms::media ||
-                               aName == nsGkAtoms::type ||
-                               aName == nsGkAtoms::disabled;
+      const bool forceUpdate =
+          dropSheet || aName == nsGkAtoms::title || aName == nsGkAtoms::media ||
+          aName == nsGkAtoms::type || aName == nsGkAtoms::disabled;
 
       Unused << UpdateStyleSheetInternal(
           nullptr, nullptr, forceUpdate ? ForceUpdate::Yes : ForceUpdate::No);
     }
   } else {
     if (aNameSpaceID == kNameSpaceID_None) {
       if (aName == nsGkAtoms::disabled &&
           StaticPrefs::dom_link_disabled_attribute_enabled()) {
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -7848,18 +7848,17 @@ class QuotaClient final : public mozilla
   mozilla::dom::quota::Client::Type GetType() override;
 
   nsresult UpgradeStorageFrom1_0To2_0(nsIFile* aDirectory) override;
 
   nsresult UpgradeStorageFrom2_1To2_2(nsIFile* aDirectory) override;
 
   nsresult InitOrigin(PersistenceType aPersistenceType,
                       const nsACString& aGroup, const nsACString& aOrigin,
-                      const AtomicBool& aCanceled,
-                      UsageInfo* aUsageInfo,
+                      const AtomicBool& aCanceled, UsageInfo* aUsageInfo,
                       bool aForGetUsage) override;
 
   nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                              const nsACString& aGroup,
                              const nsACString& aOrigin,
                              const AtomicBool& aCanceled,
                              UsageInfo* aUsageInfo) override;
 
@@ -15955,18 +15954,17 @@ nsresult QuotaClient::UpgradeStorageFrom
 
   return NS_OK;
 }
 
 nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType,
                                  const nsACString& aGroup,
                                  const nsACString& aOrigin,
                                  const AtomicBool& aCanceled,
-                                 UsageInfo* aUsageInfo,
-                                 bool aForGetUsage) {
+                                 UsageInfo* aUsageInfo, bool aForGetUsage) {
   AssertIsOnIOThread();
 
   nsCOMPtr<nsIFile> directory;
   nsresult rv =
       GetDirectory(aPersistenceType, aOrigin, getter_AddRefs(directory));
   if (NS_WARN_IF(NS_FAILED(rv))) {
     REPORT_TELEMETRY_INIT_ERR(kExternalError, IDB_GetDirectory);
     return rv;
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -3689,21 +3689,21 @@ already_AddRefed<nsIEventTarget> Content
       }
       aMsg.IgnoreSentinel(&iter);
       if (NS_WARN_IF(!IPC::ReadParam(&aMsg, &iter, &sameTabGroupAs))) {
         return nullptr;
       }
 
       // If sameTabGroupAs is non-zero, then the new tab will be in the same
       // TabGroup as a previously created tab. Rather than try to find the
-      // previously created tab (whose constructor message may not even have been
-      // processed yet, in theory) and look up its event target, we just use the
-      // default event target. This means that runnables for this tab will not be
-      // labeled. However, this path is only taken for print preview and view
-      // source, which are not performance-sensitive.
+      // previously created tab (whose constructor message may not even have
+      // been processed yet, in theory) and look up its event target, we just
+      // use the default event target. This means that runnables for this tab
+      // will not be labeled. However, this path is only taken for print preview
+      // and view source, which are not performance-sensitive.
       if (sameTabGroupAs) {
         return nullptr;
       }
 
       if (NS_WARN_IF(!endpoint.IsValid())) {
         return nullptr;
       }
 
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1182,18 +1182,19 @@ TabParent* ContentParent::CreateBrowser(
 
     if (tabId == 0) {
       return nullptr;
     }
 
     aBrowsingContext->Canonical()->SetOwnerProcessId(
         constructorSender->ChildID());
 
-    RefPtr<TabParent> tabParent = new TabParent(
-        constructorSender, tabId, aContext, aBrowsingContext->Canonical(), chromeFlags);
+    RefPtr<TabParent> tabParent =
+        new TabParent(constructorSender, tabId, aContext,
+                      aBrowsingContext->Canonical(), chromeFlags);
 
     // Open a remote endpoint for our PBrowser actor. DeallocPBrowserParent
     // releases the ref taken.
     ManagedEndpoint<PBrowserChild> childEp =
         constructorSender->OpenPBrowserEndpoint(do_AddRef(tabParent).take());
     if (NS_WARN_IF(!childEp.IsValid())) {
       return nullptr;
     }
--- a/dom/media/GraphDriver.h
+++ b/dom/media/GraphDriver.h
@@ -317,17 +317,17 @@ struct StreamAndPromiseForOperation {
                                dom::AudioContextOperation aOperation,
                                dom::AudioContextOperationFlags aFlags);
   RefPtr<MediaStream> mStream;
   void* mPromise;
   dom::AudioContextOperation mOperation;
   dom::AudioContextOperationFlags mFlags;
 };
 
-enum class AsyncCubebOperation { INIT, START, STOP, SHUTDOWN  };
+enum class AsyncCubebOperation { INIT, START, STOP, SHUTDOWN };
 enum class AudioInputType { Unknown, Voice };
 
 /**
  * This is a graph driver that is based on callback functions called by the
  * audio api. This ensures minimal audio latency, because it means there is no
  * buffering happening: the audio is generated inside the callback.
  *
  * This design is less flexible than running our own thread:
--- a/dom/media/VideoUtils.cpp
+++ b/dom/media/VideoUtils.cpp
@@ -61,19 +61,18 @@ TimeUnit FramesToTimeUnit(int64_t aFrame
 // Converts from microseconds to number of audio frames, given the specified
 // audio rate.
 CheckedInt64 UsecsToFrames(int64_t aUsecs, uint32_t aRate) {
   return SaferMultDiv(aUsecs, aRate, USECS_PER_S);
 }
 
 // Format TimeUnit as number of frames at given rate.
 CheckedInt64 TimeUnitToFrames(const TimeUnit& aTime, uint32_t aRate) {
-  return aTime.IsValid() ?
-      UsecsToFrames(aTime.ToMicroseconds(), aRate) :
-      CheckedInt64(INT64_MAX) + 1;
+  return aTime.IsValid() ? UsecsToFrames(aTime.ToMicroseconds(), aRate)
+                         : CheckedInt64(INT64_MAX) + 1;
 }
 
 nsresult SecondsToUsecs(double aSeconds, int64_t& aOutUsecs) {
   if (aSeconds * double(USECS_PER_S) > INT64_MAX) {
     return NS_ERROR_FAILURE;
   }
   aOutUsecs = int64_t(aSeconds * double(USECS_PER_S));
   return NS_OK;
--- a/dom/media/webrtc/MediaEngineWebRTC.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTC.cpp
@@ -178,21 +178,21 @@ void MediaEngineWebRTC::EnumerateMicroph
       if (devices[i]->Preferred()) {
 #ifdef DEBUG
         if (!foundPreferredDevice) {
           foundPreferredDevice = true;
         } else {
           // This is possible on windows, there is a default communication
           // device, and a default device:
           // See https://bugzilla.mozilla.org/show_bug.cgi?id=1542739
-#ifndef XP_WIN
+#  ifndef XP_WIN
           MOZ_ASSERT(!foundPreferredDevice,
                      "Found more than one preferred audio input device"
                      "while enumerating");
-#endif
+#  endif
         }
 #endif
         aDevices->InsertElementAt(0, device);
       } else {
         aDevices->AppendElement(device);
       }
     }
   }
--- a/dom/quota/Client.h
+++ b/dom/quota/Client.h
@@ -138,18 +138,17 @@ class Client {
   virtual nsresult UpgradeStorageFrom2_1To2_2(nsIFile* aDirectory) {
     return NS_OK;
   }
 
   virtual nsresult InitOrigin(PersistenceType aPersistenceType,
                               const nsACString& aGroup,
                               const nsACString& aOrigin,
                               const AtomicBool& aCanceled,
-                              UsageInfo* aUsageInfo,
-                              bool aForGetUsage) = 0;
+                              UsageInfo* aUsageInfo, bool aForGetUsage) = 0;
 
   virtual nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                                      const nsACString& aGroup,
                                      const nsACString& aOrigin,
                                      const AtomicBool& aCanceled,
                                      UsageInfo* aUsageInfo) = 0;
 
   // This method is called when origins are about to be cleared
--- a/dom/simpledb/ActorsParent.cpp
+++ b/dom/simpledb/ActorsParent.cpp
@@ -437,18 +437,17 @@ class QuotaClient final : public mozilla
   }
 
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(QuotaClient, override)
 
   Type GetType() override;
 
   nsresult InitOrigin(PersistenceType aPersistenceType,
                       const nsACString& aGroup, const nsACString& aOrigin,
-                      const AtomicBool& aCanceled,
-                      UsageInfo* aUsageInfo,
+                      const AtomicBool& aCanceled, UsageInfo* aUsageInfo,
                       bool aForGetUsage) override;
 
   nsresult GetUsageForOrigin(PersistenceType aPersistenceType,
                              const nsACString& aGroup,
                              const nsACString& aOrigin,
                              const AtomicBool& aCanceled,
                              UsageInfo* aUsageInfo) override;
 
@@ -1606,18 +1605,17 @@ QuotaClient::~QuotaClient() {
 mozilla::dom::quota::Client::Type QuotaClient::GetType() {
   return QuotaClient::SDB;
 }
 
 nsresult QuotaClient::InitOrigin(PersistenceType aPersistenceType,
                                  const nsACString& aGroup,
                                  const nsACString& aOrigin,
                                  const AtomicBool& aCanceled,
-                                 UsageInfo* aUsageInfo,
-                                 bool aForGetUsage) {
+                                 UsageInfo* aUsageInfo, bool aForGetUsage) {
   AssertIsOnIOThread();
 
   if (!aUsageInfo) {
     return NS_OK;
   }
 
   return GetUsageForOrigin(aPersistenceType, aGroup, aOrigin, aCanceled,
                            aUsageInfo);
--- a/dom/workers/WorkerError.cpp
+++ b/dom/workers/WorkerError.cpp
@@ -195,22 +195,24 @@ void WorkerErrorBase::AssignErrorBase(JS
 }
 
 void WorkerErrorNote::AssignErrorNote(JSErrorNotes::Note* aNote) {
   WorkerErrorBase::AssignErrorBase(aNote);
   xpc::ErrorNote::ErrorNoteToMessageString(aNote, mMessage);
 }
 
 WorkerErrorReport::WorkerErrorReport(WorkerPrivate* aWorkerPrivate)
-  : StructuredCloneHolder(CloningSupported, TransferringNotSupported,
-                          StructuredCloneScope::SameProcessDifferentThread),
-    mFlags(0), mExnType(JSEXN_ERR), mMutedError(false) {
+    : StructuredCloneHolder(CloningSupported, TransferringNotSupported,
+                            StructuredCloneScope::SameProcessDifferentThread),
+      mFlags(0),
+      mExnType(JSEXN_ERR),
+      mMutedError(false) {
   if (aWorkerPrivate) {
-    RefPtr<StrongWorkerRef> workerRef = StrongWorkerRef::Create(
-        aWorkerPrivate, "WorkerErrorReport");
+    RefPtr<StrongWorkerRef> workerRef =
+        StrongWorkerRef::Create(aWorkerPrivate, "WorkerErrorReport");
     if (workerRef) {
       mWorkerRef = new ThreadSafeWorkerRef(workerRef);
     }
   }
 }
 
 void WorkerErrorReport::AssignErrorReport(JSErrorReport* aReport) {
   WorkerErrorBase::AssignErrorBase(aReport);
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -4054,17 +4054,18 @@ void WorkerPrivate::ReportError(JSContex
   UniquePtr<WorkerErrorReport> report = MakeUnique<WorkerErrorReport>(this);
   if (aReport) {
     report->AssignErrorReport(aReport);
   } else {
     report->mFlags = nsIScriptError::errorFlag | nsIScriptError::exceptionFlag;
   }
 
   JS::RootedObject stack(aCx), stackGlobal(aCx);
-  xpc::FindExceptionStackForConsoleReport(nullptr, exn, exnStack, &stack, &stackGlobal);
+  xpc::FindExceptionStackForConsoleReport(nullptr, exn, exnStack, &stack,
+                                          &stackGlobal);
 
   if (stack) {
     JS::RootedValue stackValue(aCx, JS::ObjectValue(*stack));
     report->Write(aCx, stackValue, IgnoreErrors());
   }
 
   if (report->mMessage.IsEmpty() && aToStringResult) {
     nsDependentCString toStringResult(aToStringResult.c_str());
@@ -4086,18 +4087,18 @@ void WorkerPrivate::ReportError(JSContex
   data->mErrorHandlerRecursionCount++;
 
   // Don't want to run the scope's error handler if this is a recursive error or
   // if we ran out of memory.
   bool fireAtScope = data->mErrorHandlerRecursionCount == 1 &&
                      report->mErrorNumber != JSMSG_OUT_OF_MEMORY &&
                      JS::CurrentGlobalOrNull(aCx);
 
-  WorkerErrorReport::ReportError(aCx, this, fireAtScope,
-                                 nullptr, std::move(report), 0, exn);
+  WorkerErrorReport::ReportError(aCx, this, fireAtScope, nullptr,
+                                 std::move(report), 0, exn);
 
   data->mErrorHandlerRecursionCount--;
 }
 
 // static
 void WorkerPrivate::ReportErrorToConsole(const char* aMessage) {
   nsTArray<nsString> emptyParams;
   WorkerPrivate::ReportErrorToConsole(aMessage, emptyParams);
--- a/dom/workers/sharedworkers/SharedWorkerService.cpp
+++ b/dom/workers/sharedworkers/SharedWorkerService.cpp
@@ -213,19 +213,18 @@ void SharedWorkerService::GetOrCreateWor
 void SharedWorkerService::GetOrCreateWorkerManagerOnMainThread(
     nsIEventTarget* aBackgroundEventTarget, SharedWorkerParent* aActor,
     const RemoteWorkerData& aData, uint64_t aWindowID,
     const MessagePortIdentifier& aPortIdentifier) {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aBackgroundEventTarget);
   MOZ_ASSERT(aActor);
 
-  auto closeMessagePortIdentifier = MakeScopeExit([&] {
-    MessagePort::ForceClose(aPortIdentifier);
-  });
+  auto closeMessagePortIdentifier =
+      MakeScopeExit([&] { MessagePort::ForceClose(aPortIdentifier); });
 
   nsresult rv = NS_OK;
   nsCOMPtr<nsIPrincipal> storagePrincipal =
       PrincipalInfoToPrincipal(aData.storagePrincipalInfo(), &rv);
   if (NS_WARN_IF(!storagePrincipal)) {
     ErrorPropagationOnMainThread(aBackgroundEventTarget, aActor, rv);
     return;
   }
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -2875,23 +2875,25 @@ void GLContext::AfterGLCall_Debug(const 
 
   if (mDebugFlags & DebugFlagTrace) {
     printf_stderr("[gl:%p] < %s [%s]\n", this, funcName,
                   GLErrorToString(err).c_str());
   }
 
   if (err && !mLocalErrorScopeStack.size()) {
     const auto errStr = GLErrorToString(err);
-    const auto text = nsPrintfCString("%s: Generated unexpected %s error", funcName, errStr.c_str());
+    const auto text = nsPrintfCString("%s: Generated unexpected %s error",
+                                      funcName, errStr.c_str());
     printf_stderr("[gl:%p] %s.\n", this, text.BeginReading());
 
     const bool abortOnError = mDebugFlags & DebugFlagAbortOnError;
     if (abortOnError && err != LOCAL_GL_CONTEXT_LOST) {
       gfxCriticalErrorOnce() << text.BeginReading();
-      MOZ_CRASH("Aborting... (Run with MOZ_GL_DEBUG_ABORT_ON_ERROR=0 to disable)");
+      MOZ_CRASH(
+          "Aborting... (Run with MOZ_GL_DEBUG_ABORT_ON_ERROR=0 to disable)");
     }
   }
 }
 
 /*static*/
 void GLContext::OnImplicitMakeCurrentFailure(const char* const funcName) {
   gfxCriticalError() << "Ignoring call to " << funcName << " with failed"
                      << " mImplicitMakeCurrent.";
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -709,17 +709,18 @@ void APZCTreeManager::SampleForWebRender
   }
   if (activeAnimations) {
     RefPtr<CompositorController> controller;
     CompositorBridgeParent::CallWithIndirectShadowTree(
         mRootLayersId, [&](LayerTreeState& aState) -> void {
           controller = aState.GetCompositorController();
         });
     if (controller) {
-      controller->ScheduleRenderOnCompositorThread(wr::RenderRootSet(aRenderRoot));
+      controller->ScheduleRenderOnCompositorThread(
+          wr::RenderRootSet(aRenderRoot));
     }
   }
 }
 
 // Compute the clip region to be used for a layer with an APZC. This function
 // is only called for layers which actually have scrollable metrics and an APZC.
 template <class ScrollNode>
 Maybe<ParentLayerIntRegion> APZCTreeManager::ComputeClipRegion(
--- a/gfx/layers/ipc/CompositorBridgeParent.h
+++ b/gfx/layers/ipc/CompositorBridgeParent.h
@@ -431,18 +431,18 @@ class CompositorBridgeParent final : pub
   void InvalidateOnCompositorThread();
   /**
    * Returns true if a surface was obtained and the resume succeeded; false
    * otherwise.
    */
   bool ScheduleResumeOnCompositorThread();
   bool ScheduleResumeOnCompositorThread(int x, int y, int width, int height);
 
-  void ScheduleComposition(const wr::RenderRootSet& aRenderRoots =
-                               wr::RenderRootSet());
+  void ScheduleComposition(
+      const wr::RenderRootSet& aRenderRoots = wr::RenderRootSet());
 
   void NotifyShadowTreeTransaction(LayersId aId, bool aIsFirstPaint,
                                    const FocusTarget& aFocusTarget,
                                    bool aScheduleComposite,
                                    uint32_t aPaintSequenceNumber,
                                    bool aIsRepeatTransaction,
                                    bool aHitTestUpdate);
 
--- a/gfx/layers/ipc/CompositorVsyncScheduler.cpp
+++ b/gfx/layers/ipc/CompositorVsyncScheduler.cpp
@@ -179,17 +179,17 @@ bool CompositorVsyncScheduler::NotifyVsy
 
 #if defined(MOZ_WIDGET_ANDROID)
   gfx::VRManager* vm = gfx::VRManager::Get();
   if (!vm->IsPresenting()) {
     PostCompositeTask(aVsync.mId, aVsync.mTime);
   }
 #else
   PostCompositeTask(aVsync.mId, aVsync.mTime);
-#endif    // defined(MOZ_WIDGET_ANDROID)
+#endif  // defined(MOZ_WIDGET_ANDROID)
 
   PostVRTask(aVsync.mTime);
   return true;
 }
 
 void CompositorVsyncScheduler::CancelCurrentCompositeTask() {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread() ||
              NS_IsMainThread());
--- a/gfx/webrender_bindings/RenderThread.cpp
+++ b/gfx/webrender_bindings/RenderThread.cpp
@@ -893,17 +893,17 @@ static already_AddRefed<gl::GLContext> C
 static already_AddRefed<gl::GLContext> CreateGLContext() {
 #ifdef XP_WIN
   if (gfx::gfxVars::UseWebRenderANGLE()) {
     return CreateGLContextANGLE();
   }
 #endif
 
 #if defined(MOZ_WIDGET_ANDROID)
-    return CreateGLContextEGL();
+  return CreateGLContextEGL();
 #elif defined(MOZ_WAYLAND)
   if (!GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
     return CreateGLContextEGL();
   }
 #endif
   // We currently only support a shared GLContext
   // with ANGLE.
   return nullptr;
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -369,17 +369,18 @@ void WebRenderAPI::SendTransaction(Trans
 /* static */
 void WebRenderAPI::SendTransactions(
     const RenderRootArray<RefPtr<WebRenderAPI>>& aApis,
     RenderRootArray<TransactionBuilder*>& aTxns) {
   if (!aApis[RenderRoot::Default]) {
     return;
   }
 
-  aApis[RenderRoot::Default]->UpdateDebugFlags(gfx::gfxVars::WebRenderDebugFlags());
+  aApis[RenderRoot::Default]->UpdateDebugFlags(
+      gfx::gfxVars::WebRenderDebugFlags());
   AutoTArray<DocumentHandle*, kRenderRootCount> documentHandles;
   AutoTArray<Transaction*, kRenderRootCount> txns;
   Maybe<bool> useSceneBuilderThread;
   for (auto& api : aApis) {
     if (!api) {
       continue;
     }
     auto& txn = aTxns[api->GetRenderRoot()];
--- a/gfx/webrender_bindings/WebRenderAPI.h
+++ b/gfx/webrender_bindings/WebRenderAPI.h
@@ -204,18 +204,19 @@ class WebRenderAPI final {
 
  public:
   /// This can be called on the compositor thread only.
   static already_AddRefed<WebRenderAPI> Create(
       layers::CompositorBridgeParent* aBridge,
       RefPtr<widget::CompositorWidget>&& aWidget,
       const wr::WrWindowId& aWindowId, LayoutDeviceIntSize aSize);
 
-  static void SendTransactions(const RenderRootArray<RefPtr<WebRenderAPI>>& aApis,
-                               RenderRootArray<TransactionBuilder*>& aTxns);
+  static void SendTransactions(
+      const RenderRootArray<RefPtr<WebRenderAPI>>& aApis,
+      RenderRootArray<TransactionBuilder*>& aTxns);
 
   already_AddRefed<WebRenderAPI> CreateDocument(LayoutDeviceIntSize aSize,
                                                 int8_t aLayerIndex,
                                                 wr::RenderRoot aRenderRoot);
 
   already_AddRefed<WebRenderAPI> Clone();
 
   wr::WindowId GetId() const { return mId; }
--- a/js/public/TraceKind.h
+++ b/js/public/TraceKind.h
@@ -110,19 +110,19 @@ struct MapTypeToTraceKind {
   D(RegExpShared, js::RegExpShared, true,           true)
 // clang-format on
 
 // Returns true if the JS::TraceKind is represented as a node in cycle collector
 // graph.
 inline constexpr bool IsCCTraceKind(JS::TraceKind aKind) {
   switch (aKind) {
 #define JS_EXPAND_DEF(name, _1, _2, inCCGraph) \
-    case JS::TraceKind::name: \
-      return inCCGraph;
-      JS_FOR_EACH_TRACEKIND(JS_EXPAND_DEF);
+  case JS::TraceKind::name:                    \
+    return inCCGraph;
+    JS_FOR_EACH_TRACEKIND(JS_EXPAND_DEF);
 #undef JS_EXPAND_DEF
     default:
       return false;
   }
 }
 
 // Map from all public types to their trace kind.
 #define JS_EXPAND_DEF(name, type, _, _1)                   \
@@ -217,17 +217,17 @@ struct MapTypeToRootKind<JSFunction*> : 
 #if (defined(_MSC_VER) && _MSC_VER < 1910) && !defined(__clang__)
 #  define JS_DEPENDENT_TEMPLATE_HINT
 #else
 #  define JS_DEPENDENT_TEMPLATE_HINT template
 #endif
 template <typename F, typename... Args>
 auto DispatchTraceKindTyped(F f, JS::TraceKind traceKind, Args&&... args) {
   switch (traceKind) {
-#define JS_EXPAND_DEF(name, type, _, _1)                   \
+#define JS_EXPAND_DEF(name, type, _, _1)                  \
   case JS::TraceKind::name:                               \
     return f.JS_DEPENDENT_TEMPLATE_HINT operator()<type>( \
         std::forward<Args>(args)...);
     JS_FOR_EACH_TRACEKIND(JS_EXPAND_DEF);
 #undef JS_EXPAND_DEF
     default:
       MOZ_CRASH("Invalid trace kind in DispatchTraceKindTyped.");
   }
@@ -236,17 +236,17 @@ auto DispatchTraceKindTyped(F f, JS::Tra
 
 // Given a GC thing specified by pointer and trace kind, calls the functor |f|
 // with a template argument of the actual type of the pointer and returns the
 // result.
 template <typename F>
 auto MapGCThingTyped(void* thing, JS::TraceKind traceKind, F&& f) {
   switch (traceKind) {
 #define JS_EXPAND_DEF(name, type, _, _1) \
-  case JS::TraceKind::name:             \
+  case JS::TraceKind::name:              \
     return f(static_cast<type*>(thing));
     JS_FOR_EACH_TRACEKIND(JS_EXPAND_DEF);
 #undef JS_EXPAND_DEF
     default:
       MOZ_CRASH("Invalid trace kind in MapGCThingTyped.");
   }
 }
 
--- a/js/public/TrackedOptimizationInfo.h
+++ b/js/public/TrackedOptimizationInfo.h
@@ -72,98 +72,98 @@ namespace JS {
   _(Compare_Call)                           \
   _(Compare_Character)                      \
                                             \
   _(Call_Inline)
 
 // Ordering is important below. All outcomes before GenericSuccess will be
 // considered failures, and all outcomes after GenericSuccess will be
 // considered successes.
-#define TRACKED_OUTCOME_LIST(_)                   \
-  _(GenericFailure)                               \
-  _(Disabled)                                     \
-  _(NoTypeInfo)                                   \
-  _(NoShapeInfo)                                  \
-  _(UnknownProperties)                            \
-  _(Singleton)                                    \
-  _(NotSingleton)                                 \
-  _(NotFixedSlot)                                 \
-  _(InconsistentFixedSlot)                        \
-  _(NotObject)                                    \
-  _(NotStruct)                                    \
-  _(NotUndefined)                                 \
-  _(StructNoField)                                \
-  _(NeedsTypeBarrier)                             \
-  _(InDictionaryMode)                             \
-  _(MultiProtoPaths)                              \
-  _(NonWritableProperty)                          \
-  _(ProtoIndexedProps)                            \
-  _(ArrayBadFlags)                                \
-  _(ArrayDoubleConversion)                        \
-  _(ArrayRange)                                   \
-  _(ArraySeenNegativeIndex)                       \
-  _(ArraySeenNonIntegerIndex)                     \
-  _(TypedObjectHasDetachedBuffer)                 \
-  _(TypedObjectArrayRange)                        \
-  _(AccessNotDense)                               \
-  _(AccessNotTypedObject)                         \
-  _(AccessNotTypedArray)                          \
-  _(AccessNotString)                              \
-  _(OperandNotString)                             \
-  _(OperandNotNumber)                             \
-  _(OperandNotSimpleArith)                        \
-  _(OperandNotEasilyCoercibleToString)            \
-  _(OutOfBounds)                                  \
-  _(IndexType)                                    \
-  _(NotModuleNamespace)                           \
-  _(UnknownProperty)                              \
-  _(NoTemplateObject)                             \
-  _(LengthTooBig)                                 \
-  _(SpeculationOnInputTypesFailed)                \
-  _(RelationalCompare)                            \
-  _(OperandTypeNotBitwiseComparable)              \
-  _(OperandMaybeEmulatesUndefined)                \
-  _(LoosyUndefinedNullCompare)                    \
-  _(LoosyInt32BooleanCompare)                     \
-  _(CallsValueOf)                                 \
-  _(StrictCompare)                                \
-  _(InitHole)                                     \
-                                                  \
-  _(CantInlineGeneric)                            \
-  _(CantInlineNoTarget)                           \
-  _(CantInlineNotInterpreted)                     \
-  _(CantInlineNoBaseline)                         \
-  _(CantInlineLazy)                               \
-  _(CantInlineNotConstructor)                     \
-  _(CantInlineClassConstructor)                   \
-  _(CantInlineDisabledIon)                        \
-  _(CantInlineTooManyArgs)                        \
-  _(CantInlineNeedsArgsObj)                       \
-  _(CantInlineDebuggee)                           \
-  _(CantInlineExceededDepth)                      \
-  _(CantInlineExceededTotalBytecodeLength)        \
-  _(CantInlineBigCaller)                          \
-  _(CantInlineBigCallee)                          \
-  _(CantInlineBigCalleeInlinedBytecodeLength)     \
-  _(CantInlineCrossRealm)                         \
-  _(CantInlineNotHot)                             \
-  _(CantInlineNotInDispatch)                      \
-  _(CantInlineUnreachable)                        \
-  _(CantInlineNativeBadForm)                      \
-  _(CantInlineNativeBadType)                      \
-  _(CantInlineNativeNoTemplateObj)                \
-  _(CantInlineBound)                              \
-  _(CantInlineNativeNoSpecialization)             \
-  _(CantInlineUnexpectedNewTarget)                \
-  _(HasCommonInliningPath)                        \
-                                                  \
-  _(GenericSuccess)                               \
-  _(Inlined)                                      \
-  _(DOM)                                          \
-  _(Monomorphic)                                  \
+#define TRACKED_OUTCOME_LIST(_)               \
+  _(GenericFailure)                           \
+  _(Disabled)                                 \
+  _(NoTypeInfo)                               \
+  _(NoShapeInfo)                              \
+  _(UnknownProperties)                        \
+  _(Singleton)                                \
+  _(NotSingleton)                             \
+  _(NotFixedSlot)                             \
+  _(InconsistentFixedSlot)                    \
+  _(NotObject)                                \
+  _(NotStruct)                                \
+  _(NotUndefined)                             \
+  _(StructNoField)                            \
+  _(NeedsTypeBarrier)                         \
+  _(InDictionaryMode)                         \
+  _(MultiProtoPaths)                          \
+  _(NonWritableProperty)                      \
+  _(ProtoIndexedProps)                        \
+  _(ArrayBadFlags)                            \
+  _(ArrayDoubleConversion)                    \
+  _(ArrayRange)                               \
+  _(ArraySeenNegativeIndex)                   \
+  _(ArraySeenNonIntegerIndex)                 \
+  _(TypedObjectHasDetachedBuffer)             \
+  _(TypedObjectArrayRange)                    \
+  _(AccessNotDense)                           \
+  _(AccessNotTypedObject)                     \
+  _(AccessNotTypedArray)                      \
+  _(AccessNotString)                          \
+  _(OperandNotString)                         \
+  _(OperandNotNumber)                         \
+  _(OperandNotSimpleArith)                    \
+  _(OperandNotEasilyCoercibleToString)        \
+  _(OutOfBounds)                              \
+  _(IndexType)                                \
+  _(NotModuleNamespace)                       \
+  _(UnknownProperty)                          \
+  _(NoTemplateObject)                         \
+  _(LengthTooBig)                             \
+  _(SpeculationOnInputTypesFailed)            \
+  _(RelationalCompare)                        \
+  _(OperandTypeNotBitwiseComparable)          \
+  _(OperandMaybeEmulatesUndefined)            \
+  _(LoosyUndefinedNullCompare)                \
+  _(LoosyInt32BooleanCompare)                 \
+  _(CallsValueOf)                             \
+  _(StrictCompare)                            \
+  _(InitHole)                                 \
+                                              \
+  _(CantInlineGeneric)                        \
+  _(CantInlineNoTarget)                       \
+  _(CantInlineNotInterpreted)                 \
+  _(CantInlineNoBaseline)                     \
+  _(CantInlineLazy)                           \
+  _(CantInlineNotConstructor)                 \
+  _(CantInlineClassConstructor)               \
+  _(CantInlineDisabledIon)                    \
+  _(CantInlineTooManyArgs)                    \
+  _(CantInlineNeedsArgsObj)                   \
+  _(CantInlineDebuggee)                       \
+  _(CantInlineExceededDepth)                  \
+  _(CantInlineExceededTotalBytecodeLength)    \
+  _(CantInlineBigCaller)                      \
+  _(CantInlineBigCallee)                      \
+  _(CantInlineBigCalleeInlinedBytecodeLength) \
+  _(CantInlineCrossRealm)                     \
+  _(CantInlineNotHot)                         \
+  _(CantInlineNotInDispatch)                  \
+  _(CantInlineUnreachable)                    \
+  _(CantInlineNativeBadForm)                  \
+  _(CantInlineNativeBadType)                  \
+  _(CantInlineNativeNoTemplateObj)            \
+  _(CantInlineBound)                          \
+  _(CantInlineNativeNoSpecialization)         \
+  _(CantInlineUnexpectedNewTarget)            \
+  _(HasCommonInliningPath)                    \
+                                              \
+  _(GenericSuccess)                           \
+  _(Inlined)                                  \
+  _(DOM)                                      \
+  _(Monomorphic)                              \
   _(Polymorphic)
 
 #define TRACKED_TYPESITE_LIST(_) \
   _(Receiver)                    \
   _(Operand)                     \
   _(Index)                       \
   _(Value)                       \
   _(Call_Target)                 \
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -920,20 +920,20 @@ void js::GCMarker::traverseEdge(S source
   ApplyGCThingTyped(thing,
                     [this, source](auto t) { this->traverseEdge(source, t); });
 }
 
 namespace {
 
 template <typename T>
 struct TraceKindCanBeGray {};
-#define EXPAND_TRACEKIND_DEF(_, type, canBeGray, _1)  \
-  template <>                                         \
-  struct TraceKindCanBeGray<type> {                   \
-    static const bool value = canBeGray;              \
+#define EXPAND_TRACEKIND_DEF(_, type, canBeGray, _1) \
+  template <>                                        \
+  struct TraceKindCanBeGray<type> {                  \
+    static const bool value = canBeGray;             \
   };
 JS_FOR_EACH_TRACEKIND(EXPAND_TRACEKIND_DEF)
 #undef EXPAND_TRACEKIND_DEF
 
 }  // namespace
 
 struct TraceKindCanBeGrayFunctor {
   template <typename T>
@@ -1255,19 +1255,17 @@ void WasmInstanceScope::Data::trace(JSTr
   TraceBindingNames(trc, trailingNames.start(), length);
 }
 void WasmFunctionScope::Data::trace(JSTracer* trc) {
   TraceBindingNames(trc, trailingNames.start(), length);
 }
 void Scope::traceChildren(JSTracer* trc) {
   TraceNullableEdge(trc, &enclosing_, "scope enclosing");
   TraceNullableEdge(trc, &environmentShape_, "scope env shape");
-  applyScopeDataTyped([trc](auto data) {
-                        data->trace(trc);
-                      });
+  applyScopeDataTyped([trc](auto data) { data->trace(trc); });
 }
 inline void js::GCMarker::eagerlyMarkChildren(Scope* scope) {
   do {
     if (scope->environmentShape_) {
       traverseEdge(scope, scope->environmentShape_.get());
     }
     TrailingNamesArray* names = nullptr;
     uint32_t length = 0;
@@ -3320,17 +3318,18 @@ FOR_EACH_PUBLIC_GC_POINTER_TYPE(INSTANTI
 FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE(
     INSTANTIATE_ALL_VALID_HEAP_TRACE_FUNCTIONS)
 
 #define INSTANTIATE_INTERNAL_MARKING_FUNCTIONS(type)               \
   template bool IsMarkedInternal(JSRuntime* rt, type* thing);      \
   template bool IsMarkedBlackInternal(JSRuntime* rt, type* thing); \
   template bool IsAboutToBeFinalizedInternal(type* thingp);
 
-#define INSTANTIATE_INTERNAL_MARKING_FUNCTIONS_FROM_TRACEKIND(_1, type, _2, _3) \
+#define INSTANTIATE_INTERNAL_MARKING_FUNCTIONS_FROM_TRACEKIND(_1, type, _2, \
+                                                              _3)           \
   INSTANTIATE_INTERNAL_MARKING_FUNCTIONS(type*)
 
 JS_FOR_EACH_TRACEKIND(INSTANTIATE_INTERNAL_MARKING_FUNCTIONS_FROM_TRACEKIND)
 FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE(INSTANTIATE_INTERNAL_MARKING_FUNCTIONS)
 
 #undef INSTANTIATE_INTERNAL_MARKING_FUNCTIONS_FROM_TRACEKIND
 #undef INSTANTIATE_INTERNAL_MARKING_FUNCTIONS
 
--- a/js/src/gc/RootMarking.cpp
+++ b/js/src/gc/RootMarking.cpp
@@ -68,17 +68,17 @@ static inline void TraceExactStackRootLi
     T* addr = reinterpret_cast<JS::Rooted<T>*>(rooter)->address();
     TraceStackOrPersistentRoot(trc, addr, name);
     rooter = rooter->previous();
   }
 }
 
 static inline void TraceStackRoots(JSTracer* trc,
                                    JS::RootedListHeads& stackRoots) {
-#define TRACE_ROOTS(name, type, _, _1)                                 \
+#define TRACE_ROOTS(name, type, _, _1)                                \
   TraceExactStackRootList<type*>(trc, stackRoots[JS::RootKind::name], \
                                  "exact-" #name);
   JS_FOR_EACH_TRACEKIND(TRACE_ROOTS)
 #undef TRACE_ROOTS
   TraceExactStackRootList<jsid>(trc, stackRoots[JS::RootKind::Id], "exact-id");
   TraceExactStackRootList<Value>(trc, stackRoots[JS::RootKind::Value],
                                  "exact-value");
 
@@ -103,17 +103,17 @@ static inline void TracePersistentRooted
     const char* name) {
   for (PersistentRooted<void*>* r : list) {
     TraceStackOrPersistentRoot(
         trc, reinterpret_cast<PersistentRooted<T>*>(r)->address(), name);
   }
 }
 
 void JSRuntime::tracePersistentRoots(JSTracer* trc) {
-#define TRACE_ROOTS(name, type, _, _1)                                        \
+#define TRACE_ROOTS(name, type, _, _1)                                       \
   TracePersistentRootedList<type*>(trc, heapRoots.ref()[JS::RootKind::name], \
                                    "persistent-" #name);
   JS_FOR_EACH_TRACEKIND(TRACE_ROOTS)
 #undef TRACE_ROOTS
   TracePersistentRootedList<jsid>(trc, heapRoots.ref()[JS::RootKind::Id],
                                   "persistent-id");
   TracePersistentRootedList<Value>(trc, heapRoots.ref()[JS::RootKind::Value],
                                    "persistent-value");
--- a/js/src/jit/arm/Assembler-arm.h
+++ b/js/src/jit/arm/Assembler-arm.h
@@ -2316,17 +2316,18 @@ class AutoForbidPoolsAndNops : public Au
  public:
   // The maxInst argument is the maximum number of word sized instructions
   // that will be allocated within this context. It is used to determine if
   // the pool needs to be dumped before entering this content. The debug code
   // checks that no more than maxInst instructions are actually allocated.
   //
   // Allocation of pool entries is not supported within this content so the
   // code can not use large integers or float constants etc.
-  AutoForbidPoolsAndNops(Assembler* masm, size_t maxInst) : AutoForbidNops(masm) {
+  AutoForbidPoolsAndNops(Assembler* masm, size_t maxInst)
+      : AutoForbidNops(masm) {
     masm_->enterNoPool(maxInst);
   }
 
   ~AutoForbidPoolsAndNops() { masm_->leaveNoPool(); }
 };
 
 }  // namespace jit
 }  // namespace js
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -4287,17 +4287,18 @@ void MacroAssembler::patchFarJump(CodeOf
   MOZ_ASSERT(editSrc(BufferOffset(addOffset))->is<InstALU>());
 
   // When pc is read as the operand of the add, its value is the address of
   // the add instruction + 8.
   *u32 = (targetOffset - addOffset) - 8;
 }
 
 CodeOffset MacroAssembler::nopPatchableToCall(const wasm::CallSiteDesc& desc) {
-  AutoForbidPoolsAndNops afp(this, /* max number of instructions in scope = */ 1);
+  AutoForbidPoolsAndNops afp(this,
+                             /* max number of instructions in scope = */ 1);
   CodeOffset offset(currentOffset());
   ma_nop();
   append(desc, CodeOffset(currentOffset()));
   return offset;
 }
 
 void MacroAssembler::patchNopToCall(uint8_t* call, uint8_t* target) {
   uint8_t* inst = call - 4;
--- a/js/src/jit/arm64/Assembler-arm64.h
+++ b/js/src/jit/arm64/Assembler-arm64.h
@@ -532,17 +532,18 @@ class AutoForbidNops {
  public:
   explicit AutoForbidNops(Assembler* asm_) : asm_(asm_) { asm_->enterNoNops(); }
   ~AutoForbidNops() { asm_->leaveNoNops(); }
 };
 
 // Forbids pool generation during a specified interval. Not nestable.
 class AutoForbidPoolsAndNops : public AutoForbidNops {
  public:
-  AutoForbidPoolsAndNops(Assembler* asm_, size_t maxInst) : AutoForbidNops(asm_) {
+  AutoForbidPoolsAndNops(Assembler* asm_, size_t maxInst)
+      : AutoForbidNops(asm_) {
     asm_->enterNoPool(maxInst);
   }
   ~AutoForbidPoolsAndNops() { asm_->leaveNoPool(); }
 };
 
 }  // namespace jit
 }  // namespace js
 
--- a/js/src/jit/arm64/MacroAssembler-arm64-inl.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64-inl.h
@@ -271,17 +271,18 @@ void MacroAssembler::add64(Imm32 imm, Re
 
 void MacroAssembler::add64(Imm64 imm, Register64 dest) {
   Add(ARMRegister(dest.reg, 64), ARMRegister(dest.reg, 64), Operand(imm.value));
 }
 
 CodeOffset MacroAssembler::sub32FromStackPtrWithPatch(Register dest) {
   vixl::UseScratchRegisterScope temps(this);
   const ARMRegister scratch = temps.AcquireX();
-  AutoForbidPoolsAndNops afp(this, /* max number of instructions in scope = */ 3);
+  AutoForbidPoolsAndNops afp(this,
+                             /* max number of instructions in scope = */ 3);
   CodeOffset offs = CodeOffset(currentOffset());
   movz(scratch, 0, 0);
   movk(scratch, 0, 16);
   Sub(ARMRegister(dest, 64), sp, scratch);
   return offs;
 }
 
 void MacroAssembler::patchSub32FromStackPtr(CodeOffset offset, Imm32 imm) {
--- a/js/src/jit/arm64/MacroAssembler-arm64.cpp
+++ b/js/src/jit/arm64/MacroAssembler-arm64.cpp
@@ -304,22 +304,23 @@ void MacroAssemblerCompat::wasmLoadImpl(
   ARMRegister ptr(ptr_, 64);
   if (offset) {
     Add(ptr, ptr, Operand(offset));
   }
 
   asMasm().memoryBarrierBefore(access.sync());
 
   // Reg+Reg addressing is directly encodable in one Load instruction, hence
-  // the AutoForbidPoolsAndNops will ensure that the access metadata is emitted at
-  // the address of the Load.
+  // the AutoForbidPoolsAndNops will ensure that the access metadata is emitted
+  // at the address of the Load.
   MemOperand srcAddr(memoryBase, ptr);
 
   {
-    AutoForbidPoolsAndNops afp(this, /* max number of instructions in scope = */ 1);
+    AutoForbidPoolsAndNops afp(this,
+                               /* max number of instructions in scope = */ 1);
     append(access, asMasm().currentOffset());
     switch (access.type()) {
       case Scalar::Int8:
         Ldrsb(SelectGPReg(outany, out64), srcAddr);
         break;
       case Scalar::Uint8:
         Ldrb(SelectGPReg(outany, out64), srcAddr);
         break;
@@ -372,22 +373,23 @@ void MacroAssemblerCompat::wasmStoreImpl
   ARMRegister ptr(ptr_, 64);
   if (offset) {
     Add(ptr, ptr, Operand(offset));
   }
 
   asMasm().memoryBarrierBefore(access.sync());
 
   // Reg+Reg addressing is directly encodable in one Store instruction, hence
-  // the AutoForbidPoolsAndNops will ensure that the access metadata is emitted at
-  // the address of the Store.
+  // the AutoForbidPoolsAndNops will ensure that the access metadata is emitted
+  // at the address of the Store.
   MemOperand dstAddr(memoryBase, ptr);
 
   {
-    AutoForbidPoolsAndNops afp(this, /* max number of instructions in scope = */ 1);
+    AutoForbidPoolsAndNops afp(this,
+                               /* max number of instructions in scope = */ 1);
     append(access, asMasm().currentOffset());
     switch (access.type()) {
       case Scalar::Int8:
       case Scalar::Uint8:
         Strb(SelectGPReg(valany, val64), dstAddr);
         break;
       case Scalar::Int16:
       case Scalar::Uint16:
@@ -678,17 +680,18 @@ void MacroAssembler::patchCall(uint32_t 
   AutoFlushICache::flush(uintptr_t(inst), 4);
 }
 
 CodeOffset MacroAssembler::farJumpWithPatch() {
   vixl::UseScratchRegisterScope temps(this);
   const ARMRegister scratch = temps.AcquireX();
   const ARMRegister scratch2 = temps.AcquireX();
 
-  AutoForbidPoolsAndNops afp(this, /* max number of instructions in scope = */ 7);
+  AutoForbidPoolsAndNops afp(this,
+                             /* max number of instructions in scope = */ 7);
 
   mozilla::DebugOnly<uint32_t> before = currentOffset();
 
   align(8);  // At most one nop
 
   Label branch;
   adr(scratch2, &branch);
   ldr(scratch, vixl::MemOperand(scratch2, 4));
@@ -715,17 +718,18 @@ void MacroAssembler::patchFarJump(CodeOf
   MOZ_ASSERT(inst1->InstructionBits() == UINT32_MAX);
   MOZ_ASSERT(inst2->InstructionBits() == UINT32_MAX);
 
   inst1->SetInstructionBits((uint32_t)distance);
   inst2->SetInstructionBits((uint32_t)(distance >> 32));
 }
 
 CodeOffset MacroAssembler::nopPatchableToCall(const wasm::CallSiteDesc& desc) {
-  AutoForbidPoolsAndNops afp(this, /* max number of instructions in scope = */ 1);
+  AutoForbidPoolsAndNops afp(this,
+                             /* max number of instructions in scope = */ 1);
   CodeOffset offset(currentOffset());
   Nop();
   append(desc, CodeOffset(currentOffset()));
   return offset;
 }
 
 void MacroAssembler::patchNopToCall(uint8_t* call, uint8_t* target) {
   uint8_t* inst = call - 4;
@@ -1070,17 +1074,18 @@ template void MacroAssembler::storeUnbox
     const BaseObjectElementIndex& dest, MIRType slotType);
 
 void MacroAssembler::comment(const char* msg) { Assembler::comment(msg); }
 
 // ========================================================================
 // wasm support
 
 CodeOffset MacroAssembler::wasmTrapInstruction() {
-  AutoForbidPoolsAndNops afp(this, /* max number of instructions in scope = */ 1);
+  AutoForbidPoolsAndNops afp(this,
+                             /* max number of instructions in scope = */ 1);
   CodeOffset offs(currentOffset());
   Unreachable();
   return offs;
 }
 
 void MacroAssembler::wasmBoundsCheck(Condition cond, Register index,
                                      Register boundsCheckLimit, Label* label) {
   // Not used on ARM64, we rely on signal handling instead
@@ -1510,67 +1515,71 @@ static void SignOrZeroExtend(MacroAssemb
 
 static void LoadExclusive(MacroAssembler& masm,
                           const wasm::MemoryAccessDesc* access,
                           Scalar::Type srcType, Width targetWidth,
                           MemOperand ptr, Register dest) {
   bool signExtend = Scalar::isSignedIntType(srcType);
 
   // With this address form, a single native ldxr* will be emitted, and the
-  // AutoForbidPoolsAndNops ensures that the metadata is emitted at the address of
-  // the ldxr*.
+  // AutoForbidPoolsAndNops ensures that the metadata is emitted at the address
+  // of the ldxr*.
   MOZ_ASSERT(ptr.IsImmediateOffset() && ptr.offset() == 0);
 
   switch (Scalar::byteSize(srcType)) {
     case 1: {
       {
-        AutoForbidPoolsAndNops afp(&masm,
-                            /* max number of instructions in scope = */ 1);
+        AutoForbidPoolsAndNops afp(
+            &masm,
+            /* max number of instructions in scope = */ 1);
         if (access) {
           masm.append(*access, masm.currentOffset());
         }
         masm.Ldxrb(W(dest), ptr);
       }
       if (signExtend) {
         masm.Sbfm(R(dest, targetWidth), R(dest, targetWidth), 0, 7);
       }
       break;
     }
     case 2: {
       {
-        AutoForbidPoolsAndNops afp(&masm,
-                            /* max number of instructions in scope = */ 1);
+        AutoForbidPoolsAndNops afp(
+            &masm,
+            /* max number of instructions in scope = */ 1);
         if (access) {
           masm.append(*access, masm.currentOffset());
         }
         masm.Ldxrh(W(dest), ptr);
       }
       if (signExtend) {
         masm.Sbfm(R(dest, targetWidth), R(dest, targetWidth), 0, 15);
       }
       break;
     }
     case 4: {
       {
-        AutoForbidPoolsAndNops afp(&masm,
-                            /* max number of instructions in scope = */ 1);
+        AutoForbidPoolsAndNops afp(
+            &masm,
+            /* max number of instructions in scope = */ 1);
         if (access) {
           masm.append(*access, masm.currentOffset());
         }
         masm.Ldxr(W(dest), ptr);
       }
       if (targetWidth == Width::_64 && signExtend) {
         masm.Sbfm(X(dest), X(dest), 0, 31);
       }
       break;
     }
     case 8: {
       {
-        AutoForbidPoolsAndNops afp(&masm,
-                            /* max number of instructions in scope = */ 1);
+        AutoForbidPoolsAndNops afp(
+            &masm,
+            /* max number of instructions in scope = */ 1);
         if (access) {
           masm.append(*access, masm.currentOffset());
         }
         masm.Ldxr(X(dest), ptr);
       }
       break;
     }
     default: {
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -5003,20 +5003,19 @@ JS_PUBLIC_API void JS_SetPendingExceptio
   }
 }
 
 JS_PUBLIC_API void JS_ClearPendingException(JSContext* cx) {
   AssertHeapIsIdle();
   cx->clearPendingException();
 }
 
-JS_PUBLIC_API void
-JS::SetPendingExceptionAndStack(JSContext* cx, HandleValue value,
-                                HandleObject stack)
-{
+JS_PUBLIC_API void JS::SetPendingExceptionAndStack(JSContext* cx,
+                                                   HandleValue value,
+                                                   HandleObject stack) {
   AssertHeapIsIdle();
   CHECK_THREAD(cx);
   cx->releaseCheck(value);
   cx->releaseCheck(stack);
 
   RootedSavedFrame nstack(cx);
   if (stack) {
     nstack = &UncheckedUnwrap(stack)->as<SavedFrame>();
--- a/js/src/vm/Scope.cpp
+++ b/js/src/vm/Scope.cpp
@@ -448,19 +448,17 @@ Scope* Scope::clone(JSContext* cx, Handl
       break;
   }
 
   return nullptr;
 }
 
 void Scope::finalize(FreeOp* fop) {
   MOZ_ASSERT(CurrentThreadIsGCSweeping());
-  applyScopeDataTyped([fop](auto data) {
-                        fop->delete_(data);
-                      });
+  applyScopeDataTyped([fop](auto data) { fop->delete_(data); });
   data_ = nullptr;
 }
 
 size_t Scope::sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
   if (data_) {
     return mallocSizeOf(data_);
   }
   return 0;
--- a/js/src/vm/Scope.h
+++ b/js/src/vm/Scope.h
@@ -1019,49 +1019,49 @@ class WasmFunctionScope : public Scope {
 };
 
 template <typename F>
 void Scope::applyScopeDataTyped(F&& f) {
   switch (kind()) {
     case ScopeKind::Function: {
       f(&as<FunctionScope>().data());
       break;
-    case ScopeKind::FunctionBodyVar:
-    case ScopeKind::ParameterExpressionVar:
-      f(&as<VarScope>().data());
-      break;
-    case ScopeKind::Lexical:
-    case ScopeKind::SimpleCatch:
-    case ScopeKind::Catch:
-    case ScopeKind::NamedLambda:
-    case ScopeKind::StrictNamedLambda:
-      f(&as<LexicalScope>().data());
-      break;
-    case ScopeKind::With:
-      // With scopes do not have data.
-      break;
-    case ScopeKind::Eval:
-    case ScopeKind::StrictEval:
-      f(&as<EvalScope>().data());
-      break;
-    case ScopeKind::Global:
-    case ScopeKind::NonSyntactic:
-      f(&as<GlobalScope>().data());
-      break;
-    case ScopeKind::Module:
-      f(&as<ModuleScope>().data());
-      break;
-    case ScopeKind::WasmInstance:
-      f(&as<WasmInstanceScope>().data());
-      break;
-    case ScopeKind::WasmFunction:
-      f(&as<WasmFunctionScope>().data());
-      break;
-    default:
-      MOZ_CRASH("Unexpected scope type in ApplyScopeDataTyped");
+      case ScopeKind::FunctionBodyVar:
+      case ScopeKind::ParameterExpressionVar:
+        f(&as<VarScope>().data());
+        break;
+      case ScopeKind::Lexical:
+      case ScopeKind::SimpleCatch:
+      case ScopeKind::Catch:
+      case ScopeKind::NamedLambda:
+      case ScopeKind::StrictNamedLambda:
+        f(&as<LexicalScope>().data());
+        break;
+      case ScopeKind::With:
+        // With scopes do not have data.
+        break;
+      case ScopeKind::Eval:
+      case ScopeKind::StrictEval:
+        f(&as<EvalScope>().data());
+        break;
+      case ScopeKind::Global:
+      case ScopeKind::NonSyntactic:
+        f(&as<GlobalScope>().data());
+        break;
+      case ScopeKind::Module:
+        f(&as<ModuleScope>().data());
+        break;
+      case ScopeKind::WasmInstance:
+        f(&as<WasmInstanceScope>().data());
+        break;
+      case ScopeKind::WasmFunction:
+        f(&as<WasmFunctionScope>().data());
+        break;
+      default:
+        MOZ_CRASH("Unexpected scope type in ApplyScopeDataTyped");
     }
   }
 }
 
 //
 // An iterator for a Scope's bindings. This is the source of truth for frame
 // and environment object layout.
 //
--- a/js/src/vm/TypeInference-inl.h
+++ b/js/src/vm/TypeInference-inl.h
@@ -993,18 +993,18 @@ struct TypeHashSet {
       return;
     }
 
     // Simple functions to read and mutate the mark bit of pointers.
     auto markBit = [](U* elem) -> bool {
       return bool(reinterpret_cast<uintptr_t>(elem) & U::TypeHashSetMarkBit);
     };
     auto toggleMarkBit = [](U* elem) -> U* {
-      return reinterpret_cast<U*>(
-          reinterpret_cast<uintptr_t>(elem) ^ U::TypeHashSetMarkBit);
+      return reinterpret_cast<U*>(reinterpret_cast<uintptr_t>(elem) ^
+                                  U::TypeHashSetMarkBit);
     };
 
     // When we have a single element it is stored in-place of the function
     // array pointer.
     if (count == 1) {
       U* elem = f(reinterpret_cast<U*>(values));
       MOZ_ASSERT(!markBit(elem));
       values = reinterpret_cast<U**>(elem);
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -4690,17 +4690,18 @@ class BaseCompiler final : public BaseCo
     tableCl.target()->bind(theTable->offset());
     masm.addCodeLabel(tableCl);
 
     masm.jmp(Operand(scratch, switchValue, ScalePointer));
 #elif defined(JS_CODEGEN_ARM)
     // Flush constant pools: offset must reflect the distance from the MOV
     // to the start of the table; as the address of the MOV is given by the
     // label, nothing must come between the bind() and the ma_mov().
-    AutoForbidPoolsAndNops afp(&masm, /* number of instructions in scope = */ 5);
+    AutoForbidPoolsAndNops afp(&masm,
+                               /* number of instructions in scope = */ 5);
 
     ScratchI32 scratch(*this);
 
     // Compute the offset from the ma_mov instruction to the jump table.
     Label here;
     masm.bind(&here);
     uint32_t offset = here.offset() - theTable->offset();
 
@@ -4723,17 +4724,18 @@ class BaseCompiler final : public BaseCo
 
     masm.ma_li(scratch, &tableCl);
 
     tableCl.target()->bind(theTable->offset());
     masm.addCodeLabel(tableCl);
 
     masm.branchToComputedAddress(BaseIndex(scratch, switchValue, ScalePointer));
 #elif defined(JS_CODEGEN_ARM64)
-    AutoForbidPoolsAndNops afp(&masm, /* number of instructions in scope = */ 4);
+    AutoForbidPoolsAndNops afp(&masm,
+                               /* number of instructions in scope = */ 4);
 
     ScratchI32 scratch(*this);
 
     ARMRegister s(scratch, 64);
     ARMRegister v(switchValue, 64);
     masm.Adr(s, theTable);
     masm.Add(s, s, Operand(v, vixl::LSL, 3));
     masm.Ldr(s, MemOperand(s, 0));
--- a/js/src/wasm/WasmFrameIter.cpp
+++ b/js/src/wasm/WasmFrameIter.cpp
@@ -434,17 +434,18 @@ static void GenerateCallablePrologue(Mac
     masm.moveStackPtrTo(FramePointer);
     MOZ_ASSERT_IF(!masm.oom(), SetFP == masm.currentOffset() - *entry);
   }
 #elif defined(JS_CODEGEN_ARM64)
   {
     // We do not use the PseudoStackPointer.
     MOZ_ASSERT(masm.GetStackPointer64().code() == sp.code());
 
-    AutoForbidPoolsAndNops afp(&masm, /* number of instructions in scope = */ 5);
+    AutoForbidPoolsAndNops afp(&masm,
+                               /* number of instructions in scope = */ 5);
 
     *entry = masm.currentOffset();
 
     masm.Sub(sp, sp, sizeof(Frame));
     masm.Str(ARMRegister(lr, 64),
              MemOperand(sp, offsetof(Frame, returnAddress)));
     MOZ_ASSERT_IF(!masm.oom(), PushedRetAddr == masm.currentOffset() - *entry);
     masm.Str(ARMRegister(WasmTlsReg, 64), MemOperand(sp, offsetof(Frame, tls)));
@@ -453,17 +454,18 @@ static void GenerateCallablePrologue(Mac
              MemOperand(sp, offsetof(Frame, callerFP)));
     MOZ_ASSERT_IF(!masm.oom(), PushedFP == masm.currentOffset() - *entry);
     masm.Mov(ARMRegister(FramePointer, 64), sp);
     MOZ_ASSERT_IF(!masm.oom(), SetFP == masm.currentOffset() - *entry);
   }
 #else
   {
 #  if defined(JS_CODEGEN_ARM)
-    AutoForbidPoolsAndNops afp(&masm, /* number of instructions in scope = */ 7);
+    AutoForbidPoolsAndNops afp(&masm,
+                               /* number of instructions in scope = */ 7);
 
     *entry = masm.currentOffset();
 
     MOZ_ASSERT(BeforePushRetAddr == 0);
     masm.push(lr);
 #  else
     *entry = masm.currentOffset();
     // The x86/x64 call instruction pushes the return address.
@@ -692,25 +694,27 @@ void wasm::GenerateJitExitEpilogue(Macro
   MOZ_ASSERT(masm.framePushed() == 0);
 }
 
 void wasm::GenerateJitEntryPrologue(MacroAssembler& masm, Offsets* offsets) {
   masm.haltingAlign(CodeAlignment);
 
   {
 #if defined(JS_CODEGEN_ARM)
-    AutoForbidPoolsAndNops afp(&masm, /* number of instructions in scope = */ 2);
+    AutoForbidPoolsAndNops afp(&masm,
+                               /* number of instructions in scope = */ 2);
     offsets->begin = masm.currentOffset();
     MOZ_ASSERT(BeforePushRetAddr == 0);
     masm.push(lr);
 #elif defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64)
     offsets->begin = masm.currentOffset();
     masm.push(ra);
 #elif defined(JS_CODEGEN_ARM64)
-    AutoForbidPoolsAndNops afp(&masm, /* number of instructions in scope = */ 3);
+    AutoForbidPoolsAndNops afp(&masm,
+                               /* number of instructions in scope = */ 3);
     offsets->begin = masm.currentOffset();
     MOZ_ASSERT(BeforePushRetAddr == 0);
     // Subtract from SP first as SP must be aligned before offsetting.
     masm.Sub(sp, sp, 8);
     masm.storePtr(lr, Address(masm.getStackPointer(), 0));
     masm.adjustFrame(8);
 #else
     // The x86/x64 call instruction pushes the return address.
--- a/layout/base/nsRefreshDriver.cpp
+++ b/layout/base/nsRefreshDriver.cpp
@@ -73,17 +73,17 @@
 #include "mozilla/Unused.h"
 #include "mozilla/TimelineConsumers.h"
 #include "nsAnimationManager.h"
 #include "nsDisplayList.h"
 #include "nsTransitionManager.h"
 
 #if defined(MOZ_WIDGET_ANDROID)
 #  include "VRManager.h"
-#endif    // defined(MOZ_WIDGET_ANDROID)
+#endif  // defined(MOZ_WIDGET_ANDROID)
 
 #ifdef MOZ_XUL
 #  include "nsXULPopupManager.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::widget;
 using namespace mozilla::ipc;
@@ -1758,17 +1758,17 @@ void nsRefreshDriver::Tick(VsyncId aId, 
   }
 
 #if defined(MOZ_WIDGET_ANDROID)
   gfx::VRManager* vm = gfx::VRManager::Get();
   if (vm->IsPresenting()) {
     RunFrameRequestCallbacks(aNowTime);
     return;
   }
-#endif    // defined(MOZ_WIDGET_ANDROID)
+#endif  // defined(MOZ_WIDGET_ANDROID)
 
   AUTO_PROFILER_LABEL("nsRefreshDriver::Tick", LAYOUT);
 
   // We're either frozen or we were disconnected (likely in the middle
   // of a tick iteration).  Just do nothing here, since our
   // prescontext went away.
   if (IsFrozen() || !mPresContext) {
     return;
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -1281,19 +1281,21 @@ void nsBlockFrame::Reflow(nsPresContext*
       // ::markers that are placed next to a child block (bug 92896)
 
       // Tall ::markers won't look particularly nice here...
       LogicalRect bbox =
           marker->GetLogicalRect(wm, reflowOutput.PhysicalSize());
       const auto baselineGroup = BaselineSharingGroup::eFirst;
       nscoord markerBaseline;
       if (MOZ_UNLIKELY(wm.IsOrthogonalTo(marker->GetWritingMode()) ||
-                       !marker->GetNaturalBaselineBOffset(wm, baselineGroup, &markerBaseline))) {
+                       !marker->GetNaturalBaselineBOffset(wm, baselineGroup,
+                                                          &markerBaseline))) {
         // ::marker has no baseline in this axis: align with its margin-box end.
-        markerBaseline = bbox.BSize(wm) + marker->GetLogicalUsedMargin(wm).BEnd(wm);
+        markerBaseline =
+            bbox.BSize(wm) + marker->GetLogicalUsedMargin(wm).BEnd(wm);
       }
       bbox.BStart(wm) = position.mBaseline - markerBaseline;
       marker->SetRect(wm, bbox, reflowOutput.PhysicalSize());
     }
     // Otherwise just leave the ::marker where it is, up against our
     // block-start padding.
   }
 
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -9406,17 +9406,17 @@ nsOverflowAreas nsTextFrame::RecomputeOv
   if (mTextRun->IsVertical()) {
     // Swap line-relative textMetrics dimensions to physical coordinates.
     Swap(boundingBox.x, boundingBox.y);
     Swap(boundingBox.width, boundingBox.height);
   }
   nsRect& vis = result.VisualOverflow();
   vis.UnionRect(vis, boundingBox);
   UnionAdditionalOverflow(PresContext(), aBlockFrame, provider, &vis, true,
-      aIncludeShadows);
+                          aIncludeShadows);
   return result;
 }
 
 static void TransformChars(nsTextFrame* aFrame, const nsStyleText* aStyle,
                            const gfxTextRun* aTextRun, uint32_t aSkippedOffset,
                            const nsTextFragment* aFrag, int32_t aFragOffset,
                            int32_t aFragLen, nsAString& aOut) {
   nsAutoString fragString;
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -1717,19 +1717,17 @@ class nsDisplayListBuilder {
     if (!aFrame->IsFrameModified()) {
       mModifiedFramesDuringBuilding.AppendElement(aFrame);
       aFrame->SetFrameIsModified(true);
       return true;
     }
     return false;
   }
 
-  void RebuildAllItemsInCurrentSubtree() {
-    mDirtyRect = mVisibleRect;
-  }
+  void RebuildAllItemsInCurrentSubtree() { mDirtyRect = mVisibleRect; }
 
   /**
    * This is a convenience function to ease the transition until AGRs and ASRs
    * are unified.
    */
   AnimatedGeometryRoot* AnimatedGeometryRootForASR(
       const ActiveScrolledRoot* aASR);
 
--- a/layout/style/ServoTypes.h
+++ b/layout/style/ServoTypes.h
@@ -13,17 +13,17 @@
 #include "mozilla/TypedEnumBits.h"
 #include "nsCoord.h"
 
 struct RawServoFontFaceRule;
 
 namespace mozilla {
 enum class StyleOrigin : uint8_t;
 struct LangGroupFontPrefs;
-}
+}  // namespace mozilla
 
 // used for associating origin with specific @font-face rules
 struct nsFontFaceRuleContainer {
   RefPtr<RawServoFontFaceRule> mRule;
   mozilla::StyleOrigin mOrigin;
 };
 
 namespace mozilla {
--- a/layout/svg/nsSVGPatternFrame.cpp
+++ b/layout/svg/nsSVGPatternFrame.cpp
@@ -356,17 +356,19 @@ already_AddRefed<SourceSurface> nsSVGPat
     AutoSetRestorePaintServerState paintServer(patternWithChildren);
     for (nsIFrame *kid = firstKid; kid; kid = kid->GetNextSibling()) {
       gfxMatrix tm = *(patternWithChildren->mCTM);
 
       // The CTM of each frame referencing us can be different
       nsSVGDisplayableFrame *SVGFrame = do_QueryFrame(kid);
       if (SVGFrame) {
         SVGFrame->NotifySVGChanged(nsSVGDisplayableFrame::TRANSFORM_CHANGED);
-        tm = nsSVGUtils::GetTransformMatrixInUserSpace(kid, patternWithChildren) * tm;
+        tm = nsSVGUtils::GetTransformMatrixInUserSpace(kid,
+                                                       patternWithChildren) *
+             tm;
       }
 
       nsSVGUtils::PaintFrameWithEffects(kid, *ctx, tm, aImgParams);
     }
   }
 
   patternWithChildren->mSource = nullptr;
 
@@ -630,17 +632,17 @@ gfxMatrix nsSVGPatternFrame::ConstructCT
       ctx = static_cast<SVGElement *>(targetContent)->GetCtx();
     }
     scaleX = scaleY = MaxExpansion(callerCTM);
   }
 
   if (!aViewBox.IsExplicitlySet()) {
     return gfxMatrix(scaleX, 0.0, 0.0, scaleY, 0.0, 0.0);
   }
-  const SVGViewBox& viewBox = aViewBox.GetAnimValue();
+  const SVGViewBox &viewBox = aViewBox.GetAnimValue();
 
   if (viewBox.height <= 0.0f || viewBox.width <= 0.0f) {
     return gfxMatrix(0.0, 0.0, 0.0, 0.0, 0.0, 0.0);  // singular
   }
 
   float viewportWidth, viewportHeight;
   if (targetContent->IsSVGElement()) {
     // If we're dealing with an SVG target only retrieve the context once.
--- a/mozglue/misc/ImportDir.h
+++ b/mozglue/misc/ImportDir.h
@@ -6,19 +6,18 @@
 
 #include "mozilla/LauncherResult.h"
 #include "mozilla/NativeNt.h"
 #include "mozilla/WinHeaderOnlyUtils.h"
 
 namespace mozilla {
 namespace detail {
 
-inline LauncherResult<nt::DataDirectoryEntry>
-GetImageDirectoryViaFileIo(const nsAutoHandle& aImageFile,
-                           const uint32_t aOurImportDirectoryRva) {
+inline LauncherResult<nt::DataDirectoryEntry> GetImageDirectoryViaFileIo(
+    const nsAutoHandle& aImageFile, const uint32_t aOurImportDirectoryRva) {
   OVERLAPPED ov = {};
   ov.Offset = aOurImportDirectoryRva;
 
   DWORD bytesRead;
   nt::DataDirectoryEntry result;
   if (!::ReadFile(aImageFile, &result, sizeof(result), &bytesRead, &ov) ||
       bytesRead != sizeof(result)) {
     return LAUNCHER_ERROR_FROM_LAST();
@@ -46,65 +45,62 @@ GetImageDirectoryViaFileIo(const nsAutoH
  *                       process for examination.
  * @param aTargetProcess Handle to the child process whose import table we are
  *                       touching.
  * @param aRemoteExeImage HMODULE referencing the child process's executable
  *                        binary that we are touching. This value is used to
  *                        determine the base address of the binary within the
  *                        target process.
  */
-inline LauncherVoidResult
-RestoreImportDirectory(const wchar_t* aFullImagePath,
-                       const nt::PEHeaders& aLocalExeImage,
-                       HANDLE aTargetProcess, HMODULE aRemoteExeImage) {
+inline LauncherVoidResult RestoreImportDirectory(
+    const wchar_t* aFullImagePath, const nt::PEHeaders& aLocalExeImage,
+    HANDLE aTargetProcess, HMODULE aRemoteExeImage) {
   uint32_t importDirEntryRva;
   PIMAGE_DATA_DIRECTORY importDirEntry =
-    aLocalExeImage.GetImageDirectoryEntryPtr(IMAGE_DIRECTORY_ENTRY_IMPORT,
-                                             &importDirEntryRva);
+      aLocalExeImage.GetImageDirectoryEntryPtr(IMAGE_DIRECTORY_ENTRY_IMPORT,
+                                               &importDirEntryRva);
   if (!importDirEntry) {
     return LAUNCHER_ERROR_FROM_WIN32(ERROR_BAD_EXE_FORMAT);
   }
 
-  nsAutoHandle file(::CreateFileW(aFullImagePath, GENERIC_READ,
-                                  FILE_SHARE_READ, nullptr, OPEN_EXISTING,
-                                  FILE_ATTRIBUTE_NORMAL, nullptr));
+  nsAutoHandle file(::CreateFileW(aFullImagePath, GENERIC_READ, FILE_SHARE_READ,
+                                  nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,
+                                  nullptr));
   if (file.get() == INVALID_HANDLE_VALUE) {
     return LAUNCHER_ERROR_FROM_LAST();
   }
 
   // Why do we use file I/O here instead of a memory mapping? The simple reason
   // is that we do not want any kernel-mode drivers to start tampering with file
   // contents under the belief that the file is being mapped for execution.
   // Windows 8 supports creation of file mappings using the SEC_IMAGE_NO_EXECUTE
   // flag, which may help to mitigate this, but we might as well just support
   // a single implementation that works everywhere.
   LauncherResult<nt::DataDirectoryEntry> realImportDirectory =
-    detail::GetImageDirectoryViaFileIo(file, importDirEntryRva);
+      detail::GetImageDirectoryViaFileIo(file, importDirEntryRva);
   if (realImportDirectory.isErr()) {
     return LAUNCHER_ERROR_FROM_RESULT(realImportDirectory);
   }
 
   nt::DataDirectoryEntry toWrite = realImportDirectory.unwrap();
 
-  void* remoteAddress =
-    reinterpret_cast<char*>(nt::PEHeaders::HModuleToBaseAddr(aRemoteExeImage)) +
-    importDirEntryRva;
+  void* remoteAddress = reinterpret_cast<char*>(
+                            nt::PEHeaders::HModuleToBaseAddr(aRemoteExeImage)) +
+                        importDirEntryRva;
 
-  { // Scope for prot
-    AutoVirtualProtect prot(remoteAddress,
-                            sizeof(IMAGE_DATA_DIRECTORY),
+  {  // Scope for prot
+    AutoVirtualProtect prot(remoteAddress, sizeof(IMAGE_DATA_DIRECTORY),
                             PAGE_READWRITE, aTargetProcess);
     if (!prot) {
       return LAUNCHER_ERROR_FROM_MOZ_WINDOWS_ERROR(prot.GetError());
     }
 
     SIZE_T bytesWritten;
-    if (!::WriteProcessMemory(aTargetProcess, remoteAddress,
-                              &toWrite, sizeof(IMAGE_DATA_DIRECTORY),
-                              &bytesWritten) ||
+    if (!::WriteProcessMemory(aTargetProcess, remoteAddress, &toWrite,
+                              sizeof(IMAGE_DATA_DIRECTORY), &bytesWritten) ||
         bytesWritten != sizeof(IMAGE_DATA_DIRECTORY)) {
       return LAUNCHER_ERROR_FROM_LAST();
     }
   }
 
   return Ok();
 }
 
--- a/mozglue/misc/NativeNt.h
+++ b/mozglue/misc/NativeNt.h
@@ -254,18 +254,17 @@ class MOZ_RAII PEHeaders final {
   static PIMAGE_DOS_HEADER HModuleToBaseAddr(HMODULE aModule) {
     return reinterpret_cast<PIMAGE_DOS_HEADER>(
         reinterpret_cast<uintptr_t>(aModule) & ~uintptr_t(3));
   }
 
   explicit PEHeaders(void* aBaseAddress)
       : PEHeaders(reinterpret_cast<PIMAGE_DOS_HEADER>(aBaseAddress)) {}
 
-  explicit PEHeaders(HMODULE aModule)
-      : PEHeaders(HModuleToBaseAddr(aModule)) {}
+  explicit PEHeaders(HMODULE aModule) : PEHeaders(HModuleToBaseAddr(aModule)) {}
 
   explicit PEHeaders(PIMAGE_DOS_HEADER aMzHeader)
       : mMzHeader(aMzHeader), mPeHeader(nullptr), mImageLimit(nullptr) {
     if (!mMzHeader || mMzHeader->e_magic != IMAGE_DOS_SIGNATURE) {
       return;
     }
 
     mPeHeader = RVAToPtrUnchecked<PIMAGE_NT_HEADERS>(mMzHeader->e_lfanew);
@@ -325,32 +324,31 @@ class MOZ_RAII PEHeaders final {
   }
 
   PIMAGE_RESOURCE_DIRECTORY GetResourceTable() {
     return GetImageDirectoryEntry<PIMAGE_RESOURCE_DIRECTORY>(
         IMAGE_DIRECTORY_ENTRY_RESOURCE);
   }
 
   PIMAGE_DATA_DIRECTORY GetImageDirectoryEntryPtr(
-      const uint32_t aDirectoryIndex,
-      uint32_t* aOutRva = nullptr) const {
+      const uint32_t aDirectoryIndex, uint32_t* aOutRva = nullptr) const {
     if (aOutRva) {
       *aOutRva = 0;
     }
 
     IMAGE_OPTIONAL_HEADER& optionalHeader = mPeHeader->OptionalHeader;
 
     const uint32_t maxIndex = std::min(optionalHeader.NumberOfRvaAndSizes,
                                        DWORD(IMAGE_NUMBEROF_DIRECTORY_ENTRIES));
     if (aDirectoryIndex >= maxIndex) {
       return nullptr;
     }
 
     PIMAGE_DATA_DIRECTORY dirEntry =
-      &optionalHeader.DataDirectory[aDirectoryIndex];
+        &optionalHeader.DataDirectory[aDirectoryIndex];
     if (aOutRva) {
       *aOutRva = reinterpret_cast<char*>(dirEntry) -
                  reinterpret_cast<char*>(mMzHeader);
       MOZ_ASSERT(*aOutRva);
     }
 
     return dirEntry;
   }
@@ -399,17 +397,17 @@ class MOZ_RAII PEHeaders final {
       return curImpDesc;
     }
 
     return nullptr;
   }
 
   struct IATThunks {
     IATThunks(PIMAGE_THUNK_DATA aFirstThunk, ptrdiff_t aNumThunks)
-      : mFirstThunk(aFirstThunk), mNumThunks(aNumThunks) {}
+        : mFirstThunk(aFirstThunk), mNumThunks(aNumThunks) {}
 
     size_t Length() const {
       return size_t(mNumThunks) * sizeof(IMAGE_THUNK_DATA);
     }
 
     PIMAGE_THUNK_DATA mFirstThunk;
     ptrdiff_t mNumThunks;
   };
@@ -606,31 +604,29 @@ inline LauncherResult<DWORD> GetParentPr
   if (!NT_SUCCESS(status)) {
     return LAUNCHER_ERROR_FROM_NTSTATUS(status);
   }
 
   return static_cast<DWORD>(pbi.InheritedFromUniqueProcessId & 0xFFFFFFFF);
 }
 
 struct DataDirectoryEntry : public _IMAGE_DATA_DIRECTORY {
-  DataDirectoryEntry() : _IMAGE_DATA_DIRECTORY() {
-  }
+  DataDirectoryEntry() : _IMAGE_DATA_DIRECTORY() {}
 
   MOZ_IMPLICIT DataDirectoryEntry(const _IMAGE_DATA_DIRECTORY& aOther)
-    : _IMAGE_DATA_DIRECTORY(aOther) {
-  }
+      : _IMAGE_DATA_DIRECTORY(aOther) {}
 
   DataDirectoryEntry(const DataDirectoryEntry& aOther) = default;
 };
 
 inline LauncherResult<void*> GetProcessPebPtr(HANDLE aProcess) {
   ULONG returnLength;
   PROCESS_BASIC_INFORMATION pbi;
-  NTSTATUS status = ::NtQueryInformationProcess(aProcess,
-      ProcessBasicInformation, &pbi, sizeof(pbi), &returnLength);
+  NTSTATUS status = ::NtQueryInformationProcess(
+      aProcess, ProcessBasicInformation, &pbi, sizeof(pbi), &returnLength);
   if (!NT_SUCCESS(status)) {
     return LAUNCHER_ERROR_FROM_NTSTATUS(status);
   }
 
   return pbi.PebBaseAddress;
 }
 
 /**
@@ -646,34 +642,36 @@ inline LauncherResult<HMODULE> GetProces
     return LAUNCHER_ERROR_FROM_RESULT(ppeb);
   }
 
   PEB peb;
   SIZE_T bytesRead;
 
 #if defined(MOZILLA_INTERNAL_API)
   if (!::ReadProcessMemory(aProcess, ppeb.unwrap(), &peb, sizeof(peb),
-                           &bytesRead) || bytesRead != sizeof(peb)) {
+                           &bytesRead) ||
+      bytesRead != sizeof(peb)) {
     return LAUNCHER_ERROR_FROM_LAST();
   }
 #else
   NTSTATUS ntStatus = ::NtReadVirtualMemory(aProcess, ppeb.unwrap(), &peb,
                                             sizeof(peb), &bytesRead);
   if (!NT_SUCCESS(ntStatus) || bytesRead != sizeof(peb)) {
     return LAUNCHER_ERROR_FROM_NTSTATUS(ntStatus);
   }
 #endif
 
   // peb.ImageBaseAddress
   void* baseAddress = peb.Reserved3[1];
 
   char mzMagic[2];
 #if defined(MOZILLA_INTERNAL_API)
   if (!::ReadProcessMemory(aProcess, baseAddress, mzMagic, sizeof(mzMagic),
-                           &bytesRead) || bytesRead != sizeof(mzMagic)) {
+                           &bytesRead) ||
+      bytesRead != sizeof(mzMagic)) {
     return LAUNCHER_ERROR_FROM_LAST();
   }
 #else
   ntStatus = ::NtReadVirtualMemory(aProcess, baseAddress, mzMagic,
                                    sizeof(mzMagic), &bytesRead);
   if (!NT_SUCCESS(ntStatus) || bytesRead != sizeof(mzMagic)) {
     return LAUNCHER_ERROR_FROM_NTSTATUS(ntStatus);
   }
--- a/netwerk/protocol/http/HttpBaseChannel.cpp
+++ b/netwerk/protocol/http/HttpBaseChannel.cpp
@@ -3182,19 +3182,20 @@ already_AddRefed<nsILoadInfo> HttpBaseCh
         "docshell and necko should have the same userContextId attribute.");
     MOZ_ASSERT(
         docShellAttrs.mInIsolatedMozBrowser == attrs.mInIsolatedMozBrowser,
         "docshell and necko should have the same inIsolatedMozBrowser "
         "attribute.");
     MOZ_ASSERT(
         docShellAttrs.mPrivateBrowsingId == attrs.mPrivateBrowsingId,
         "docshell and necko should have the same privateBrowsingId attribute.");
-    MOZ_ASSERT(
-        docShellAttrs.mGeckoViewSessionContextId == attrs.mGeckoViewSessionContextId,
-        "docshell and necko should have the same geckoViewSessionContextId attribute");
+    MOZ_ASSERT(docShellAttrs.mGeckoViewSessionContextId ==
+                   attrs.mGeckoViewSessionContextId,
+               "docshell and necko should have the same "
+               "geckoViewSessionContextId attribute");
 
     attrs = docShellAttrs;
     attrs.SetFirstPartyDomain(true, newURI);
     newLoadInfo->SetOriginAttributes(attrs);
   }
 
   // Leave empty, we want a 'clean ground' when creating the new channel.
   // This will be ensured to be either set by the protocol handler or set
--- a/netwerk/protocol/http/nsHttpChannel.cpp
+++ b/netwerk/protocol/http/nsHttpChannel.cpp
@@ -6142,20 +6142,19 @@ NS_INTERFACE_MAP_END_INHERITING(HttpBase
 
 NS_IMETHODIMP
 nsHttpChannel::Cancel(nsresult status) {
   MOZ_ASSERT(NS_IsMainThread());
   // We should never have a pump open while a CORS preflight is in progress.
   MOZ_ASSERT_IF(mPreflightChannel, !mCachePump);
 #ifdef DEBUG
   if (UrlClassifierFeatureFactory::IsClassifierBlockingErrorCode(status)) {
-    MOZ_CRASH_UNSAFE_PRINTF(
-        "Blocking classifier error %" PRIx32
-        " need to be handled by CancelByURLClassifier()",
-        static_cast<uint32_t>(status));
+    MOZ_CRASH_UNSAFE_PRINTF("Blocking classifier error %" PRIx32
+                            " need to be handled by CancelByURLClassifier()",
+                            static_cast<uint32_t>(status));
   }
 #endif
 
   LOG(("nsHttpChannel::Cancel [this=%p status=%" PRIx32 "]\n", this,
        static_cast<uint32_t>(status)));
   if (mCanceled) {
     LOG(("  ignoring; already canceled\n"));
     return NS_OK;
@@ -6227,18 +6226,17 @@ nsHttpChannel::CancelByURLClassifier(nsr
 
 void nsHttpChannel::ContinueCancellingByURLClassifier(nsresult aErrorCode) {
   MOZ_ASSERT(
       UrlClassifierFeatureFactory::IsClassifierBlockingErrorCode(aErrorCode));
   MOZ_ASSERT(NS_IsMainThread());
   // We should never have a pump open while a CORS preflight is in progress.
   MOZ_ASSERT_IF(mPreflightChannel, !mCachePump);
 
-  LOG(("nsHttpChannel::ContinueCancellingByURLClassifier [this=%p]\n",
-       this));
+  LOG(("nsHttpChannel::ContinueCancellingByURLClassifier [this=%p]\n", this));
   if (mCanceled) {
     LOG(("  ignoring; already canceled\n"));
     return;
   }
 
   // Check to see if we should redirect this channel elsewhere by
   // nsIHttpChannel.redirectTo API request
   if (mAPIRedirectToURI) {
--- a/netwerk/protocol/http/nsHttpConnection.cpp
+++ b/netwerk/protocol/http/nsHttpConnection.cpp
@@ -116,17 +116,17 @@ nsHttpConnection::nsHttpConnection()
 
   // the default timeout is for when this connection has not yet processed a
   // transaction
   static const PRIntervalTime k5Sec = PR_SecondsToInterval(5);
   mIdleTimeout = (k5Sec < gHttpHandler->IdleTimeout())
                      ? k5Sec
                      : gHttpHandler->IdleTimeout();
 
- mThroughCaptivePortal = gHttpHandler->GetThroughCaptivePortal();
+  mThroughCaptivePortal = gHttpHandler->GetThroughCaptivePortal();
 }
 
 nsHttpConnection::~nsHttpConnection() {
   LOG(("Destroying nsHttpConnection @%p\n", this));
 
   if (!mEverUsedSpdy) {
     LOG(("nsHttpConnection %p performed %d HTTP/1.x transactions\n", this,
          mHttp1xTransactionCount));
@@ -153,21 +153,22 @@ nsHttpConnection::~nsHttpConnection() {
          totalKBRead, mEverUsedSpdy));
     Telemetry::Accumulate(mEverUsedSpdy ? Telemetry::SPDY_KBREAD_PER_CONN2
                                         : Telemetry::HTTP_KBREAD_PER_CONN2,
                           totalKBRead);
   }
 
   if (mThroughCaptivePortal) {
     if (mTotalBytesRead || mTotalBytesWritten) {
-      auto total = Clamp<uint32_t>(
-          (mTotalBytesRead >> 10) + (mTotalBytesWritten >> 10), 0,
-          std::numeric_limits<uint32_t>::max());
+      auto total =
+          Clamp<uint32_t>((mTotalBytesRead >> 10) + (mTotalBytesWritten >> 10),
+                          0, std::numeric_limits<uint32_t>::max());
       Telemetry::ScalarAdd(
-          Telemetry::ScalarID::NETWORKING_DATA_TRANSFERRED_CAPTIVE_PORTAL, total);
+          Telemetry::ScalarID::NETWORKING_DATA_TRANSFERRED_CAPTIVE_PORTAL,
+          total);
     }
 
     Telemetry::ScalarAdd(
         Telemetry::ScalarID::NETWORKING_HTTP_CONNECTIONS_CAPTIVE_PORTAL, 1);
   }
 
   if (mForceSendTimer) {
     mForceSendTimer->Cancel();
--- a/netwerk/protocol/http/nsHttpHandler.h
+++ b/netwerk/protocol/http/nsHttpHandler.h
@@ -418,16 +418,17 @@ class nsHttpHandler final : public nsIHt
   void SetLastActiveTabLoadOptimizationHit(TimeStamp const &when);
   bool IsBeforeLastActiveTabLoadOptimization(TimeStamp const &when);
 
   bool DumpHpackTables() { return mDumpHpackTables; }
 
   HttpTrafficAnalyzer *GetHttpTrafficAnalyzer();
 
   bool GetThroughCaptivePortal() { return mThroughCaptivePortal; }
+
  private:
   nsHttpHandler();
 
   virtual ~nsHttpHandler();
 
   MOZ_MUST_USE nsresult Init();
 
   //
--- a/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
+++ b/netwerk/url-classifier/UrlClassifierFeatureFingerprintingProtection.cpp
@@ -169,18 +169,17 @@ UrlClassifierFeatureFingerprintingProtec
   UC_LOG(
       ("UrlClassifierFeatureFingerprintingProtection::ProcessChannel, "
        "cancelling "
        "channel[%p]",
        aChannel));
   nsCOMPtr<nsIHttpChannelInternal> httpChannel = do_QueryInterface(aChannel);
 
   if (httpChannel) {
-    Unused << httpChannel->CancelByURLClassifier(
-        NS_ERROR_FINGERPRINTING_URI);
+    Unused << httpChannel->CancelByURLClassifier(NS_ERROR_FINGERPRINTING_URI);
   } else {
     Unused << aChannel->Cancel(NS_ERROR_FINGERPRINTING_URI);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
+++ b/security/sandbox/win/src/sandboxbroker/sandboxBroker.cpp
@@ -287,32 +287,33 @@ bool SandboxBroker::LaunchApp(const wcha
       moduleHandle.own(ourExe);
       // We can assign ourExe to realBase because the child process's binary is
       // the same as ours; ASLR will map it to the same address.
       realBase = ourExe;
     }
   } else {
     // Load the child executable as a datafile so that we can examine its
     // headers without doing a full load with dependencies and such.
-    moduleHandle.own(::LoadLibraryExW(aPath, nullptr, LOAD_LIBRARY_AS_DATAFILE));
+    moduleHandle.own(
+        ::LoadLibraryExW(aPath, nullptr, LOAD_LIBRARY_AS_DATAFILE));
     LauncherResult<HMODULE> procExeModule =
-      nt::GetProcessExeModule(targetInfo.hProcess);
+        nt::GetProcessExeModule(targetInfo.hProcess);
     if (procExeModule.isOk()) {
       realBase = procExeModule.unwrap();
     } else {
       LOG_E("nt::GetProcessExeModule failed with HRESULT 0x%08lX",
             procExeModule.unwrapErr().AsHResult());
     }
   }
 
   if (moduleHandle && realBase) {
     nt::PEHeaders exeImage(moduleHandle.get());
     if (!!exeImage) {
-      LauncherVoidResult importsRestored =
-        RestoreImportDirectory(aPath, exeImage, targetInfo.hProcess, realBase);
+      LauncherVoidResult importsRestored = RestoreImportDirectory(
+          aPath, exeImage, targetInfo.hProcess, realBase);
       if (importsRestored.isErr()) {
         LOG_E("Failed to restore import directory with HRESULT 0x%08lX",
               importsRestored.unwrapErr().AsHResult());
         TerminateProcess(targetInfo.hProcess, 1);
         CloseHandle(targetInfo.hThread);
         CloseHandle(targetInfo.hProcess);
         return false;
       }
--- a/testing/mochitest/ssltunnel/ssltunnel.cpp
+++ b/testing/mochitest/ssltunnel/ssltunnel.cpp
@@ -1083,17 +1083,18 @@ int processConfigLine(char* configLine) 
     int port = atoi(serverportstring);
     if (port <= 0) {
       LOG_ERROR(("Invalid port specified: %s\n", serverportstring));
       return 1;
     }
 
     if (server_info_t* existingServer = findServerInfo(port)) {
       if (!hostportstring) {
-        LOG_ERROR(("Null hostportstring specified for hostname %s\n", hostname));
+        LOG_ERROR(
+            ("Null hostportstring specified for hostname %s\n", hostname));
         return 1;
       }
       char* certnick_copy = new char[strlen(certnick) + 1];
       char* hostname_copy =
           new char[strlen(hostname) + strlen(hostportstring) + 2];
 
       strcpy(hostname_copy, hostname);
       strcat(hostname_copy, ":");
--- a/toolkit/profile/nsToolkitProfileService.cpp
+++ b/toolkit/profile/nsToolkitProfileService.cpp
@@ -583,19 +583,18 @@ nsresult nsToolkitProfileService::MaybeM
   // Once XPCOM is available check if this is the default application and if so
   // lock the profile again.
   mMaybeLockProfile = true;
   *aResult = true;
 
   return NS_OK;
 }
 
-bool
-IsFileOutdated(nsIFile* aFile, bool aExists, PRTime aLastModified,
-               int64_t aLastSize) {
+bool IsFileOutdated(nsIFile* aFile, bool aExists, PRTime aLastModified,
+                    int64_t aLastSize) {
   nsCOMPtr<nsIFile> file;
   nsresult rv = aFile->Clone(getter_AddRefs(file));
   if (NS_FAILED(rv)) {
     return false;
   }
 
   bool exists;
   rv = aFile->Exists(&exists);
@@ -617,19 +616,18 @@ IsFileOutdated(nsIFile* aFile, bool aExi
   rv = aFile->GetLastModifiedTime(&time);
   if (NS_FAILED(rv) || time != aLastModified) {
     return true;
   }
 
   return false;
 }
 
-nsresult
-UpdateFileStats(nsIFile* aFile, bool* aExists, PRTime* aLastModified,
-                int64_t* aLastSize) {
+nsresult UpdateFileStats(nsIFile* aFile, bool* aExists, PRTime* aLastModified,
+                         int64_t* aLastSize) {
   nsCOMPtr<nsIFile> file;
   nsresult rv = aFile->Clone(getter_AddRefs(file));
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = file->Exists(aExists);
   NS_ENSURE_SUCCESS(rv, rv);
 
   if (!(*aExists)) {
@@ -643,17 +641,17 @@ UpdateFileStats(nsIFile* aFile, bool* aE
 
   rv = file->GetLastModifiedTime(aLastModified);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
-nsToolkitProfileService::GetIsListOutdated(bool *aResult) {
+nsToolkitProfileService::GetIsListOutdated(bool* aResult) {
   if (IsFileOutdated(mProfileDBFile, mProfileDBExists, mProfileDBModifiedTime,
                      mProfileDBFileSize)) {
     *aResult = true;
     return NS_OK;
   }
 
   if (IsFileOutdated(mInstallDBFile, mInstallDBExists, mInstallDBModifiedTime,
                      mInstallDBFileSize)) {
@@ -1867,17 +1865,17 @@ nsToolkitProfileService::Flush() {
       if (fwrite(data.get(), sizeof(char), length, writeFile) != length) {
         fclose(writeFile);
         return NS_ERROR_UNEXPECTED;
       }
 
       fclose(writeFile);
 
       rv = UpdateFileStats(mInstallDBFile, &mInstallDBExists,
-                          &mInstallDBModifiedTime, &mInstallDBFileSize);
+                           &mInstallDBModifiedTime, &mInstallDBFileSize);
       NS_ENSURE_SUCCESS(rv, rv);
     } else {
       rv = mInstallDBFile->Remove(false);
       if (NS_FAILED(rv) && rv != NS_ERROR_FILE_TARGET_DOES_NOT_EXIST &&
           rv != NS_ERROR_FILE_NOT_FOUND) {
         return rv;
       }
       mInstallDBExists = false;
--- a/toolkit/xre/Bootstrap.h
+++ b/toolkit/xre/Bootstrap.h
@@ -144,18 +144,17 @@ enum class LibLoadingStrategy {
 typedef void (*GetBootstrapType)(Bootstrap::UniquePtr&);
 Bootstrap::UniquePtr GetBootstrap(
     const char* aXPCOMFile = nullptr,
     LibLoadingStrategy aLibLoadingStrategy = LibLoadingStrategy::NoReadAhead);
 #else
 extern "C" NS_EXPORT void NS_FROZENCALL
 XRE_GetBootstrap(Bootstrap::UniquePtr& b);
 
-inline Bootstrap::UniquePtr GetBootstrap(
-    const char* aXPCOMFile = nullptr) {
+inline Bootstrap::UniquePtr GetBootstrap(const char* aXPCOMFile = nullptr) {
   Bootstrap::UniquePtr bootstrap;
   XRE_GetBootstrap(bootstrap);
   return bootstrap;
 }
 #endif
 
 }  // namespace mozilla
 
--- a/toolkit/xre/LauncherResult.h
+++ b/toolkit/xre/LauncherResult.h
@@ -61,18 +61,17 @@ using LauncherVoidResult = LauncherResul
     ::mozilla::Err(::mozilla::WindowsError::FromLastError())
 
 #  define LAUNCHER_ERROR_FROM_NTSTATUS(ntstatus) \
     ::mozilla::Err(::mozilla::WindowsError::FromNtStatus(ntstatus))
 
 #  define LAUNCHER_ERROR_FROM_HRESULT(hresult) \
     ::mozilla::Err(::mozilla::WindowsError::FromHResult(hresult))
 
-#  define LAUNCHER_ERROR_FROM_MOZ_WINDOWS_ERROR(err) \
-    ::mozilla::Err(err)
+#  define LAUNCHER_ERROR_FROM_MOZ_WINDOWS_ERROR(err) ::mozilla::Err(err)
 
 #else
 
 #  define LAUNCHER_ERROR_GENERIC()           \
     ::mozilla::Err(::mozilla::LauncherError( \
         __FILE__, __LINE__, ::mozilla::WindowsError::CreateGeneric()))
 
 #  define LAUNCHER_ERROR_FROM_WIN32(err)     \
--- a/xpcom/glue/FileUtils.cpp
+++ b/xpcom/glue/FileUtils.cpp
@@ -353,43 +353,43 @@ void mozilla::ReadAhead(mozilla::filedes
 #endif
 }
 
 void mozilla::ReadAheadLib(mozilla::pathstr_t aFilePath) {
   if (!aFilePath) {
     return;
   }
 #if defined(XP_WIN)
-  nsAutoHandle fd(CreateFileW(aFilePath, GENERIC_READ,
-                              FILE_SHARE_READ, nullptr, OPEN_EXISTING,
-                              FILE_FLAG_SEQUENTIAL_SCAN, nullptr));
+  nsAutoHandle fd(CreateFileW(aFilePath, GENERIC_READ, FILE_SHARE_READ, nullptr,
+                              OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN,
+                              nullptr));
   if (!fd) {
     return;
   }
   LARGE_INTEGER fileSize = {};
   BOOL success = GetFileSizeEx(fd, &fileSize);
   if (!success || !fileSize.QuadPart ||
       fileSize.QuadPart > std::numeric_limits<size_t>::max()) {
     return;
   }
 
-  nsAutoHandle mapping(CreateFileMapping(fd, nullptr,
-                                         SEC_IMAGE | PAGE_READONLY,
-                                         0, 0, nullptr));
+  nsAutoHandle mapping(
+      CreateFileMapping(fd, nullptr, SEC_IMAGE | PAGE_READONLY, 0, 0, nullptr));
 
   if (!mapping) {
     return;
   }
 
-  PVOID data = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, (size_t)fileSize.QuadPart);
+  PVOID data =
+      MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, (size_t)fileSize.QuadPart);
   auto guard = MakeScopeExit([=]() { UnmapViewOfFile(data); });
 
   if (data && !MaybePrefetchMemory((uint8_t*)data, (size_t)fileSize.QuadPart)) {
     volatile uint8_t read = 0;
-    for(size_t i = 0; i < (size_t)fileSize.QuadPart; i += 4096) {
+    for (size_t i = 0; i < (size_t)fileSize.QuadPart; i += 4096) {
       read += ((uint8_t*)data)[i];
     }
   }
 
 #elif defined(LINUX) && !defined(ANDROID)
   int fd = open(aFilePath, O_RDONLY);
   if (fd < 0) {
     return;