No bug. Reformat js/** to fix accumulated divergences.
authorSteve Fink <sfink@mozilla.com>
Fri, 24 May 2019 11:57:18 -0700
changeset 475420 5eb6bcb8b9e484c5a169e9f7f663d1826d828615
parent 475419 f9699ae30f4d5256b6af7c8493e84984aadb4568
child 475421 5d3e1ea7769357bce7297b83be3863034bcf656e
push id36061
push usercbrindusan@mozilla.com
push dateFri, 24 May 2019 21:49:59 +0000
treeherdermozilla-central@5d3e1ea77693 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone69.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
No bug. Reformat js/** to fix accumulated divergences. # ignore-this-changeset
js/public/AllocPolicy.h
js/public/RootingAPI.h
js/public/experimental/SourceHook.h
js/rust/src/jsglue.cpp
js/src/builtin/AtomicsObject.cpp
js/src/builtin/ModuleObject.cpp
js/src/builtin/ReflectParse.cpp
js/src/builtin/Stream.cpp
js/src/frontend/BinASTParser.cpp
js/src/frontend/BinASTParserPerTokenizer.cpp
js/src/frontend/BytecodeSection.h
js/src/frontend/FunctionEmitter.cpp
js/src/frontend/ParseContext.cpp
js/src/frontend/ParseContext.h
js/src/frontend/SharedContext.cpp
js/src/frontend/SharedContext.h
js/src/gc/Barrier.h
js/src/gc/FreeOp-inl.h
js/src/gc/GC-inl.h
js/src/gc/GC.cpp
js/src/gc/GCEnum.h
js/src/gc/Marking.cpp
js/src/gc/NurseryAwareHashMap.h
js/src/gc/PrivateIterators-inl.h
js/src/gc/Scheduling.h
js/src/gc/Tracer.h
js/src/gc/Verifier.h
js/src/gc/Zone.cpp
js/src/gc/Zone.h
js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h
js/src/jsapi-tests/testGCGrayMarking.cpp
js/src/jsapi-tests/testScriptObject.cpp
js/src/vm/ArrayBufferObject.cpp
js/src/vm/AtomsTable.h
js/src/vm/CompilationAndEvaluation.cpp
js/src/vm/Debugger-inl.h
js/src/vm/EnvironmentObject.cpp
js/src/vm/EnvironmentObject.h
js/src/vm/GeneratorObject.h
js/src/vm/JSScript.h
js/src/vm/Runtime.h
js/src/vm/SavedFrame.h
js/src/vm/SavedStacks.cpp
js/src/vm/Shape.h
js/src/vm/StringType-inl.h
js/src/vm/StringType.cpp
js/src/wasm/AsmJS.cpp
js/src/wasm/WasmJS.h
js/src/wasm/WasmTable.h
js/xpconnect/src/XPCJSRuntime.cpp
--- a/js/public/AllocPolicy.h
+++ b/js/public/AllocPolicy.h
@@ -30,29 +30,31 @@ class AllocPolicyBase {
   T* maybe_pod_arena_malloc(arena_id_t arenaId, size_t numElems) {
     return js_pod_arena_malloc<T>(arenaId, numElems);
   }
   template <typename T>
   T* maybe_pod_arena_calloc(arena_id_t arenaId, size_t numElems) {
     return js_pod_arena_calloc<T>(arenaId, numElems);
   }
   template <typename T>
-  T* maybe_pod_arena_realloc(arena_id_t arenaId, T* p, size_t oldSize, size_t newSize) {
+  T* maybe_pod_arena_realloc(arena_id_t arenaId, T* p, size_t oldSize,
+                             size_t newSize) {
     return js_pod_arena_realloc<T>(arenaId, p, oldSize, newSize);
   }
   template <typename T>
   T* pod_arena_malloc(arena_id_t arenaId, size_t numElems) {
     return maybe_pod_arena_malloc<T>(arenaId, numElems);
   }
   template <typename T>
   T* pod_arena_calloc(arena_id_t arenaId, size_t numElems) {
     return maybe_pod_arena_calloc<T>(arenaId, numElems);
   }
   template <typename T>
-  T* pod_arena_realloc(arena_id_t arenaId, T* p, size_t oldSize, size_t newSize) {
+  T* pod_arena_realloc(arena_id_t arenaId, T* p, size_t oldSize,
+                       size_t newSize) {
     return maybe_pod_arena_realloc<T>(arenaId, p, oldSize, newSize);
   }
 
   template <typename T>
   T* maybe_pod_malloc(size_t numElems) {
     return maybe_pod_arena_malloc<T>(js::MallocArena, numElems);
   }
   template <typename T>
@@ -138,17 +140,18 @@ class TempAllocPolicy : public AllocPoli
     T* p = this->maybe_pod_arena_calloc<T>(arenaId, numElems);
     if (MOZ_UNLIKELY(!p)) {
       p = onOutOfMemoryTyped<T>(arenaId, AllocFunction::Calloc, numElems);
     }
     return p;
   }
 
   template <typename T>
-  T* pod_arena_realloc(arena_id_t arenaId, T* prior, size_t oldSize, size_t newSize) {
+  T* pod_arena_realloc(arena_id_t arenaId, T* prior, size_t oldSize,
+                       size_t newSize) {
     T* p2 = this->maybe_pod_arena_realloc<T>(arenaId, prior, oldSize, newSize);
     if (MOZ_UNLIKELY(!p2)) {
       p2 = onOutOfMemoryTyped<T>(arenaId, AllocFunction::Realloc, newSize,
                                  prior);
     }
     return p2;
   }
 
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -1025,22 +1025,23 @@ class MOZ_RAII Rooted : public js::Roote
 
   // Dummy type to distinguish these constructors from Rooted(cx, initial)
   struct CtorDispatcher {};
 
   // Normal case: construct an empty Rooted holding a safely initialized but
   // empty T.
   template <typename RootingContext>
   Rooted(const RootingContext& cx, CtorDispatcher, detail::FallbackOverload)
-    : Rooted(cx, SafelyInitialized<T>()) {}
+      : Rooted(cx, SafelyInitialized<T>()) {}
 
   // If T can be constructed with a cx, then define another constructor for it
   // that will be preferred.
   template <typename RootingContext,
-            typename = typename std::enable_if<std::is_constructible<T, RootingContext>::value>::type>
+            typename = typename std::enable_if<
+                std::is_constructible<T, RootingContext>::value>::type>
   Rooted(const RootingContext& cx, CtorDispatcher, detail::PreferredOverload)
       : Rooted(cx, T(cx)) {}
 
  public:
   using ElementType = T;
 
   // Construct an empty Rooted. Delegates to an internal constructor that
   // chooses a specific meaning of "empty" depending on whether T can be
--- a/js/public/experimental/SourceHook.h
+++ b/js/public/experimental/SourceHook.h
@@ -89,11 +89,11 @@ class SourceHook {
  */
 extern JS_FRIEND_API void SetSourceHook(JSContext* cx,
                                         mozilla::UniquePtr<SourceHook> hook);
 
 /** Remove |cx|'s source hook, and return it. The caller now owns the hook. */
 extern JS_FRIEND_API mozilla::UniquePtr<SourceHook> ForgetSourceHook(
     JSContext* cx);
 
-} // namespace js
+}  // namespace js
 
-#endif // js_experimental_SourceHook_h
+#endif  // js_experimental_SourceHook_h
--- a/js/rust/src/jsglue.cpp
+++ b/js/rust/src/jsglue.cpp
@@ -549,35 +549,33 @@ bool AppendToRootedIdVector(JS::Persiste
 const jsid* SliceRootedIdVector(const JS::PersistentRootedIdVector* v,
                                 size_t* length) {
   *length = v->length();
   return v->begin();
 }
 
 void DestroyRootedIdVector(JS::PersistentRootedIdVector* v) { delete v; }
 
-JS::MutableHandleIdVector GetMutableHandleIdVector(JS::PersistentRootedIdVector* v) {
+JS::MutableHandleIdVector GetMutableHandleIdVector(
+    JS::PersistentRootedIdVector* v) {
   return JS::MutableHandleIdVector(v);
 }
 
-JS::PersistentRootedObjectVector* CreateRootedObjectVector(
-    JSContext* aCx) {
+JS::PersistentRootedObjectVector* CreateRootedObjectVector(JSContext* aCx) {
   JS::PersistentRootedObjectVector* vec =
       new JS::PersistentRootedObjectVector(aCx);
   return vec;
 }
 
 bool AppendToRootedObjectVector(JS::PersistentRootedObjectVector* v,
-                                          JSObject* obj) {
+                                JSObject* obj) {
   return v->append(obj);
 }
 
-void DeleteRootedObjectVector(JS::PersistentRootedObjectVector* v) {
-  delete v;
-}
+void DeleteRootedObjectVector(JS::PersistentRootedObjectVector* v) { delete v; }
 
 #if defined(__linux__)
 #  include <malloc.h>
 #elif defined(__APPLE__)
 #  include <malloc/malloc.h>
 #elif defined(__MINGW32__) || defined(__MINGW64__)
 // nothing needed here
 #elif defined(_MSC_VER)
--- a/js/src/builtin/AtomicsObject.cpp
+++ b/js/src/builtin/AtomicsObject.cpp
@@ -157,17 +157,17 @@ struct ArrayOps<int64_t> {
     BigInt* bi = ToBigInt(cx, v);
     if (!bi) {
       return cx->alreadyReportedError();
     }
     return BigInt::toInt64(bi);
   }
 
   static JS::Result<int64_t> convertValue(JSContext* cx, HandleValue v,
-                                           MutableHandleValue result) {
+                                          MutableHandleValue result) {
     BigInt* bi = ToBigInt(cx, v);
     if (!bi) {
       return cx->alreadyReportedError();
     }
     result.setBigInt(bi);
     return BigInt::toInt64(bi);
   }
 
@@ -188,17 +188,17 @@ struct ArrayOps<uint64_t> {
     BigInt* bi = ToBigInt(cx, v);
     if (!bi) {
       return cx->alreadyReportedError();
     }
     return BigInt::toUint64(bi);
   }
 
   static JS::Result<uint64_t> convertValue(JSContext* cx, HandleValue v,
-                                            MutableHandleValue result) {
+                                           MutableHandleValue result) {
     BigInt* bi = ToBigInt(cx, v);
     if (!bi) {
       return cx->alreadyReportedError();
     }
     result.setBigInt(bi);
     return BigInt::toUint64(bi);
   }
 
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -1052,19 +1052,18 @@ bool ModuleObject::execute(JSContext* cx
   }
 #endif
 
   RootedScript script(cx, self->script());
 
   // The top-level script if a module is only ever executed once. Clear the
   // reference at exit to prevent us keeping this alive unnecessarily. This is
   // kept while executing so it is available to the debugger.
-  auto guardA = mozilla::MakeScopeExit([&] {
-      self->setReservedSlot(ScriptSlot, UndefinedValue());
-    });
+  auto guardA = mozilla::MakeScopeExit(
+      [&] { self->setReservedSlot(ScriptSlot, UndefinedValue()); });
 
   RootedModuleEnvironmentObject scope(cx, self->environment());
   if (!scope) {
     JS_ReportErrorASCII(cx,
                         "Module declarations have not yet been instantiated");
     return false;
   }
 
--- a/js/src/builtin/ReflectParse.cpp
+++ b/js/src/builtin/ReflectParse.cpp
@@ -2645,18 +2645,18 @@ bool ASTSerializer::rightAssociate(ListN
 bool ASTSerializer::expression(ParseNode* pn, MutableHandleValue dst) {
   if (!CheckRecursionLimit(cx)) {
     return false;
   }
 
   switch (pn->getKind()) {
     case ParseNodeKind::Function: {
       FunctionNode* funNode = &pn->as<FunctionNode>();
-      ASTType type = funNode->funbox()->isArrow() ? AST_ARROW_EXPR
-                                                              : AST_FUNC_EXPR;
+      ASTType type =
+          funNode->funbox()->isArrow() ? AST_ARROW_EXPR : AST_FUNC_EXPR;
       return function(funNode, type, dst);
     }
 
     case ParseNodeKind::CommaExpr: {
       NodeVector exprs(cx);
       return expressions(&pn->as<ListNode>(), exprs) &&
              builder.sequenceExpression(exprs, &pn->pn_pos, dst);
     }
@@ -3139,19 +3139,19 @@ bool ASTSerializer::property(ParseNode* 
     kind = PROP_INIT;
   }
 
   BinaryNode* node = &pn->as<BinaryNode>();
   ParseNode* keyNode = node->left();
   ParseNode* valNode = node->right();
 
   bool isShorthand = node->isKind(ParseNodeKind::Shorthand);
-  bool isMethod = valNode->is<FunctionNode>() &&
-                  valNode->as<FunctionNode>().funbox()->kind() ==
-                      JSFunction::Method;
+  bool isMethod =
+      valNode->is<FunctionNode>() &&
+      valNode->as<FunctionNode>().funbox()->kind() == JSFunction::Method;
   RootedValue key(cx), val(cx);
   return propertyName(keyNode, &key) && expression(valNode, &val) &&
          builder.propertyInitializer(key, val, kind, isShorthand, isMethod,
                                      &node->pn_pos, dst);
 }
 
 bool ASTSerializer::literal(ParseNode* pn, MutableHandleValue dst) {
   RootedValue val(cx);
--- a/js/src/builtin/Stream.cpp
+++ b/js/src/builtin/Stream.cpp
@@ -3479,19 +3479,17 @@ class MOZ_RAII AutoClearUnderlyingSource
 
   ~AutoClearUnderlyingSource() {
     if (controller_) {
       ReadableStreamController::clearUnderlyingSource(
           controller_, /* finalizeSource */ false);
     }
   }
 
-  void reset() {
-    controller_ = nullptr;
-  }
+  void reset() { controller_ = nullptr; }
 };
 
 /**
  * Version of SetUpReadableByteStreamController that's specialized for handling
  * external, embedding-provided, underlying sources.
  */
 static MOZ_MUST_USE bool SetUpExternalReadableByteStreamController(
     JSContext* cx, Handle<ReadableStream*> stream,
--- a/js/src/frontend/BinASTParser.cpp
+++ b/js/src/frontend/BinASTParser.cpp
@@ -3222,18 +3222,17 @@ JS::Result<Ok> BinASTParser<Tok>::parseI
   MOZ_TRY(tokenizer_->checkFields(kind, fields, expected_fields));
 #endif  // defined(DEBUG)
 
   BINJS_MOZ_TRY_DECL(isFunctionNameCaptured,
                      tokenizer_->readBool(fieldContext++));
   // Per spec, isFunctionNameCaptured can be true for anonymous
   // function.  Check isFunctionNameCaptured only for named
   // function.
-  if (pc_->functionBox()->isNamedLambda() &&
-      isFunctionNameCaptured) {
+  if (pc_->functionBox()->isNamedLambda() && isFunctionNameCaptured) {
     captureFunctionName();
   }
   BINJS_MOZ_TRY_DECL(isThisCaptured, tokenizer_->readBool(fieldContext++));
   // TODO: Use this in BinASTParser::buildFunction.
   (void)isThisCaptured;
   Rooted<GCVector<JSAtom*>> positionalParams(cx_, GCVector<JSAtom*>(cx_));
   MOZ_TRY(parseAssertedParameterScope(&positionalParams, fieldContext++));
 
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -270,17 +270,17 @@ JS::Result<FunctionBox*> BinASTParserPer
       cx_, traceListHead_, fun, /* toStringStart = */ 0, *directives,
       /* extraWarning = */ false, generatorKind, functionAsyncKind);
   if (!funbox) {
     return raiseOOM();
   }
 
   traceListHead_ = funbox;
   if (pc_) {
-    funbox->initWithEnclosingParseContext(pc_, fun,syntax);
+    funbox->initWithEnclosingParseContext(pc_, fun, syntax);
   } else {
     funbox->initFromLazyFunction(fun);
   }
   return funbox;
 }
 
 FunctionSyntaxKind BinASTKindToFunctionSyntaxKind(const BinASTKind kind) {
   // FIXME: this doesn't cover FunctionSyntaxKind::ClassConstructor and
--- a/js/src/frontend/BytecodeSection.h
+++ b/js/src/frontend/BytecodeSection.h
@@ -99,17 +99,16 @@ struct CGResumeOffsetList {
   Vector<uint32_t> list;
   explicit CGResumeOffsetList(JSContext* cx) : list(cx) {}
 
   MOZ_MUST_USE bool append(uint32_t offset) { return list.append(offset); }
   size_t length() const { return list.length(); }
   void finish(mozilla::Span<uint32_t> array);
 };
 
-
 static constexpr size_t MaxBytecodeLength = INT32_MAX;
 static constexpr size_t MaxSrcNotesLength = INT32_MAX;
 
 // Have a few inline elements, so as to avoid heap allocation for tiny
 // sequences.  See bug 1390526.
 typedef Vector<jsbytecode, 64> BytecodeVector;
 typedef Vector<jssrcnote, 64> SrcNotesVector;
 
--- a/js/src/frontend/FunctionEmitter.cpp
+++ b/js/src/frontend/FunctionEmitter.cpp
@@ -470,18 +470,17 @@ bool FunctionScriptEmitter::prepareForBo
   }
 
   if (funbox_->needsPromiseResult()) {
     if (!emitAsyncFunctionRejectPrologue()) {
       return false;
     }
   }
 
-  if (funbox_->kind() ==
-      JSFunction::FunctionKind::ClassConstructor) {
+  if (funbox_->kind() == JSFunction::FunctionKind::ClassConstructor) {
     if (!funbox_->isDerivedClassConstructor()) {
       if (!bce_->emitInitializeInstanceFields()) {
         //          [stack]
         return false;
       }
     }
   }
 
--- a/js/src/frontend/ParseContext.cpp
+++ b/js/src/frontend/ParseContext.cpp
@@ -291,18 +291,17 @@ bool ParseContext::init() {
 
   return true;
 }
 
 bool ParseContext::annexBAppliesToLexicalFunctionInInnermostScope(
     FunctionBox* funbox) {
   MOZ_ASSERT(!sc()->strict());
 
-  RootedPropertyName name(sc()->cx_,
-                          funbox->explicitName()->asPropertyName());
+  RootedPropertyName name(sc()->cx_, funbox->explicitName()->asPropertyName());
   Maybe<DeclarationKind> redeclaredKind = isVarRedeclaredInInnermostScope(
       name, DeclarationKind::VarForAnnexBLexicalFunction);
 
   if (!redeclaredKind && isFunctionBox()) {
     Scope& funScope = functionScope();
     if (&funScope != &varScope()) {
       // Annex B.3.3.1 disallows redeclaring parameter names. In the
       // presence of parameter expressions, parameter names are on the
--- a/js/src/frontend/ParseContext.h
+++ b/js/src/frontend/ParseContext.h
@@ -618,19 +618,18 @@ class ParseContext : public Nestable<Par
     return sc_->isFunctionBox() && sc_->asFunctionBox()->isArrow();
   }
 
   bool isMethod() const {
     return sc_->isFunctionBox() && sc_->asFunctionBox()->isMethod();
   }
 
   bool isGetterOrSetter() const {
-    return sc_->isFunctionBox() &&
-           (sc_->asFunctionBox()->isGetter() ||
-            sc_->asFunctionBox()->isSetter());
+    return sc_->isFunctionBox() && (sc_->asFunctionBox()->isGetter() ||
+                                    sc_->asFunctionBox()->isSetter());
   }
 
   uint32_t scriptId() const { return scriptId_; }
 
   bool annexBAppliesToLexicalFunctionInInnermostScope(FunctionBox* funbox);
 
   bool tryDeclareVar(HandlePropertyName name, DeclarationKind kind,
                      uint32_t beginPos,
--- a/js/src/frontend/SharedContext.cpp
+++ b/js/src/frontend/SharedContext.cpp
@@ -158,18 +158,17 @@ FunctionBox::FunctionBox(JSContext* cx, 
       hasThisBinding_(false),
       hasInnerFunctions_(false),
       isArrow_(fun->isArrow()),
       isNamedLambda_(fun->isNamedLambda()),
       isGetter_(fun->isGetter()),
       isSetter_(fun->isSetter()),
       isMethod_(fun->isMethod()),
       kind_(fun->kind()),
-      explicitName_(fun->explicitName())
-{
+      explicitName_(fun->explicitName()) {
   // Functions created at parse time may be set singleton after parsing and
   // baked into JIT code, so they must be allocated tenured. They are held by
   // the JSScript so cannot be collected during a minor GC anyway.
   MOZ_ASSERT(fun->isTenured());
 }
 
 void FunctionBox::initFromLazyFunction(JSFunction* fun) {
   if (fun->lazyScript()->isDerivedClassConstructor()) {
@@ -190,17 +189,18 @@ void FunctionBox::initStandaloneFunction
   // Standalone functions are Function or Generator constructors and are
   // always scoped to the global.
   MOZ_ASSERT(enclosingScope->is<GlobalScope>());
   enclosingScope_ = enclosingScope;
   allowNewTarget_ = true;
   thisBinding_ = ThisBinding::Function;
 }
 
-void FunctionBox::initWithEnclosingParseContext(ParseContext* enclosing, JSFunction* fun,
+void FunctionBox::initWithEnclosingParseContext(ParseContext* enclosing,
+                                                JSFunction* fun,
                                                 FunctionSyntaxKind kind) {
   SharedContext* sc = enclosing->sc();
   useAsm = sc->isFunctionBox() && sc->asFunctionBox()->useAsmOrInsideUseAsm();
 
   // Arrow functions don't have their own `this` binding.
   if (fun->isArrow()) {
     allowNewTarget_ = sc->allowNewTarget();
     allowSuperProperty_ = sc->allowSuperProperty();
--- a/js/src/frontend/SharedContext.h
+++ b/js/src/frontend/SharedContext.h
@@ -430,17 +430,18 @@ class FunctionBox : public ObjectBox, pu
     return MutableHandle<VarScope::Data*>::fromMarkedLocation(
         &extraVarScopeBindings_);
   }
 
   void initFromLazyFunction(JSFunction* fun);
   void initStandaloneFunction(Scope* enclosingScope);
   void initWithEnclosingParseContext(ParseContext* enclosing, JSFunction* fun,
                                      FunctionSyntaxKind kind);
-  void initFieldInitializer(ParseContext* enclosing, JSFunction* fun, HasHeritage hasHeritage);
+  void initFieldInitializer(ParseContext* enclosing, JSFunction* fun,
+                            HasHeritage hasHeritage);
 
   inline bool isLazyFunctionWithoutEnclosingScope() const {
     return function()->isInterpretedLazy() &&
            !function()->lazyScript()->hasEnclosingScope();
   }
   void setEnclosingScopeForInnerLazyFunction(Scope* enclosingScope);
   void finish();
 
--- a/js/src/gc/Barrier.h
+++ b/js/src/gc/Barrier.h
@@ -420,19 +420,18 @@ class MOZ_NON_MEMMOVABLE BarrieredBase {
   // instantiation. Friending to the generic template leads to a number of
   // unintended consequences, including template resolution ambiguity and a
   // circular dependency with Tracing.h.
   T* unsafeUnbarrieredForTracing() { return &value; }
 };
 
 // Base class for barriered pointer types that intercept only writes.
 template <class T>
-class WriteBarriered
-    : public BarrieredBase<T>,
-      public WrappedPtrOperations<T, WriteBarriered<T>> {
+class WriteBarriered : public BarrieredBase<T>,
+                       public WrappedPtrOperations<T, WriteBarriered<T>> {
  protected:
   using BarrieredBase<T>::value;
 
   // WriteBarriered is not directly instantiable.
   explicit WriteBarriered(const T& v) : BarrieredBase<T>(v) {}
 
  public:
   using ElementType = T;
--- a/js/src/gc/FreeOp-inl.h
+++ b/js/src/gc/FreeOp-inl.h
@@ -37,11 +37,11 @@ inline void FreeOp::freeLater(void* p) {
   // It's not safe to free this allocation immediately, so we must crash if we
   // can't append to the list.
   AutoEnterOOMUnsafeRegion oomUnsafe;
   if (!freeLaterList.append(p)) {
     oomUnsafe.crash("FreeOp::freeLater");
   }
 }
 
-} // namespace js
+}  // namespace js
 
-#endif // gc_FreeOp_inl_h
+#endif  // gc_FreeOp_inl_h
--- a/js/src/gc/GC-inl.h
+++ b/js/src/gc/GC-inl.h
@@ -105,20 +105,17 @@ class ArenaCellIter {
   ArenaCellIter()
       : firstThingOffset(0),
         thingSize(0),
         arenaAddr(nullptr),
         thing(0),
         traceKind(JS::TraceKind::Null),
         initialized(false) {}
 
-  explicit ArenaCellIter(Arena* arena)
-      : initialized(false) {
-    init(arena);
-  }
+  explicit ArenaCellIter(Arena* arena) : initialized(false) { init(arena); }
 
   void init(Arena* arena) {
     MOZ_ASSERT(!initialized);
     MOZ_ASSERT(arena);
     initialized = true;
     AllocKind kind = arena->getAllocKind();
     firstThingOffset = Arena::firstThingOffset(kind);
     thingSize = Arena::thingSize(kind);
@@ -390,19 +387,17 @@ class ZoneCellIter : protected ZoneAllCe
     if (!JS::RuntimeHeapIsCollecting(rt->heapState())) {
       JS::TraceKind traceKind = JS::MapTypeToTraceKind<T>::kind;
       ExposeGCThingToActiveJS(JS::GCCellPtr(cell, traceKind));
     }
 
     return cell;
   }
 
-  T* get() const {
-    return reinterpret_cast<T*>(getCell());
-  }
+  T* get() const { return reinterpret_cast<T*>(getCell()); }
 
   TenuredCell* unbarrieredGetCell() const { return Base::getCell(); }
   T* unbarrieredGet() const { return Base::get(); }
   operator T*() const { return get(); }
   T* operator->() const { return get(); }
 
  private:
   void skipDying() {
--- a/js/src/gc/GC.cpp
+++ b/js/src/gc/GC.cpp
@@ -632,17 +632,18 @@ inline size_t Arena::finalize(FreeOp* fo
 }
 
 // Finalize arenas from src list, releasing empty arenas if keepArenas wasn't
 // specified and inserting the others into the appropriate destination size
 // bins.
 template <typename T>
 static inline bool FinalizeTypedArenas(FreeOp* fop, Arena** src,
                                        SortedArenaList& dest,
-                                       AllocKind thingKind, SliceBudget& budget) {
+                                       AllocKind thingKind,
+                                       SliceBudget& budget) {
   // When operating in the foreground, take the lock at the top.
   Maybe<AutoLockGC> maybeLock;
   if (fop->onMainThread()) {
     maybeLock.emplace(fop->runtime());
   }
 
   size_t thingSize = Arena::thingSize(thingKind);
   size_t thingsPerArena = Arena::thingsPerArena(thingKind);
--- a/js/src/gc/GCEnum.h
+++ b/js/src/gc/GCEnum.h
@@ -8,17 +8,17 @@
  * GC-internal enum definitions.
  */
 
 #ifndef gc_GCEnum_h
 #define gc_GCEnum_h
 
 #include <stdint.h>
 
-#include "js/MemoryFunctions.h" // JS_FOR_EACH_PUBLIC_MEMORY_USE
+#include "js/MemoryFunctions.h"  // JS_FOR_EACH_PUBLIC_MEMORY_USE
 
 namespace js {
 namespace gc {
 
 // Mark colors. Order is important here: the greater value the 'more marked' a
 // cell is.
 enum class MarkColor : uint8_t { Gray = 1, Black = 2 };
 
@@ -86,22 +86,22 @@ enum class ZealMode {
   JS_FOR_EACH_ZEAL_MODE(ZEAL_MODE)
 #undef ZEAL_MODE
       Count,
   Limit = Count - 1
 };
 
 } /* namespace gc */
 
-#define JS_FOR_EACH_INTERNAL_MEMORY_USE(_)      \
-  _(ArrayBufferContents)                        \
+#define JS_FOR_EACH_INTERNAL_MEMORY_USE(_) \
+  _(ArrayBufferContents)                   \
   _(StringContents)
 
-#define JS_FOR_EACH_MEMORY_USE(_)               \
-  JS_FOR_EACH_PUBLIC_MEMORY_USE(_)              \
+#define JS_FOR_EACH_MEMORY_USE(_)  \
+  JS_FOR_EACH_PUBLIC_MEMORY_USE(_) \
   JS_FOR_EACH_INTERNAL_MEMORY_USE(_)
 
 enum class MemoryUse : uint8_t {
 #define DEFINE_MEMORY_USE(Name) Name,
   JS_FOR_EACH_MEMORY_USE(DEFINE_MEMORY_USE)
 #undef DEFINE_MEMORY_USE
 };
 
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -436,19 +436,19 @@ JS_PUBLIC_API void JS::UnsafeTraceRoot(J
       JSTracer*, type*, const char*);
 FOR_EACH_PUBLIC_GC_POINTER_TYPE(INSTANTIATE_PUBLIC_TRACE_FUNCTIONS)
 FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE(INSTANTIATE_PUBLIC_TRACE_FUNCTIONS)
 #undef INSTANTIATE_PUBLIC_TRACE_FUNCTIONS
 
 namespace js {
 namespace gc {
 
-#define INSTANTIATE_INTERNAL_TRACE_FUNCTIONS(type)                          \
-  template void TraceEdgeInternal<type>(JSTracer*, type*, const char*);     \
-  template void TraceRangeInternal<type>(JSTracer*, size_t len, type*,      \
+#define INSTANTIATE_INTERNAL_TRACE_FUNCTIONS(type)                      \
+  template void TraceEdgeInternal<type>(JSTracer*, type*, const char*); \
+  template void TraceRangeInternal<type>(JSTracer*, size_t len, type*,  \
                                          const char*);
 
 #define INSTANTIATE_INTERNAL_TRACE_FUNCTIONS_FROM_TRACEKIND(_1, type, _2, _3) \
   INSTANTIATE_INTERNAL_TRACE_FUNCTIONS(type*)
 
 JS_FOR_EACH_TRACEKIND(INSTANTIATE_INTERNAL_TRACE_FUNCTIONS_FROM_TRACEKIND)
 FOR_EACH_PUBLIC_TAGGED_GC_POINTER_TYPE(INSTANTIATE_INTERNAL_TRACE_FUNCTIONS)
 
@@ -733,20 +733,20 @@ JS_PUBLIC_API void js::gc::PerformIncrem
   Zone* zone = cell->zone();
   MOZ_ASSERT(zone->needsIncrementalBarrier());
 
   // Skip disptaching on known tracer type.
   GCMarker* gcmarker = GCMarker::fromTracer(zone->barrierTracer());
 
   // Mark the argument, as DoMarking above.
   ApplyGCThingTyped(thing, [gcmarker](auto thing) {
-                             MOZ_ASSERT(ShouldMark(gcmarker, thing));
-                             CheckTracedThing(gcmarker, thing);
-                             gcmarker->traverse(thing);
-                           });
+    MOZ_ASSERT(ShouldMark(gcmarker, thing));
+    CheckTracedThing(gcmarker, thing);
+    gcmarker->traverse(thing);
+  });
 }
 
 // The simplest traversal calls out to the fully generic traceChildren function
 // to visit the child edges. In the absence of other traversal mechanisms, this
 // function will rapidly grow the stack past its bounds and crash the process.
 // Thus, this generic tracing should only be used in cases where subsequent
 // tracing will not recurse.
 template <typename T>
--- a/js/src/gc/NurseryAwareHashMap.h
+++ b/js/src/gc/NurseryAwareHashMap.h
@@ -17,18 +17,17 @@ namespace js {
 
 namespace detail {
 // This class only handles the incremental case and does not deal with nursery
 // pointers. The only users should be for NurseryAwareHashMap; it is defined
 // externally because we need a GCPolicy for its use in the contained map.
 template <typename T>
 class UnsafeBareWeakHeapPtr : public ReadBarriered<T> {
  public:
-  UnsafeBareWeakHeapPtr()
-      : ReadBarriered<T>(JS::SafelyInitialized<T>()) {}
+  UnsafeBareWeakHeapPtr() : ReadBarriered<T>(JS::SafelyInitialized<T>()) {}
   MOZ_IMPLICIT UnsafeBareWeakHeapPtr(const T& v) : ReadBarriered<T>(v) {}
   explicit UnsafeBareWeakHeapPtr(const UnsafeBareWeakHeapPtr& v)
       : ReadBarriered<T>(v) {}
   UnsafeBareWeakHeapPtr(UnsafeBareWeakHeapPtr&& v)
       : ReadBarriered<T>(std::move(v)) {}
 
   UnsafeBareWeakHeapPtr& operator=(const UnsafeBareWeakHeapPtr& v) {
     this->value = v.value;
@@ -176,18 +175,17 @@ class NurseryAwareHashMap {
   bool hasNurseryEntries() const { return !nurseryEntries.empty(); }
 };
 
 }  // namespace js
 
 namespace JS {
 template <typename T>
 struct GCPolicy<js::detail::UnsafeBareWeakHeapPtr<T>> {
-  static void trace(JSTracer* trc,
-                    js::detail::UnsafeBareWeakHeapPtr<T>* thingp,
+  static void trace(JSTracer* trc, js::detail::UnsafeBareWeakHeapPtr<T>* thingp,
                     const char* name) {
     js::TraceEdge(trc, thingp, name);
   }
   static bool needsSweep(js::detail::UnsafeBareWeakHeapPtr<T>* thingp) {
     return js::gc::IsAboutToBeFinalized(thingp);
   }
 };
 }  // namespace JS
--- a/js/src/gc/PrivateIterators-inl.h
+++ b/js/src/gc/PrivateIterators-inl.h
@@ -15,26 +15,24 @@
 
 #include "gc/GC-inl.h"
 
 namespace js {
 namespace gc {
 
 class ArenaCellIterUnderGC : public ArenaCellIter {
  public:
-  explicit ArenaCellIterUnderGC(Arena* arena)
-      : ArenaCellIter(arena) {
+  explicit ArenaCellIterUnderGC(Arena* arena) : ArenaCellIter(arena) {
     MOZ_ASSERT(CurrentThreadIsPerformingGC());
   }
 };
 
 class ArenaCellIterUnderFinalize : public ArenaCellIter {
  public:
-  explicit ArenaCellIterUnderFinalize(Arena* arena)
-      : ArenaCellIter(arena) {
+  explicit ArenaCellIterUnderFinalize(Arena* arena) : ArenaCellIter(arena) {
     MOZ_ASSERT(CurrentThreadIsGCSweeping());
   }
 };
 
 class GrayObjectIter : public ZoneAllCellIter<js::gc::TenuredCell> {
  public:
   explicit GrayObjectIter(JS::Zone* zone, AllocKind kind)
       : ZoneAllCellIter<js::gc::TenuredCell>() {
--- a/js/src/gc/Scheduling.h
+++ b/js/src/gc/Scheduling.h
@@ -694,25 +694,26 @@ class MemoryTracker {
 #ifdef DEBUG
   void trackMemory(Cell* cell, size_t nbytes, MemoryUse use);
   void untrackMemory(Cell* cell, size_t nbytes, MemoryUse use);
 
   struct Key {
     Key(Cell* cell, MemoryUse use);
     Cell* cell() const;
     MemoryUse use() const;
+
    private:
-#ifdef JS_64BIT
+#  ifdef JS_64BIT
     // Pack this into a single word on 64 bit platforms.
     uintptr_t cell_ : 56;
     uintptr_t use_ : 8;
-#else
+#  else
     uintptr_t cell_ : 32;
     uintptr_t use_ : 8;
-#endif
+#  endif
   };
 
   struct Hasher {
     using Lookup = Key;
     static HashNumber hash(const Lookup& l);
     static bool match(const Key& key, const Lookup& l);
     static void rekey(Key& k, const Key& newKey);
   };
--- a/js/src/gc/Tracer.h
+++ b/js/src/gc/Tracer.h
@@ -121,18 +121,17 @@ inline void AssertRootMarkingPhase(JSTra
 template <typename T>
 inline void TraceEdge(JSTracer* trc, WriteBarriered<T>* thingp,
                       const char* name) {
   gc::TraceEdgeInternal(
       trc, gc::ConvertToBase(thingp->unsafeUnbarrieredForTracing()), name);
 }
 
 template <typename T>
-inline void TraceEdge(JSTracer* trc, WeakHeapPtr<T>* thingp,
-                      const char* name) {
+inline void TraceEdge(JSTracer* trc, WeakHeapPtr<T>* thingp, const char* name) {
   gc::TraceEdgeInternal(trc, gc::ConvertToBase(thingp->unsafeGet()), name);
 }
 
 // Trace through a possibly-null edge in the live object graph on behalf of
 // tracing.
 
 template <typename T>
 inline void TraceNullableEdge(JSTracer* trc, WriteBarriered<T>* thingp,
@@ -156,18 +155,17 @@ inline void TraceNullableEdge(JSTracer* 
 
 template <typename T>
 inline void TraceRoot(JSTracer* trc, T* thingp, const char* name) {
   gc::AssertRootMarkingPhase(trc);
   gc::TraceEdgeInternal(trc, gc::ConvertToBase(thingp), name);
 }
 
 template <typename T>
-inline void TraceRoot(JSTracer* trc, WeakHeapPtr<T>* thingp,
-                      const char* name) {
+inline void TraceRoot(JSTracer* trc, WeakHeapPtr<T>* thingp, const char* name) {
   TraceRoot(trc, thingp->unsafeGet(), name);
 }
 
 // Idential to TraceRoot, except that this variant will not crash if |*thingp|
 // is null.
 
 template <typename T>
 inline void TraceNullableRoot(JSTracer* trc, T* thingp, const char* name) {
@@ -208,18 +206,17 @@ template <typename T>
 void TraceRootRange(JSTracer* trc, size_t len, T* vec, const char* name) {
   gc::AssertRootMarkingPhase(trc);
   gc::TraceRangeInternal(trc, len, gc::ConvertToBase(vec), name);
 }
 
 // Trace an edge that crosses compartment boundaries. If the compartment of the
 // destination thing is not being GC'd, then the edge will not be traced.
 void TraceCrossCompartmentEdge(JSTracer* trc, JSObject* src,
-                               WriteBarriered<Value>* dst,
-                               const char* name);
+                               WriteBarriered<Value>* dst, const char* name);
 
 // As above but with manual barriers.
 template <typename T>
 void TraceManuallyBarrieredCrossCompartmentEdge(JSTracer* trc, JSObject* src,
                                                 T* dst, const char* name);
 
 // Permanent atoms and well-known symbols are shared between runtimes and must
 // use a separate marking path so that we can filter them out of normal heap
--- a/js/src/gc/Verifier.h
+++ b/js/src/gc/Verifier.h
@@ -19,23 +19,21 @@ namespace gc {
 // Like gc::MarkColor but allows the possibility of the cell being
 // unmarked.
 enum class CellColor : uint8_t {
   White = 0,
   Gray = uint8_t(MarkColor::Gray),
   Black = uint8_t(MarkColor::Black)
 };
 
-static constexpr CellColor AllCellColors[] = {
-  CellColor::White, CellColor::Gray, CellColor::Black
-};
+static constexpr CellColor AllCellColors[] = {CellColor::White, CellColor::Gray,
+                                              CellColor::Black};
 
-static constexpr CellColor MarkedCellColors[] = {
-  CellColor::Gray, CellColor::Black
-};
+static constexpr CellColor MarkedCellColors[] = {CellColor::Gray,
+                                                 CellColor::Black};
 
 inline CellColor GetCellColor(Cell* cell) {
   if (cell->isMarkedBlack()) {
     return CellColor::Black;
   }
 
   if (cell->isMarkedGray()) {
     return CellColor::Gray;
@@ -54,12 +52,12 @@ inline CellColor ExpectedWeakMapKeyColor
   return Min(mapColor, delegateColor);
 }
 
 inline CellColor ExpectedKeyAndDelegateColor(CellColor keyColor,
                                              CellColor delegateColor) {
   return Max(keyColor, delegateColor);
 }
 
-} // namespace gc
-} // namespace js
+}  // namespace gc
+}  // namespace js
 
 #endif /* gc_Verifier_h */
--- a/js/src/gc/Zone.cpp
+++ b/js/src/gc/Zone.cpp
@@ -546,18 +546,17 @@ MemoryTracker::~MemoryTracker() {
   if (map.empty()) {
     MOZ_ASSERT(bytes() == 0);
     return;
   }
 
   fprintf(stderr, "Missing calls to JS::RemoveAssociatedMemory:\n");
   for (auto r = map.all(); !r.empty(); r.popFront()) {
     fprintf(stderr, "  %p 0x%zx %s\n", r.front().key().cell(),
-            r.front().value(),
-            MemoryUseName(r.front().key().use()));
+            r.front().value(), MemoryUseName(r.front().key().use()));
   }
 
   MOZ_CRASH();
 }
 
 void MemoryTracker::trackMemory(Cell* cell, size_t nbytes, MemoryUse use) {
   MOZ_ASSERT(cell->isTenured());
 
@@ -605,21 +604,21 @@ void MemoryTracker::fixupAfterMovingGC()
     if (cell->isForwarded()) {
       cell = gc::RelocationOverlay::fromCell(cell)->forwardingAddress();
       e.rekeyFront(Key{cell, key.use()});
     }
   }
 }
 
 inline MemoryTracker::Key::Key(Cell* cell, MemoryUse use)
-    : cell_(uint64_t(cell)), use_(uint64_t(use))
-{
-#ifdef JS_64BIT
-  static_assert(sizeof(Key) == 8, "MemoryTracker::Key should be packed into 8 bytes");
-#endif
+    : cell_(uint64_t(cell)), use_(uint64_t(use)) {
+#  ifdef JS_64BIT
+  static_assert(sizeof(Key) == 8,
+                "MemoryTracker::Key should be packed into 8 bytes");
+#  endif
   MOZ_ASSERT(this->cell() == cell);
   MOZ_ASSERT(this->use() == use);
 }
 
 inline Cell* MemoryTracker::Key::cell() const {
   return reinterpret_cast<Cell*>(cell_);
 }
 inline MemoryUse MemoryTracker::Key::use() const {
--- a/js/src/gc/Zone.h
+++ b/js/src/gc/Zone.h
@@ -745,18 +745,17 @@ class ZoneAllocPolicy {
   }
 };
 
 // Convenience functions for memory accounting on the zone.
 
 // Associate malloc memory with a GC thing. This call must be matched by a
 // following call to RemoveCellMemory with the same size and use. The total
 // amount of malloc memory associated with a zone is used to trigger GC.
-inline void AddCellMemory(gc::TenuredCell* cell, size_t nbytes,
-                          MemoryUse use) {
+inline void AddCellMemory(gc::TenuredCell* cell, size_t nbytes, MemoryUse use) {
   if (nbytes) {
     cell->zone()->addCellMemory(cell, nbytes, use);
   }
 }
 inline void AddCellMemory(gc::Cell* cell, size_t nbytes, MemoryUse use) {
   if (cell->isTenured()) {
     AddCellMemory(&cell->asTenured(), nbytes, use);
   }
--- a/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h
+++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h
@@ -25,19 +25,17 @@ void MacroAssembler::moveGPRToFloat32(Re
 void MacroAssembler::move8SignExtend(Register src, Register dest) {
   ma_seb(dest, src);
 }
 
 void MacroAssembler::move16SignExtend(Register src, Register dest) {
   ma_seh(dest, src);
 }
 
-void MacroAssembler::loadAbiReturnAddress(Register dest) {
-  movePtr(ra, dest);
-}
+void MacroAssembler::loadAbiReturnAddress(Register dest) { movePtr(ra, dest); }
 
 // ===============================================================
 // Logical instructions
 
 void MacroAssembler::not32(Register reg) { ma_not(reg, reg); }
 
 void MacroAssembler::and32(Register src, Register dest) {
   as_and(dest, dest, src);
--- a/js/src/jsapi-tests/testGCGrayMarking.cpp
+++ b/js/src/jsapi-tests/testGCGrayMarking.cpp
@@ -157,25 +157,24 @@ bool TestMarking() {
 
 static const CellColor DontMark = CellColor::White;
 
 enum MarkKeyOrDelegate : bool { MarkKey = true, MarkDelegate = false };
 
 bool TestJSWeakMaps() {
   for (auto keyOrDelegateColor : MarkedCellColors) {
     for (auto mapColor : MarkedCellColors) {
-      for (auto markKeyOrDelegate : { MarkKey, MarkDelegate }) {
-        CellColor expected = ExpectedWeakMapValueColor(keyOrDelegateColor,
-                                                       mapColor);
+      for (auto markKeyOrDelegate : {MarkKey, MarkDelegate}) {
+        CellColor expected =
+            ExpectedWeakMapValueColor(keyOrDelegateColor, mapColor);
         CHECK(TestJSWeakMap(markKeyOrDelegate, keyOrDelegateColor, mapColor,
                             expected));
 #ifdef JS_GC_ZEAL
-        CHECK(TestJSWeakMapWithGrayUnmarking(markKeyOrDelegate,
-                                             keyOrDelegateColor, mapColor,
-                                             expected));
+        CHECK(TestJSWeakMapWithGrayUnmarking(
+            markKeyOrDelegate, keyOrDelegateColor, mapColor, expected));
 #endif
       }
     }
   }
 
   return true;
 }
 
@@ -184,24 +183,23 @@ bool TestInternalWeakMaps() {
     for (auto delegateMarkColor : AllCellColors) {
       if (keyMarkColor == CellColor::White &&
           delegateMarkColor == CellColor::White) {
         continue;
       }
 
       CellColor keyOrDelegateColor =
           ExpectedKeyAndDelegateColor(keyMarkColor, delegateMarkColor);
-      CellColor expected = ExpectedWeakMapValueColor(keyOrDelegateColor,
-                                                     CellColor::Black);
+      CellColor expected =
+          ExpectedWeakMapValueColor(keyOrDelegateColor, CellColor::Black);
       CHECK(TestInternalWeakMap(keyMarkColor, delegateMarkColor, expected));
 
 #ifdef JS_GC_ZEAL
       CHECK(TestInternalWeakMapWithGrayUnmarking(keyMarkColor,
-                                                 delegateMarkColor,
-                                                 expected));
+                                                 delegateMarkColor, expected));
 #endif
     }
   }
 
   return true;
 }
 
 bool TestJSWeakMap(MarkKeyOrDelegate markKey, CellColor weakMapMarkColor,
@@ -305,21 +303,21 @@ bool TestJSWeakMapWithGrayUnmarking(Mark
 
   JS_UnsetGCZeal(cx, uint8_t(ZealMode::YieldWhileGrayMarking));
 
   return true;
 }
 
 static void MaybeExposeObject(JSObject* object, CellColor color) {
   if (color == CellColor::Black) {
-      JS::ExposeObjectToActiveJS(object);
+    JS::ExposeObjectToActiveJS(object);
   }
 }
 
-#endif // JS_GC_ZEAL
+#endif  // JS_GC_ZEAL
 
 bool CreateJSWeakMapObjects(JSObject** weakMapOut, JSObject** keyOut,
                             JSObject** valueOut) {
   RootedObject key(cx, AllocWeakmapKeyObject());
   CHECK(key);
 
   RootedObject value(cx, AllocPlainObject());
   CHECK(value);
@@ -428,17 +426,17 @@ bool TestInternalWeakMapWithGrayUnmarkin
     CHECK(GetCellColor(value) == expectedColor);
   }
 
   JS_UnsetGCZeal(cx, uint8_t(ZealMode::YieldWhileGrayMarking));
 
   return true;
 }
 
-#endif // JS_GC_ZEAL
+#endif  // JS_GC_ZEAL
 
 bool CreateInternalWeakMapObjects(UniquePtr<GCManagedObjectWeakMap>* weakMapOut,
                                   JSObject** keyOut, JSObject** valueOut) {
   RootedObject key(cx, AllocWeakmapKeyObject());
   CHECK(key);
 
   RootedObject value(cx, AllocPlainObject());
   CHECK(value);
--- a/js/src/jsapi-tests/testScriptObject.cpp
+++ b/js/src/jsapi-tests/testScriptObject.cpp
@@ -3,17 +3,17 @@
  */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/Utf8.h"  // mozilla::Utf8Unit
 
 #include "js/CompilationAndEvaluation.h"  // JS::Compile{,{,Utf8{File,Path}}DontInflate}
-#include "js/SourceText.h"  // JS::Source{Ownership,Text}
+#include "js/SourceText.h"                // JS::Source{Ownership,Text}
 #include "jsapi-tests/tests.h"
 
 struct ScriptObjectFixture : public JSAPITest {
   static const int code_size;
   static const char code[];
   static char16_t uc_code[];
 
   ScriptObjectFixture() {
--- a/js/src/vm/ArrayBufferObject.cpp
+++ b/js/src/vm/ArrayBufferObject.cpp
@@ -951,18 +951,17 @@ void ArrayBufferObject::releaseData(Free
       // There's nothing to release if there's no data.
       MOZ_ASSERT(dataPointer() == nullptr);
       break;
     case USER_OWNED:
       // User-owned data is released by, well, the user.
       break;
     case MAPPED:
       gc::DeallocateMappedContent(dataPointer(), byteLength());
-      RemoveCellMemory(this, associatedBytes(),
-                       MemoryUse::ArrayBufferContents);
+      RemoveCellMemory(this, associatedBytes(), MemoryUse::ArrayBufferContents);
       break;
     case WASM:
       WasmArrayRawBuffer::Release(dataPointer());
       RemoveCellMemory(this, byteLength(), MemoryUse::ArrayBufferContents);
       break;
     case EXTERNAL:
       if (freeInfo()->freeFunc) {
         // The analyzer can't know for sure whether the embedder-supplied
--- a/js/src/vm/AtomsTable.h
+++ b/js/src/vm/AtomsTable.h
@@ -41,18 +41,18 @@ class MOZ_RAII AutoLockAllAtoms {
 
 struct AtomHasher {
   struct Lookup;
   static inline HashNumber hash(const Lookup& l);
   static MOZ_ALWAYS_INLINE bool match(const WeakHeapPtr<JSAtom*>& entry,
                                       const Lookup& lookup);
 };
 
-using AtomSet = JS::GCHashSet<WeakHeapPtr<JSAtom*>, AtomHasher,
-                              SystemAllocPolicy>;
+using AtomSet =
+    JS::GCHashSet<WeakHeapPtr<JSAtom*>, AtomHasher, SystemAllocPolicy>;
 
 // This class is a wrapper for AtomSet that is used to ensure the AtomSet is
 // not modified. It should only expose read-only methods from AtomSet.
 // Note however that the atoms within the table can be marked during GC.
 class FrozenAtomSet {
   AtomSet* mSet;
 
  public:
--- a/js/src/vm/CompilationAndEvaluation.cpp
+++ b/js/src/vm/CompilationAndEvaluation.cpp
@@ -558,18 +558,19 @@ static bool EvaluateSourceBuffer(JSConte
 JS_PUBLIC_API bool JS::Evaluate(JSContext* cx,
                                 const ReadOnlyCompileOptions& options,
                                 SourceText<Utf8Unit>& srcBuf,
                                 MutableHandle<Value> rval) {
   RootedObject globalLexical(cx, &cx->global()->lexicalEnvironment());
 
   size_t length = srcBuf.length();
   auto chars = UniqueTwoByteChars(
-      UTF8CharsToNewTwoByteCharsZ(cx, UTF8Chars(srcBuf.get(), length),
-                                  &length, js::MallocArena).get());
+      UTF8CharsToNewTwoByteCharsZ(cx, UTF8Chars(srcBuf.get(), length), &length,
+                                  js::MallocArena)
+          .get());
   if (!chars) {
     return false;
   }
 
   SourceText<char16_t> inflatedSrc;
   if (!inflatedSrc.init(cx, std::move(chars), length)) {
     return false;
   }
--- a/js/src/vm/Debugger-inl.h
+++ b/js/src/vm/Debugger-inl.h
@@ -51,18 +51,18 @@
 /* static */ inline bool js::Debugger::checkNoExecute(JSContext* cx,
                                                       HandleScript script) {
   if (!cx->realm()->isDebuggee() || !cx->noExecuteDebuggerTop) {
     return true;
   }
   return slowPathCheckNoExecute(cx, script);
 }
 
-/* static */ inline js::ResumeMode js::Debugger::onEnterFrame(JSContext* cx,
-                                                       AbstractFramePtr frame) {
+/* static */ inline js::ResumeMode js::Debugger::onEnterFrame(
+    JSContext* cx, AbstractFramePtr frame) {
   MOZ_ASSERT_IF(frame.hasScript() && frame.script()->isDebuggee(),
                 frame.isDebuggee());
   if (!frame.isDebuggee()) {
     return ResumeMode::Continue;
   }
   return slowPathOnEnterFrame(cx, frame);
 }
 
@@ -94,18 +94,18 @@
 
 /* static */ inline void js::Debugger::onNewWasmInstance(
     JSContext* cx, Handle<WasmInstanceObject*> wasmInstance) {
   if (cx->realm()->isDebuggee()) {
     slowPathOnNewWasmInstance(cx, wasmInstance);
   }
 }
 
-/* static */ inline void js::Debugger::onNewPromise(JSContext* cx,
-                                             Handle<PromiseObject*> promise) {
+/* static */ inline void js::Debugger::onNewPromise(
+    JSContext* cx, Handle<PromiseObject*> promise) {
   if (MOZ_UNLIKELY(cx->realm()->isDebuggee())) {
     slowPathPromiseHook(cx, Debugger::OnNewPromise, promise);
   }
 }
 
 /* static */ inline void js::Debugger::onPromiseSettled(
     JSContext* cx, Handle<PromiseObject*> promise) {
   if (MOZ_UNLIKELY(promise->realm()->isDebuggee())) {
--- a/js/src/vm/EnvironmentObject.cpp
+++ b/js/src/vm/EnvironmentObject.cpp
@@ -1782,17 +1782,18 @@ class DebugEnvironmentProxyHandler : pub
            !env.as<LexicalEnvironmentObject>().isExtensible();
   }
 
   static Scope* getEnvironmentScope(const JSObject& env) {
     if (isFunctionEnvironment(env)) {
       return env.as<CallObject>().callee().nonLazyScript()->bodyScope();
     }
     if (env.is<ModuleEnvironmentObject>()) {
-      JSScript* script = env.as<ModuleEnvironmentObject>().module().maybeScript();
+      JSScript* script =
+          env.as<ModuleEnvironmentObject>().module().maybeScript();
       return script ? script->bodyScope() : nullptr;
     }
     if (isNonExtensibleLexicalEnvironment(env)) {
       return &env.as<LexicalEnvironmentObject>().scope();
     }
     if (env.is<VarEnvironmentObject>()) {
       return &env.as<VarEnvironmentObject>().scope();
     }
--- a/js/src/vm/EnvironmentObject.h
+++ b/js/src/vm/EnvironmentObject.h
@@ -959,18 +959,17 @@ class DebugEnvironments {
    * The map from environment objects of live frames to the live frame. This
    * map updated lazily whenever the debugger needs the information. In
    * between two lazy updates, liveEnvs becomes incomplete (but not invalid,
    * onPop* removes environments as they are popped). Thus, two consecutive
    * debugger lazy updates of liveEnvs need only fill in the new
    * environments.
    */
   typedef GCHashMap<WeakHeapPtr<JSObject*>, LiveEnvironmentVal,
-                    MovableCellHasher<WeakHeapPtr<JSObject*>>,
-                    ZoneAllocPolicy>
+                    MovableCellHasher<WeakHeapPtr<JSObject*>>, ZoneAllocPolicy>
       LiveEnvironmentMap;
   LiveEnvironmentMap liveEnvs;
 
  public:
   DebugEnvironments(JSContext* cx, Zone* zone);
   ~DebugEnvironments();
 
   Zone* zone() const { return zone_; }
--- a/js/src/vm/GeneratorObject.h
+++ b/js/src/vm/GeneratorObject.h
@@ -127,17 +127,18 @@ class AbstractGeneratorObject : public N
   }
   bool isRunning() const {
     return getFixedSlot(RESUME_INDEX_SLOT) == Int32Value(RESUME_INDEX_RUNNING);
   }
   bool isSuspended() const {
     // Note: also update Baseline's IsSuspendedGenerator code if this
     // changes.
     Value resumeIndex = getFixedSlot(RESUME_INDEX_SLOT);
-    return resumeIndex.isInt32() && resumeIndex.toInt32() < RESUME_INDEX_RUNNING;
+    return resumeIndex.isInt32() &&
+           resumeIndex.toInt32() < RESUME_INDEX_RUNNING;
   }
   void setRunning() {
     MOZ_ASSERT(isSuspended());
     setFixedSlot(RESUME_INDEX_SLOT, Int32Value(RESUME_INDEX_RUNNING));
   }
   void setResumeIndex(jsbytecode* pc) {
     MOZ_ASSERT(*pc == JSOP_INITIALYIELD || *pc == JSOP_YIELD ||
                *pc == JSOP_AWAIT);
--- a/js/src/vm/JSScript.h
+++ b/js/src/vm/JSScript.h
@@ -79,17 +79,17 @@ class JitScript;
 namespace frontend {
 struct BytecodeEmitter;
 class FunctionBox;
 class ModuleSharedContext;
 }  // namespace frontend
 
 namespace gc {
 void SweepLazyScripts(GCParallelTask* task);
-} // namespace gc
+}  // namespace gc
 
 namespace detail {
 
 // Do not call this directly! It is exposed for the friend declarations in
 // this file.
 JSScript* CopyScript(JSContext* cx, HandleScript src,
                      HandleScriptSourceObject sourceObject,
                      MutableHandle<GCVector<Scope*>> scopes);
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -530,19 +530,17 @@ struct JSRuntime : public js::MallocProv
 
   // Number of debuggee realms in the runtime observing code coverage.
   js::MainThreadData<size_t> numDebuggeeRealmsObservingCoverage_;
 
  public:
   void incrementNumDebuggeeRealms();
   void decrementNumDebuggeeRealms();
 
-  size_t numDebuggeeRealms() const {
-    return numDebuggeeRealms_;
-  }
+  size_t numDebuggeeRealms() const { return numDebuggeeRealms_; }
 
   void incrementNumDebuggeeRealmsObservingCoverage();
   void decrementNumDebuggeeRealmsObservingCoverage();
 
   /* Locale-specific callbacks for string conversion. */
   js::MainThreadData<const JSLocaleCallbacks*> localeCallbacks;
 
   /* Default locale for Internationalization API */
--- a/js/src/vm/SavedFrame.h
+++ b/js/src/vm/SavedFrame.h
@@ -101,18 +101,17 @@ class SavedFrame : public NativeObject {
     RootedRange(JSContext* cx, HandleSavedFrame frame) : frame_(cx, frame) {}
     RootedIterator begin() { return RootedIterator(*this); }
     RootedIterator end() { return RootedIterator(); }
   };
 
   struct Lookup;
   struct HashPolicy;
 
-  typedef JS::GCHashSet<WeakHeapPtr<SavedFrame*>, HashPolicy,
-                        SystemAllocPolicy>
+  typedef JS::GCHashSet<WeakHeapPtr<SavedFrame*>, HashPolicy, SystemAllocPolicy>
       Set;
 
  private:
   static SavedFrame* create(JSContext* cx);
   static MOZ_MUST_USE bool finishSavedFrameInit(JSContext* cx,
                                                 HandleObject ctor,
                                                 HandleObject proto);
   void initFromLookup(JSContext* cx, Handle<Lookup> lookup);
--- a/js/src/vm/SavedStacks.cpp
+++ b/js/src/vm/SavedStacks.cpp
@@ -1090,18 +1090,19 @@ JS_PUBLIC_API bool IsUnwrappedSavedFrame
 
 static bool AssignProperty(JSContext* cx, HandleObject dst, HandleObject src,
                            const char* property) {
   RootedValue v(cx);
   return JS_GetProperty(cx, src, property, &v) &&
          JS_DefineProperty(cx, dst, property, v, JSPROP_ENUMERATE);
 }
 
-JS_PUBLIC_API JSObject* ConvertSavedFrameToPlainObject
-    (JSContext* cx, HandleObject savedFrameArg, SavedFrameSelfHosted selfHosted) {
+JS_PUBLIC_API JSObject* ConvertSavedFrameToPlainObject(
+    JSContext* cx, HandleObject savedFrameArg,
+    SavedFrameSelfHosted selfHosted) {
   MOZ_ASSERT(savedFrameArg);
 
   RootedObject savedFrame(cx, savedFrameArg);
   RootedObject baseConverted(cx), lastConverted(cx);
   RootedValue v(cx);
 
   baseConverted = lastConverted = JS_NewObject(cx, nullptr);
   if (!baseConverted) {
@@ -1114,17 +1115,17 @@ JS_PUBLIC_API JSObject* ConvertSavedFram
         !AssignProperty(cx, lastConverted, savedFrame, "sourceId") ||
         !AssignProperty(cx, lastConverted, savedFrame, "line") ||
         !AssignProperty(cx, lastConverted, savedFrame, "column") ||
         !AssignProperty(cx, lastConverted, savedFrame, "functionDisplayName") ||
         !AssignProperty(cx, lastConverted, savedFrame, "asyncCause")) {
       return nullptr;
     }
 
-    const char* parentProperties[] = { "parent", "asyncParent" };
+    const char* parentProperties[] = {"parent", "asyncParent"};
     foundParent = false;
     for (const char* prop : parentProperties) {
       if (!JS_GetProperty(cx, savedFrame, prop, &v)) {
         return nullptr;
       }
       if (v.isObject()) {
         RootedObject nextConverted(cx, JS_NewObject(cx, nullptr));
         if (!nextConverted ||
--- a/js/src/vm/Shape.h
+++ b/js/src/vm/Shape.h
@@ -891,18 +891,18 @@ struct DefaultHasher<jsid> {
   static bool match(jsid id1, jsid id2) { return id1 == id2; }
 };
 
 }  // namespace mozilla
 
 namespace js {
 
 using BaseShapeSet =
-    JS::WeakCache<JS::GCHashSet<WeakHeapPtr<UnownedBaseShape*>,
-                                StackBaseShape, SystemAllocPolicy>>;
+    JS::WeakCache<JS::GCHashSet<WeakHeapPtr<UnownedBaseShape*>, StackBaseShape,
+                                SystemAllocPolicy>>;
 
 class Shape : public gc::TenuredCell {
   friend class ::JSObject;
   friend class ::JSFunction;
   friend class NativeObject;
   friend class PropertyTree;
   friend class TenuringTracer;
   friend struct StackBaseShape;
--- a/js/src/vm/StringType-inl.h
+++ b/js/src/vm/StringType-inl.h
@@ -432,18 +432,18 @@ inline void JSFlatString::finalize(js::F
     fop->free_(this, nonInlineCharsRaw(), allocSize(),
                js::MemoryUse::StringContents);
   }
 }
 
 inline size_t JSFlatString::allocSize() const {
   MOZ_ASSERT(!isInline());
 
-  size_t charSize = hasLatin1Chars() ? sizeof(JS::Latin1Char)
-                                     : sizeof(char16_t);
+  size_t charSize =
+      hasLatin1Chars() ? sizeof(JS::Latin1Char) : sizeof(char16_t);
   size_t count = isExtensible() ? asExtensible().capacity() : length();
   return (count + 1) * charSize;
 }
 
 inline void JSFatInlineString::finalize(js::FreeOp* fop) {
   MOZ_ASSERT(getAllocKind() == js::gc::AllocKind::FAT_INLINE_STRING);
   MOZ_ASSERT(isInline());
 
--- a/js/src/vm/StringType.cpp
+++ b/js/src/vm/StringType.cpp
@@ -572,18 +572,17 @@ JSFlatString* JSRope::flattenInternal(JS
       }
       str->setNonInlineChars(wholeChars);
       uint32_t left_len = left.length();
       pos = wholeChars + left_len;
 
       // Remove memory association for left node we're about to make into a
       // dependent string.
       if (left.isTenured()) {
-        RemoveCellMemory(&left, left.allocSize(),
-                         MemoryUse::StringContents);
+        RemoveCellMemory(&left, left.allocSize(), MemoryUse::StringContents);
       }
 
       if (IsSame<CharT, char16_t>::value) {
         left.setLengthAndFlags(left_len, DEPENDENT_FLAGS);
       } else {
         left.setLengthAndFlags(left_len, DEPENDENT_FLAGS | LATIN1_CHARS_BIT);
       }
       left.d.s.u3.base = (JSLinearString*)this; /* will be true on exit */
@@ -660,18 +659,17 @@ finish_node : {
       str->setLengthAndFlags(wholeLength, EXTENSIBLE_FLAGS);
     } else {
       str->setLengthAndFlags(wholeLength, EXTENSIBLE_FLAGS | LATIN1_CHARS_BIT);
     }
     str->setNonInlineChars(wholeChars);
     str->d.s.u3.capacity = wholeCapacity;
 
     if (str->isTenured()) {
-      AddCellMemory(str, str->asFlat().allocSize(),
-                    MemoryUse::StringContents);
+      AddCellMemory(str, str->asFlat().allocSize(), MemoryUse::StringContents);
     }
 
     return &this->asFlat();
   }
   uintptr_t flattenData;
   uint32_t len = pos - str->nonInlineCharsRaw<CharT>();
   if (IsSame<CharT, char16_t>::value) {
     flattenData = str->unsetFlattenData(len, DEPENDENT_FLAGS);
@@ -1471,18 +1469,17 @@ JSFlatString* JSExternalString::ensureFl
     AutoCheckCannotGC nogc;
     FillAndTerminate(s.get(), nonInlineChars<char16_t>(nogc), n);
   }
 
   // Release the external chars.
   finalize(cx->runtime()->defaultFreeOp());
 
   MOZ_ASSERT(isTenured());
-  AddCellMemory(this, (n + 1) * sizeof(char16_t),
-                MemoryUse::StringContents);
+  AddCellMemory(this, (n + 1) * sizeof(char16_t), MemoryUse::StringContents);
 
   // Transform the string into a non-external, flat string. Note that the
   // resulting string will still be in an AllocKind::EXTERNAL_STRING arena,
   // but will no longer be an external string.
   setLengthAndFlags(n, INIT_FLAT_FLAGS);
   setNonInlineChars<char16_t>(s.release());
 
   return &this->asFlat();
--- a/js/src/wasm/AsmJS.cpp
+++ b/js/src/wasm/AsmJS.cpp
@@ -567,17 +567,16 @@ static PropertyName* DotMember(ParseNode
 static ParseNode* ElemBase(ParseNode* pn) {
   return &pn->as<PropertyByValue>().expression();
 }
 
 static ParseNode* ElemIndex(ParseNode* pn) {
   return &pn->as<PropertyByValue>().key();
 }
 
-
 static inline PropertyName* FunctionName(FunctionNode* funNode) {
   if (JSAtom* name = funNode->funbox()->explicitName()) {
     return name->asPropertyName();
   }
   return nullptr;
 }
 
 static inline ParseNode* FunctionStatementList(FunctionNode* funNode) {
@@ -6029,17 +6028,18 @@ static bool ParseFunction(ModuleValidato
   ParseContext* outerpc = m.parser().pc_;
   Directives directives(outerpc);
   FunctionBox* funbox = m.parser().newFunctionBox(
       funNode, fun, toStringStart, directives, GeneratorKind::NotGenerator,
       FunctionAsyncKind::SyncFunction);
   if (!funbox) {
     return false;
   }
-  funbox->initWithEnclosingParseContext(outerpc, fun, FunctionSyntaxKind::Statement);
+  funbox->initWithEnclosingParseContext(outerpc, fun,
+                                        FunctionSyntaxKind::Statement);
 
   Directives newDirectives = directives;
   SourceParseContext funpc(&m.parser(), funbox, &newDirectives);
   if (!funpc.init()) {
     return false;
   }
 
   if (!m.parser().functionFormalParametersAndBody(
--- a/js/src/wasm/WasmJS.h
+++ b/js/src/wasm/WasmJS.h
@@ -287,19 +287,20 @@ class WasmMemoryObject : public NativeOb
   static const ClassOps classOps_;
   static void finalize(FreeOp* fop, JSObject* obj);
   static bool bufferGetterImpl(JSContext* cx, const CallArgs& args);
   static bool bufferGetter(JSContext* cx, unsigned argc, Value* vp);
   static bool growImpl(JSContext* cx, const CallArgs& args);
   static bool grow(JSContext* cx, unsigned argc, Value* vp);
   static uint32_t growShared(HandleWasmMemoryObject memory, uint32_t delta);
 
-  using InstanceSet = JS::WeakCache<GCHashSet<
-      WeakHeapPtrWasmInstanceObject,
-      MovableCellHasher<WeakHeapPtrWasmInstanceObject>, SystemAllocPolicy>>;
+  using InstanceSet =
+      JS::WeakCache<GCHashSet<WeakHeapPtrWasmInstanceObject,
+                              MovableCellHasher<WeakHeapPtrWasmInstanceObject>,
+                              SystemAllocPolicy>>;
   bool hasObservers() const;
   InstanceSet& observers() const;
   InstanceSet* getOrCreateObservers(JSContext* cx);
 
  public:
   static const unsigned RESERVED_SLOTS = 2;
   static const Class class_;
   static const JSPropertySpec properties[];
--- a/js/src/wasm/WasmTable.h
+++ b/js/src/wasm/WasmTable.h
@@ -36,19 +36,20 @@ namespace wasm {
 
 // TODO/AnyRef-boxing: With boxed immediates and strings, JSObject* is no longer
 // the most appropriate representation for Cell::anyref.
 STATIC_ASSERT_ANYREF_IS_JSOBJECT;
 
 typedef GCVector<HeapPtr<JSObject*>, 0, SystemAllocPolicy> TableAnyRefVector;
 
 class Table : public ShareableBase<Table> {
-  using InstanceSet = JS::WeakCache<GCHashSet<
-      WeakHeapPtrWasmInstanceObject,
-      MovableCellHasher<WeakHeapPtrWasmInstanceObject>, SystemAllocPolicy>>;
+  using InstanceSet =
+      JS::WeakCache<GCHashSet<WeakHeapPtrWasmInstanceObject,
+                              MovableCellHasher<WeakHeapPtrWasmInstanceObject>,
+                              SystemAllocPolicy>>;
   using UniqueFuncRefArray = UniquePtr<FunctionTableElem[], JS::FreePolicy>;
 
   WeakHeapPtrWasmTableObject maybeObject_;
   InstanceSet observers_;
   UniqueFuncRefArray functions_;  // either functions_ has data
   TableAnyRefVector objects_;     //   or objects_, but not both
   const TableKind kind_;
   uint32_t length_;
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -1822,20 +1822,19 @@ static void ReportRealmStats(const JS::R
       realmJSPathPrefix + NS_LITERAL_CSTRING("baseline/fallback-stubs"),
       realmStats.baselineStubsFallback,
       "The Baseline JIT's fallback IC stubs (excluding code).");
 
   ZRREPORT_BYTES(realmJSPathPrefix + NS_LITERAL_CSTRING("ion-data"),
                  realmStats.ionData,
                  "The IonMonkey JIT's compilation data (IonScripts).");
 
-  ZRREPORT_BYTES(
-      realmJSPathPrefix + NS_LITERAL_CSTRING("jit-scripts"),
-      realmStats.jitScripts,
-      "JIT and Type Inference data associated with scripts.");
+  ZRREPORT_BYTES(realmJSPathPrefix + NS_LITERAL_CSTRING("jit-scripts"),
+                 realmStats.jitScripts,
+                 "JIT and Type Inference data associated with scripts.");
 
   ZRREPORT_BYTES(
       realmJSPathPrefix +
           NS_LITERAL_CSTRING("type-inference/allocation-site-tables"),
       realmStats.typeInferenceAllocationSiteTables,
       "Tables of type objects associated with allocation sites.");
 
   ZRREPORT_BYTES(realmJSPathPrefix +