Bug 1573844 - Remove references to js::Class and remove the alias r=tcampbell
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 14 Aug 2019 19:13:12 +0000
changeset 488205 c034401401c23f041958b032f5dad95ab382c228
parent 488204 d8a479850f5903711dba26c4cbd9631baea8f844
child 488206 1dccb45167d39cb443d42afc46fab8ad55426af5
push id113904
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:41:00 +0000
treeherdermozilla-inbound@b283a7ef186c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1573844
milestone70.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 1573844 - Remove references to js::Class and remove the alias r=tcampbell The final huge patch. This is a search-and-replace removal of js::Class followed by clang-format and removal of the alias from TypeDecls.h. Depends on D41986 Differential Revision: https://phabricator.services.mozilla.com/D41987
js/public/Class.h
js/public/Proxy.h
js/public/TypeDecls.h
js/rust/build.rs
js/rust/src/glue.rs
js/rust/src/jsglue.cpp
js/src/builtin/Array.cpp
js/src/builtin/AtomicsObject.cpp
js/src/builtin/AtomicsObject.h
js/src/builtin/BigInt.cpp
js/src/builtin/BigInt.h
js/src/builtin/Boolean.cpp
js/src/builtin/DataViewObject.cpp
js/src/builtin/DataViewObject.h
js/src/builtin/JSON.cpp
js/src/builtin/JSON.h
js/src/builtin/MapObject.cpp
js/src/builtin/MapObject.h
js/src/builtin/ModuleObject.cpp
js/src/builtin/ModuleObject.h
js/src/builtin/Object.cpp
js/src/builtin/Promise.cpp
js/src/builtin/Promise.h
js/src/builtin/RegExp.cpp
js/src/builtin/Stream.cpp
js/src/builtin/Stream.h
js/src/builtin/String.cpp
js/src/builtin/Symbol.cpp
js/src/builtin/Symbol.h
js/src/builtin/TestingFunctions.cpp
js/src/builtin/TypedObject.cpp
js/src/builtin/TypedObject.h
js/src/builtin/WeakMapObject.cpp
js/src/builtin/WeakMapObject.h
js/src/builtin/WeakSetObject.cpp
js/src/builtin/WeakSetObject.h
js/src/builtin/intl/Collator.cpp
js/src/builtin/intl/Collator.h
js/src/builtin/intl/DateTimeFormat.cpp
js/src/builtin/intl/DateTimeFormat.h
js/src/builtin/intl/IntlObject.cpp
js/src/builtin/intl/IntlObject.h
js/src/builtin/intl/Locale.cpp
js/src/builtin/intl/Locale.h
js/src/builtin/intl/NumberFormat.cpp
js/src/builtin/intl/NumberFormat.h
js/src/builtin/intl/PluralRules.cpp
js/src/builtin/intl/PluralRules.h
js/src/builtin/intl/RelativeTimeFormat.cpp
js/src/builtin/intl/RelativeTimeFormat.h
js/src/debugger/Debugger.cpp
js/src/debugger/Debugger.h
js/src/debugger/DebuggerMemory.cpp
js/src/debugger/DebuggerMemory.h
js/src/debugger/Environment.cpp
js/src/debugger/Environment.h
js/src/debugger/Frame.cpp
js/src/debugger/Frame.h
js/src/debugger/Object.cpp
js/src/debugger/Object.h
js/src/debugger/Script.cpp
js/src/debugger/Script.h
js/src/debugger/Source.cpp
js/src/debugger/Source.h
js/src/gc/Allocator.cpp
js/src/gc/Allocator.h
js/src/gc/GCRuntime.h
js/src/gc/GCTrace.cpp
js/src/gc/GCTrace.h
js/src/gc/Marking.cpp
js/src/gc/Nursery.cpp
js/src/gc/Nursery.h
js/src/gc/ObjectKind-inl.h
js/src/jit/BaselineCacheIRCompiler.cpp
js/src/jit/BaselineInspector.cpp
js/src/jit/BaselineInspector.h
js/src/jit/CacheIR.cpp
js/src/jit/CacheIR.h
js/src/jit/CacheIRCompiler.cpp
js/src/jit/CacheIRCompiler.h
js/src/jit/CodeGenerator.cpp
js/src/jit/IonBuilder.cpp
js/src/jit/IonBuilder.h
js/src/jit/IonCacheIRCompiler.cpp
js/src/jit/MCallOptimize.cpp
js/src/jit/MIR.cpp
js/src/jit/MIR.h
js/src/jit/MacroAssembler-inl.h
js/src/jit/MacroAssembler.cpp
js/src/jit/MacroAssembler.h
js/src/jsapi-tests/testBug604087.cpp
js/src/jsapi-tests/testWeakMap.cpp
js/src/jsapi-tests/testWindowNonConfigurable.cpp
js/src/jsapi.cpp
js/src/jsdate.cpp
js/src/jsexn.cpp
js/src/jsfriendapi.cpp
js/src/jsfriendapi.h
js/src/jsmath.cpp
js/src/jsmath.h
js/src/jsnum.cpp
js/src/proxy/Proxy.cpp
js/src/shell/OSObject.cpp
js/src/shell/js.cpp
js/src/vm/ArgumentsObject.cpp
js/src/vm/ArgumentsObject.h
js/src/vm/ArrayBufferObject.cpp
js/src/vm/ArrayBufferObject.h
js/src/vm/ArrayObject-inl.h
js/src/vm/ArrayObject.h
js/src/vm/AsyncFunction.cpp
js/src/vm/AsyncFunction.h
js/src/vm/AsyncIteration.cpp
js/src/vm/AsyncIteration.h
js/src/vm/BooleanObject.h
js/src/vm/Caches-inl.h
js/src/vm/Caches.h
js/src/vm/DateObject.h
js/src/vm/EnvironmentObject.cpp
js/src/vm/EnvironmentObject.h
js/src/vm/ErrorObject.cpp
js/src/vm/ErrorObject.h
js/src/vm/GeneratorObject.cpp
js/src/vm/GeneratorObject.h
js/src/vm/GlobalObject.cpp
js/src/vm/GlobalObject.h
js/src/vm/Instrumentation.cpp
js/src/vm/Interpreter.cpp
js/src/vm/Iteration.cpp
js/src/vm/Iteration.h
js/src/vm/JSFunction-inl.h
js/src/vm/JSFunction.cpp
js/src/vm/JSFunction.h
js/src/vm/JSObject-inl.h
js/src/vm/JSObject.cpp
js/src/vm/JSObject.h
js/src/vm/JSScript.cpp
js/src/vm/JSScript.h
js/src/vm/List.cpp
js/src/vm/List.h
js/src/vm/MemoryMetrics.cpp
js/src/vm/NativeObject-inl.h
js/src/vm/NativeObject.h
js/src/vm/NumberObject.h
js/src/vm/ObjectGroup.cpp
js/src/vm/ObjectGroup.h
js/src/vm/ObjectOperations-inl.h
js/src/vm/PIC.cpp
js/src/vm/PIC.h
js/src/vm/Probes.h
js/src/vm/ProxyObject.cpp
js/src/vm/ProxyObject.h
js/src/vm/Realm.h
js/src/vm/ReceiverGuard-inl.h
js/src/vm/RegExpObject.cpp
js/src/vm/RegExpObject.h
js/src/vm/RegExpStatics.cpp
js/src/vm/RegExpStaticsObject.h
js/src/vm/Runtime.h
js/src/vm/SavedFrame.h
js/src/vm/SavedStacks.cpp
js/src/vm/Scope.cpp
js/src/vm/SelfHosting.cpp
js/src/vm/Shape-inl.h
js/src/vm/Shape.cpp
js/src/vm/Shape.h
js/src/vm/SharedArrayObject.cpp
js/src/vm/SharedArrayObject.h
js/src/vm/StringObject.h
js/src/vm/TypeInference-inl.h
js/src/vm/TypeInference.cpp
js/src/vm/TypeInference.h
js/src/vm/TypeSet.h
js/src/vm/TypedArrayObject.cpp
js/src/vm/TypedArrayObject.h
js/src/wasm/WasmJS.cpp
js/src/wasm/WasmJS.h
js/src/wasm/WasmTypes.cpp
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -28,17 +28,17 @@ struct JSAtomState;
 struct JSFunctionSpec;
 
 namespace js {
 
 class Shape;
 
 // This is equal to JSFunction::class_.  Use it in places where you don't want
 // to #include jsfun.h.
-extern JS_FRIEND_DATA const js::Class* const FunctionClassPtr;
+extern JS_FRIEND_DATA const JSClass* const FunctionClassPtr;
 
 }  // namespace js
 
 namespace JS {
 
 /**
  * The answer to a successful query as to whether an object is an Array per
  * ES6's internal |IsArray| operation (as exposed by |Array.isArray|).
--- a/js/public/Proxy.h
+++ b/js/public/Proxy.h
@@ -370,17 +370,17 @@ class JS_FRIEND_API BaseProxyHandler {
   virtual bool isConstructor(JSObject* obj) const;
 
   virtual bool getElements(JSContext* cx, HandleObject proxy, uint32_t begin,
                            uint32_t end, ElementAdder* adder) const;
 
   virtual bool isScripted() const { return false; }
 };
 
-extern JS_FRIEND_DATA const js::Class ProxyClass;
+extern JS_FRIEND_DATA const JSClass ProxyClass;
 
 inline bool IsProxy(const JSObject* obj) {
   return GetObjectClass(obj)->isProxy();
 }
 
 namespace detail {
 
 // Proxy slot layout
@@ -569,26 +569,26 @@ class MOZ_STACK_CLASS ProxyOptions {
   }
 
   bool lazyProto() const { return lazyProto_; }
   ProxyOptions& setLazyProto(bool flag) {
     lazyProto_ = flag;
     return *this;
   }
 
-  const Class* clasp() const { return clasp_; }
-  ProxyOptions& setClass(const Class* claspArg) {
+  const JSClass* clasp() const { return clasp_; }
+  ProxyOptions& setClass(const JSClass* claspArg) {
     clasp_ = claspArg;
     return *this;
   }
 
  private:
   bool singleton_;
   bool lazyProto_;
-  const Class* clasp_;
+  const JSClass* clasp_;
 };
 
 JS_FRIEND_API JSObject* NewProxyObject(
     JSContext* cx, const BaseProxyHandler* handler, HandleValue priv,
     JSObject* proto, const ProxyOptions& options = ProxyOptions());
 
 JSObject* RenewProxyObject(JSContext* cx, JSObject* obj,
                            BaseProxyHandler* handler, const Value& priv);
@@ -723,17 +723,17 @@ constexpr unsigned CheckProxyFlags() {
                 "Proxies must not use JSCLASS_SKIP_NURSERY_FINALIZE; use "
                 "the canNurseryAllocate() proxy handler method instead.");
   return Flags;
 }
 
 #define PROXY_CLASS_DEF(name, flags)                                       \
   {                                                                        \
     name,                                                                  \
-        js::Class::NON_NATIVE | JSCLASS_IS_PROXY |                         \
+        JSClass::NON_NATIVE | JSCLASS_IS_PROXY |                           \
             JSCLASS_DELAY_METADATA_BUILDER | js::CheckProxyFlags<flags>(), \
         &js::ProxyClassOps, JS_NULL_CLASS_SPEC, &js::ProxyClassExtension,  \
         &js::ProxyObjectOps                                                \
   }
 
 // Converts a proxy into a DeadObjectProxy that will throw exceptions on all
 // access. This will run the proxy's finalizer to perform clean-up before the
 // conversion happens.
--- a/js/public/TypeDecls.h
+++ b/js/public/TypeDecls.h
@@ -31,17 +31,16 @@ class JSFunction;
 class JSFreeOp;
 class JSObject;
 struct JSRuntime;
 class JSScript;
 class JSString;
 
 namespace js {
 class TempAllocPolicy;
-using Class = JSClass;
 };  // namespace js
 
 namespace JS {
 
 struct PropertyKey;
 
 typedef unsigned char Latin1Char;
 
--- a/js/rust/build.rs
+++ b/js/rust/build.rs
@@ -149,17 +149,16 @@ const EXTRA_CLANG_FLAGS: &'static [&'sta
     "-DRUST_BINDGEN",
 ];
 
 /// Types which we want to generate bindings for (and every other type they
 /// transitively use).
 const WHITELIST_TYPES: &'static [&'static str] = &[
     "JS::AutoCheckCannotGC",
     "JS::CallArgs",
-    "js::Class",
     "JS::RealmOptions",
     "JS::ContextOptions",
     "js::DOMCallbacks",
     "js::DOMProxyShadowsResult",
     "js::ESClass",
     "JS::ForOfIterator",
     "JS::Handle",
     "JS::HandleFunction",
--- a/js/rust/src/glue.rs
+++ b/js/rust/src/glue.rs
@@ -233,17 +233,17 @@ extern "C" {
                       aHandler: *const ::libc::c_void,
                       aClass: *const JSClass,
                       aSingleton: bool)
                       -> *mut JSObject;
     pub fn NewWindowProxy(aCx: *mut JSContext,
                           aObj: JS::HandleObject,
                           aHandler: *const ::libc::c_void)
                           -> *mut JSObject;
-    pub fn GetWindowProxyClass() -> *const js::Class;
+    pub fn GetWindowProxyClass() -> *const JSClass;
     pub fn GetProxyPrivate(obj: *mut JSObject) -> JS::Value;
     pub fn SetProxyPrivate(obj: *mut JSObject, private: *const JS::Value);
     pub fn GetProxyReservedSlot(obj: *mut JSObject, slot: u32) -> JS::Value;
     pub fn SetProxyReservedSlot(obj: *mut JSObject, slot: u32, val: *const JS::Value);
     pub fn RUST_JSID_IS_INT(id: JS::HandleId) -> bool;
     pub fn RUST_JSID_TO_INT(id: JS::HandleId) -> i32;
     pub fn int_to_jsid(i: i32) -> jsid;
     pub fn RUST_JSID_IS_STRING(id: JS::HandleId) -> bool;
--- a/js/rust/src/jsglue.cpp
+++ b/js/rust/src/jsglue.cpp
@@ -457,20 +457,20 @@ JSObject* WrapperNew(JSContext* aCx, JS:
   js::WrapperOptions options;
   if (aClass) {
     options.setClass(aClass);
   }
   options.setSingleton(aSingleton);
   return js::Wrapper::New(aCx, aObj, (const js::Wrapper*)aHandler, options);
 }
 
-const js::Class WindowProxyClass = PROXY_CLASS_DEF(
+const JSClass WindowProxyClass = PROXY_CLASS_DEF(
     "Proxy", JSCLASS_HAS_RESERVED_SLOTS(1)); /* additional class flags */
 
-const js::Class* GetWindowProxyClass() { return &WindowProxyClass; }
+const JSClass* GetWindowProxyClass() { return &WindowProxyClass; }
 
 JS::Value GetProxyReservedSlot(JSObject* obj, uint32_t slot) {
   return js::GetProxyReservedSlot(obj, slot);
 }
 
 void SetProxyReservedSlot(JSObject* obj, uint32_t slot, const JS::Value* val) {
   js::SetProxyReservedSlot(obj, slot, *val);
 }
--- a/js/src/builtin/Array.cpp
+++ b/js/src/builtin/Array.cpp
@@ -3988,17 +3988,17 @@ static const ClassSpec ArrayObjectClassS
                              &jit::JitInfo_Array>,
     CreateArrayPrototype,
     array_static_methods,
     array_static_props,
     array_methods,
     nullptr,
     array_proto_finish};
 
-const Class ArrayObject::class_ = {
+const JSClass ArrayObject::class_ = {
     "Array",
     JSCLASS_HAS_CACHED_PROTO(JSProto_Array) | JSCLASS_DELAY_METADATA_BUILDER,
     &ArrayObjectClassOps, &ArrayObjectClassSpec};
 
 /*
  * Array allocation functions.
  */
 
--- a/js/src/builtin/AtomicsObject.cpp
+++ b/js/src/builtin/AtomicsObject.cpp
@@ -67,18 +67,18 @@
 #include "vm/Time.h"
 #include "vm/TypedArrayObject.h"
 #include "wasm/WasmInstance.h"
 
 #include "vm/JSObject-inl.h"
 
 using namespace js;
 
-const Class AtomicsObject::class_ = {"Atomics",
-                                     JSCLASS_HAS_CACHED_PROTO(JSProto_Atomics)};
+const JSClass AtomicsObject::class_ = {
+    "Atomics", JSCLASS_HAS_CACHED_PROTO(JSProto_Atomics)};
 
 static bool ReportBadArrayType(JSContext* cx) {
   JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
                             JSMSG_ATOMICS_BAD_ARRAY);
   return false;
 }
 
 static bool ReportOutOfRange(JSContext* cx) {
--- a/js/src/builtin/AtomicsObject.h
+++ b/js/src/builtin/AtomicsObject.h
@@ -18,17 +18,17 @@
 
 namespace js {
 
 class GlobalObject;
 class SharedArrayRawBuffer;
 
 class AtomicsObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
   static JSObject* initClass(JSContext* cx, Handle<GlobalObject*> global);
   static MOZ_MUST_USE bool toString(JSContext* cx, unsigned int argc,
                                     Value* vp);
 };
 
 MOZ_MUST_USE bool atomics_compareExchange(JSContext* cx, unsigned argc,
                                           Value* vp);
 MOZ_MUST_USE bool atomics_exchange(JSContext* cx, unsigned argc, Value* vp);
--- a/js/src/builtin/BigInt.cpp
+++ b/js/src/builtin/BigInt.cpp
@@ -205,23 +205,23 @@ const ClassSpec BigIntObject::classSpec_
     GenericCreateConstructor<BigIntConstructor, 1, gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<BigIntObject>,
     BigIntObject::staticMethods,
     nullptr,
     BigIntObject::methods,
     BigIntObject::properties};
 
 // The class is named "Object" as a workaround for bug 1277801.
-const Class BigIntObject::class_ = {
+const JSClass BigIntObject::class_ = {
     "Object",
     JSCLASS_HAS_CACHED_PROTO(JSProto_BigInt) |
         JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS),
     JS_NULL_CLASS_OPS, &BigIntObject::classSpec_};
 
-const Class BigIntObject::protoClass_ = {
+const JSClass BigIntObject::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_BigInt), JS_NULL_CLASS_OPS,
     &BigIntObject::classSpec_};
 
 const JSPropertySpec BigIntObject::properties[] = {
     // BigInt proposal section 5.3.5
     JS_STRING_SYM_PS(toStringTag, "BigInt", JSPROP_READONLY), JS_PS_END};
 
 const JSFunctionSpec BigIntObject::methods[] = {
--- a/js/src/builtin/BigInt.h
+++ b/js/src/builtin/BigInt.h
@@ -17,18 +17,18 @@ namespace js {
 class GlobalObject;
 
 class BigIntObject : public NativeObject {
   static const unsigned PRIMITIVE_VALUE_SLOT = 0;
   static const unsigned RESERVED_SLOTS = 1;
 
  public:
   static const ClassSpec classSpec_;
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   static JSObject* create(JSContext* cx, JS::Handle<JS::BigInt*> bi);
 
   // Methods defined on BigInt.prototype.
   static bool valueOf_impl(JSContext* cx, const CallArgs& args);
   static bool valueOf(JSContext* cx, unsigned argc, JS::Value* vp);
   static bool toString_impl(JSContext* cx, const CallArgs& args);
   static bool toString(JSContext* cx, unsigned argc, JS::Value* vp);
--- a/js/src/builtin/Boolean.cpp
+++ b/js/src/builtin/Boolean.cpp
@@ -22,17 +22,17 @@
 #include "vm/JSContext.h"
 #include "vm/JSObject.h"
 #include "vm/ProxyObject.h"
 
 #include "vm/BooleanObject-inl.h"
 
 using namespace js;
 
-const Class BooleanObject::class_ = {
+const JSClass BooleanObject::class_ = {
     "Boolean",
     JSCLASS_HAS_RESERVED_SLOTS(1) | JSCLASS_HAS_CACHED_PROTO(JSProto_Boolean)};
 
 MOZ_ALWAYS_INLINE bool IsBoolean(HandleValue v) {
   return v.isBoolean() || (v.isObject() && v.toObject().is<BooleanObject>());
 }
 
 MOZ_ALWAYS_INLINE bool bool_toSource_impl(JSContext* cx, const CallArgs& args) {
--- a/js/src/builtin/DataViewObject.cpp
+++ b/js/src/builtin/DataViewObject.cpp
@@ -997,24 +997,24 @@ const ClassSpec DataViewObject::classSpe
     GenericCreateConstructor<DataViewObject::construct, 1,
                              gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<DataViewObject>,
     nullptr,
     nullptr,
     DataViewObject::methods,
     DataViewObject::properties};
 
-const Class DataViewObject::class_ = {
+const JSClass DataViewObject::class_ = {
     "DataView",
     JSCLASS_HAS_PRIVATE |
         JSCLASS_HAS_RESERVED_SLOTS(DataViewObject::RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_DataView),
     &DataViewObjectClassOps, &DataViewObject::classSpec_};
 
-const Class DataViewObject::protoClass_ = {
+const JSClass DataViewObject::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_DataView),
     JS_NULL_CLASS_OPS, &DataViewObject::classSpec_};
 
 const JSFunctionSpec DataViewObject::methods[] = {
     JS_FN("getInt8", DataViewObject::fun_getInt8, 1, 0),
     JS_FN("getUint8", DataViewObject::fun_getUint8, 1, 0),
     JS_FN("getInt16", DataViewObject::fun_getInt16, 1, 0),
     JS_FN("getUint16", DataViewObject::fun_getUint16, 1, 0),
--- a/js/src/builtin/DataViewObject.h
+++ b/js/src/builtin/DataViewObject.h
@@ -57,18 +57,18 @@ class DataViewObject : public ArrayBuffe
   static bool constructWrapped(JSContext* cx, HandleObject bufobj,
                                const CallArgs& args);
 
   static DataViewObject* create(
       JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
       Handle<ArrayBufferObjectMaybeShared*> arrayBuffer, HandleObject proto);
 
  public:
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   static Value byteOffsetValue(const DataViewObject* view) {
     Value v = view->getFixedSlot(BYTEOFFSET_SLOT);
     MOZ_ASSERT(v.toInt32() >= 0);
     return v;
   }
 
   static Value byteLengthValue(const DataViewObject* view) {
--- a/js/src/builtin/JSON.cpp
+++ b/js/src/builtin/JSON.cpp
@@ -35,18 +35,18 @@ using namespace js;
 
 using mozilla::CheckedInt;
 using mozilla::IsFinite;
 using mozilla::Maybe;
 using mozilla::RangedPtr;
 
 using JS::AutoStableStringChars;
 
-const Class js::JSONClass = {js_JSON_str,
-                             JSCLASS_HAS_CACHED_PROTO(JSProto_JSON)};
+const JSClass js::JSONClass = {js_JSON_str,
+                               JSCLASS_HAS_CACHED_PROTO(JSProto_JSON)};
 
 /* ES5 15.12.3 Quote.
  * Requires that the destination has enough space allocated for src after
  * escaping (that is, `2 + 6 * (srcEnd - srcBegin)` characters).
  */
 template <typename SrcCharT, typename DstCharT>
 static MOZ_ALWAYS_INLINE RangedPtr<DstCharT> InfallibleQuote(
     RangedPtr<const SrcCharT> srcBegin, RangedPtr<const SrcCharT> srcEnd,
--- a/js/src/builtin/JSON.h
+++ b/js/src/builtin/JSON.h
@@ -13,17 +13,17 @@
 
 #include "js/RootingAPI.h"
 
 namespace js {
 
 class GlobalObject;
 class StringBuffer;
 
-extern const Class JSONClass;
+extern const JSClass JSONClass;
 
 extern JSObject* InitJSONClass(JSContext* cx, Handle<GlobalObject*> obj);
 
 enum class StringifyBehavior { Normal, RestrictedSafe };
 
 /**
  * If maybeSafely is true, Stringify will attempt to assert the API requirements
  * of JS::ToJSONMaybeSafely as it traverses the graph, and will not try to
--- a/js/src/builtin/MapObject.cpp
+++ b/js/src/builtin/MapObject.cpp
@@ -131,17 +131,17 @@ static const JSClassOps MapIteratorObjec
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     MapIteratorObject::finalize};
 
 static const ClassExtension MapIteratorObjectClassExtension = {
     MapIteratorObject::objectMoved};
 
-const Class MapIteratorObject::class_ = {
+const JSClass MapIteratorObject::class_ = {
     "Map Iterator",
     JSCLASS_HAS_RESERVED_SLOTS(MapIteratorObject::SlotCount) |
         JSCLASS_FOREGROUND_FINALIZE | JSCLASS_SKIP_NURSERY_FINALIZE,
     &MapIteratorObjectClassOps, JS_NULL_CLASS_SPEC,
     &MapIteratorObjectClassExtension};
 
 const JSFunctionSpec MapIteratorObject::methods[] = {
     JS_SELF_HOSTED_FN("next", "MapIteratorNext", 0, 0), JS_FS_END};
@@ -387,24 +387,24 @@ const ClassSpec MapObject::classSpec_ = 
     GenericCreateConstructor<MapObject::construct, 0, gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<MapObject>,
     nullptr,
     MapObject::staticProperties,
     MapObject::methods,
     MapObject::properties,
 };
 
-const Class MapObject::class_ = {
+const JSClass MapObject::class_ = {
     "Map",
     JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(MapObject::SlotCount) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_Map) | JSCLASS_FOREGROUND_FINALIZE |
         JSCLASS_SKIP_NURSERY_FINALIZE,
     &MapObject::classOps_, &MapObject::classSpec_};
 
-const Class MapObject::protoClass_ = {
+const JSClass MapObject::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_Map), JS_NULL_CLASS_OPS,
     &MapObject::classSpec_};
 
 const JSPropertySpec MapObject::properties[] = {
     JS_PSG("size", size, 0),
     JS_STRING_SYM_PS(toStringTag, "Map", JSPROP_READONLY), JS_PS_END};
 
 const JSFunctionSpec MapObject::methods[] = {
@@ -913,17 +913,17 @@ static const JSClassOps SetIteratorObjec
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     SetIteratorObject::finalize};
 
 static const ClassExtension SetIteratorObjectClassExtension = {
     SetIteratorObject::objectMoved};
 
-const Class SetIteratorObject::class_ = {
+const JSClass SetIteratorObject::class_ = {
     "Set Iterator",
     JSCLASS_HAS_RESERVED_SLOTS(SetIteratorObject::SlotCount) |
         JSCLASS_FOREGROUND_FINALIZE | JSCLASS_SKIP_NURSERY_FINALIZE,
     &SetIteratorObjectClassOps, JS_NULL_CLASS_SPEC,
     &SetIteratorObjectClassExtension};
 
 const JSFunctionSpec SetIteratorObject::methods[] = {
     JS_SELF_HOSTED_FN("next", "SetIteratorNext", 0, 0), JS_FS_END};
@@ -1137,26 +1137,26 @@ const ClassSpec SetObject::classSpec_ = 
     GenericCreateConstructor<SetObject::construct, 0, gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<SetObject>,
     nullptr,
     SetObject::staticProperties,
     SetObject::methods,
     SetObject::properties,
 };
 
-const Class SetObject::class_ = {
+const JSClass SetObject::class_ = {
     "Set",
     JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(SetObject::SlotCount) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_Set) | JSCLASS_FOREGROUND_FINALIZE |
         JSCLASS_SKIP_NURSERY_FINALIZE,
     &SetObject::classOps_,
     &SetObject::classSpec_,
 };
 
-const Class SetObject::protoClass_ = {
+const JSClass SetObject::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_Set), JS_NULL_CLASS_OPS,
     &SetObject::classSpec_};
 
 const JSPropertySpec SetObject::properties[] = {
     JS_PSG("size", size, 0),
     JS_STRING_SYM_PS(toStringTag, "Set", JSPROP_READONLY), JS_PS_END};
 
 const JSFunctionSpec SetObject::methods[] = {
--- a/js/src/builtin/MapObject.h
+++ b/js/src/builtin/MapObject.h
@@ -100,18 +100,18 @@ class MapObject : public NativeObject {
   static_assert(Values == ITEM_KIND_VALUE,
                 "IteratorKind Values must match self-hosting define for item "
                 "kind value.");
   static_assert(
       Entries == ITEM_KIND_KEY_AND_VALUE,
       "IteratorKind Entries must match self-hosting define for item kind "
       "key-and-value.");
 
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   enum { NurseryKeysSlot, HasNurseryMemorySlot, SlotCount };
 
   static MOZ_MUST_USE bool getKeysAndValuesInterleaved(
       HandleObject obj, JS::MutableHandle<GCVector<JS::Value>> entries);
   static MOZ_MUST_USE bool entries(JSContext* cx, unsigned argc, Value* vp);
   static MOZ_MUST_USE bool has(JSContext* cx, unsigned argc, Value* vp);
   static MapObject* create(JSContext* cx, HandleObject proto = nullptr);
@@ -176,17 +176,17 @@ class MapObject : public NativeObject {
   static MOZ_MUST_USE bool values(JSContext* cx, unsigned argc, Value* vp);
   static MOZ_MUST_USE bool entries_impl(JSContext* cx, const CallArgs& args);
   static MOZ_MUST_USE bool clear_impl(JSContext* cx, const CallArgs& args);
   static MOZ_MUST_USE bool clear(JSContext* cx, unsigned argc, Value* vp);
 };
 
 class MapIteratorObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   enum { TargetSlot, RangeSlot, KindSlot, SlotCount };
 
   static_assert(
       TargetSlot == ITERATOR_SLOT_TARGET,
       "TargetSlot must match self-hosting define for iterated object slot.");
   static_assert(
       RangeSlot == ITERATOR_SLOT_RANGE,
@@ -220,18 +220,18 @@ class SetObject : public NativeObject {
   static_assert(Values == ITEM_KIND_VALUE,
                 "IteratorKind Values must match self-hosting define for item "
                 "kind value.");
   static_assert(
       Entries == ITEM_KIND_KEY_AND_VALUE,
       "IteratorKind Entries must match self-hosting define for item kind "
       "key-and-value.");
 
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   enum { NurseryKeysSlot, HasNurseryMemorySlot, SlotCount };
 
   static MOZ_MUST_USE bool keys(JSContext* cx, HandleObject obj,
                                 JS::MutableHandle<GCVector<JS::Value>> keys);
   static MOZ_MUST_USE bool values(JSContext* cx, unsigned argc, Value* vp);
   static MOZ_MUST_USE bool add(JSContext* cx, HandleObject obj,
                                HandleValue key);
@@ -289,17 +289,17 @@ class SetObject : public NativeObject {
   static MOZ_MUST_USE bool entries_impl(JSContext* cx, const CallArgs& args);
   static MOZ_MUST_USE bool entries(JSContext* cx, unsigned argc, Value* vp);
   static MOZ_MUST_USE bool clear_impl(JSContext* cx, const CallArgs& args);
   static MOZ_MUST_USE bool clear(JSContext* cx, unsigned argc, Value* vp);
 };
 
 class SetIteratorObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   enum { TargetSlot, RangeSlot, KindSlot, SlotCount };
 
   static_assert(
       TargetSlot == ITERATOR_SLOT_TARGET,
       "TargetSlot must match self-hosting define for iterated object slot.");
   static_assert(
       RangeSlot == ITERATOR_SLOT_RANGE,
--- a/js/src/builtin/ModuleObject.cpp
+++ b/js/src/builtin/ModuleObject.cpp
@@ -76,17 +76,17 @@ static bool ModuleValueGetter(JSContext*
     MOZ_ASSERT(value.toNumber() >= 0);           \
     if (value.isInt32()) return value.toInt32(); \
     return JS::ToUint32(value.toDouble());       \
   }
 
 ///////////////////////////////////////////////////////////////////////////
 // ImportEntryObject
 
-/* static */ const Class ImportEntryObject::class_ = {
+/* static */ const JSClass ImportEntryObject::class_ = {
     "ImportEntry", JSCLASS_HAS_RESERVED_SLOTS(ImportEntryObject::SlotCount)};
 
 DEFINE_GETTER_FUNCTIONS(ImportEntryObject, moduleRequest, ModuleRequestSlot)
 DEFINE_GETTER_FUNCTIONS(ImportEntryObject, importName, ImportNameSlot)
 DEFINE_GETTER_FUNCTIONS(ImportEntryObject, localName, LocalNameSlot)
 DEFINE_GETTER_FUNCTIONS(ImportEntryObject, lineNumber, LineNumberSlot)
 DEFINE_GETTER_FUNCTIONS(ImportEntryObject, columnNumber, ColumnNumberSlot)
 
@@ -148,17 +148,17 @@ ImportEntryObject* ImportEntryObject::cr
   self->initReservedSlot(LineNumberSlot, NumberValue(lineNumber));
   self->initReservedSlot(ColumnNumberSlot, NumberValue(columnNumber));
   return self;
 }
 
 ///////////////////////////////////////////////////////////////////////////
 // ExportEntryObject
 
-/* static */ const Class ExportEntryObject::class_ = {
+/* static */ const JSClass ExportEntryObject::class_ = {
     "ExportEntry", JSCLASS_HAS_RESERVED_SLOTS(ExportEntryObject::SlotCount)};
 
 DEFINE_GETTER_FUNCTIONS(ExportEntryObject, exportName, ExportNameSlot)
 DEFINE_GETTER_FUNCTIONS(ExportEntryObject, moduleRequest, ModuleRequestSlot)
 DEFINE_GETTER_FUNCTIONS(ExportEntryObject, importName, ImportNameSlot)
 DEFINE_GETTER_FUNCTIONS(ExportEntryObject, localName, LocalNameSlot)
 DEFINE_GETTER_FUNCTIONS(ExportEntryObject, lineNumber, LineNumberSlot)
 DEFINE_GETTER_FUNCTIONS(ExportEntryObject, columnNumber, ColumnNumberSlot)
@@ -233,17 +233,17 @@ ExportEntryObject* ExportEntryObject::cr
   self->initReservedSlot(LineNumberSlot, NumberValue(lineNumber));
   self->initReservedSlot(ColumnNumberSlot, NumberValue(columnNumber));
   return self;
 }
 
 ///////////////////////////////////////////////////////////////////////////
 // RequestedModuleObject
 
-/* static */ const Class RequestedModuleObject::class_ = {
+/* static */ const JSClass RequestedModuleObject::class_ = {
     "RequestedModule",
     JSCLASS_HAS_RESERVED_SLOTS(RequestedModuleObject::SlotCount)};
 
 DEFINE_GETTER_FUNCTIONS(RequestedModuleObject, moduleSpecifier,
                         ModuleSpecifierSlot)
 DEFINE_GETTER_FUNCTIONS(RequestedModuleObject, lineNumber, LineNumberSlot)
 DEFINE_GETTER_FUNCTIONS(RequestedModuleObject, columnNumber, ColumnNumberSlot)
 
@@ -710,17 +710,17 @@ void FunctionDeclaration::trace(JSTracer
     nullptr, /* resolve     */
     nullptr, /* mayResolve  */
     ModuleObject::finalize,
     nullptr, /* call        */
     nullptr, /* hasInstance */
     nullptr, /* construct   */
     ModuleObject::trace};
 
-/* static */ const Class ModuleObject::class_ = {
+/* static */ const JSClass ModuleObject::class_ = {
     "Module",
     JSCLASS_HAS_RESERVED_SLOTS(ModuleObject::SlotCount) |
         JSCLASS_BACKGROUND_FINALIZE,
     &ModuleObject::classOps_};
 
 #define DEFINE_ARRAY_SLOT_ACCESSOR(cls, name, slot)                 \
   ArrayObject& cls::name() const {                                  \
     return getReservedSlot(cls::slot).toObject().as<ArrayObject>(); \
--- a/js/src/builtin/ModuleObject.h
+++ b/js/src/builtin/ModuleObject.h
@@ -36,17 +36,17 @@ class ImportEntryObject : public NativeO
     ModuleRequestSlot = 0,
     ImportNameSlot,
     LocalNameSlot,
     LineNumberSlot,
     ColumnNumberSlot,
     SlotCount
   };
 
-  static const Class class_;
+  static const JSClass class_;
   static bool isInstance(HandleValue value);
   static ImportEntryObject* create(JSContext* cx, HandleAtom moduleRequest,
                                    HandleAtom importName, HandleAtom localName,
                                    uint32_t lineNumber, uint32_t columnNumber);
   JSAtom* moduleRequest() const;
   JSAtom* importName() const;
   JSAtom* localName() const;
   uint32_t lineNumber() const;
@@ -63,17 +63,17 @@ class ExportEntryObject : public NativeO
     ModuleRequestSlot,
     ImportNameSlot,
     LocalNameSlot,
     LineNumberSlot,
     ColumnNumberSlot,
     SlotCount
   };
 
-  static const Class class_;
+  static const JSClass class_;
   static bool isInstance(HandleValue value);
   static ExportEntryObject* create(JSContext* cx, HandleAtom maybeExportName,
                                    HandleAtom maybeModuleRequest,
                                    HandleAtom maybeImportName,
                                    HandleAtom maybeLocalName,
                                    uint32_t lineNumber, uint32_t columnNumber);
   JSAtom* exportName() const;
   JSAtom* moduleRequest() const;
@@ -85,17 +85,17 @@ class ExportEntryObject : public NativeO
 
 typedef Rooted<ExportEntryObject*> RootedExportEntryObject;
 typedef Handle<ExportEntryObject*> HandleExportEntryObject;
 
 class RequestedModuleObject : public NativeObject {
  public:
   enum { ModuleSpecifierSlot = 0, LineNumberSlot, ColumnNumberSlot, SlotCount };
 
-  static const Class class_;
+  static const JSClass class_;
   static bool isInstance(HandleValue value);
   static RequestedModuleObject* create(JSContext* cx,
                                        HandleAtom moduleSpecifier,
                                        uint32_t lineNumber,
                                        uint32_t columnNumber);
   JSAtom* moduleSpecifier() const;
   uint32_t lineNumber() const;
   uint32_t columnNumber() const;
@@ -251,17 +251,17 @@ class ModuleObject : public NativeObject
                 "StatusSlot must match self-hosting define");
   static_assert(EvaluationErrorSlot == MODULE_OBJECT_EVALUATION_ERROR_SLOT,
                 "EvaluationErrorSlot must match self-hosting define");
   static_assert(DFSIndexSlot == MODULE_OBJECT_DFS_INDEX_SLOT,
                 "DFSIndexSlot must match self-hosting define");
   static_assert(DFSAncestorIndexSlot == MODULE_OBJECT_DFS_ANCESTOR_INDEX_SLOT,
                 "DFSAncestorIndexSlot must match self-hosting define");
 
-  static const Class class_;
+  static const JSClass class_;
 
   static bool isInstance(HandleValue value);
 
   static ModuleObject* create(JSContext* cx);
   void init(HandleScript script);
   void setInitialEnvironment(
       Handle<ModuleEnvironmentObject*> initialEnvironment);
   void initImportExportData(HandleArrayObject requestedModules,
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -514,17 +514,17 @@ static bool GetBuiltinTagSlow(JSContext*
         }
       }
       builtinTag.set(nullptr);
       return true;
   }
 }
 
 static MOZ_ALWAYS_INLINE JSString* GetBuiltinTagFast(JSObject* obj,
-                                                     const Class* clasp,
+                                                     const JSClass* clasp,
                                                      JSContext* cx) {
   MOZ_ASSERT(clasp == obj->getClass());
   MOZ_ASSERT(!clasp->isProxy());
 
   // Optimize the non-proxy case to bypass GetBuiltinClass.
   if (clasp == &PlainObject::class_) {
     // This is not handled by GetBuiltinTagSlow, but this case is by far
     // the most common so we optimize it here.
@@ -593,17 +593,17 @@ bool js::obj_toString(JSContext* cx, uns
 
   // Step 3.
   RootedObject obj(cx, ToObject(cx, args.thisv()));
   if (!obj) {
     return false;
   }
 
   RootedString builtinTag(cx);
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   if (MOZ_UNLIKELY(clasp->isProxy())) {
     if (!GetBuiltinTagSlow(cx, obj, &builtinTag)) {
       return false;
     }
   } else {
     builtinTag = GetBuiltinTagFast(obj, clasp, cx);
 #ifdef DEBUG
     // Assert this fast path is correct and matches BuiltinTagSlow. The
@@ -663,17 +663,17 @@ bool js::obj_toString(JSContext* cx, uns
     return false;
   }
 
   args.rval().setString(str);
   return true;
 }
 
 JSString* js::ObjectClassToString(JSContext* cx, HandleObject obj) {
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
 
   if (JSString* tag = GetBuiltinTagFast(obj, clasp, cx)) {
     return tag;
   }
 
   const char* className = clasp->name;
   StringBuffer sb(cx);
   if (!sb.append("[object ") || !sb.append(className, strlen(className)) ||
@@ -2061,13 +2061,13 @@ static bool FinishObjectClassInit(JSCont
 }
 
 static const ClassSpec PlainObjectClassSpec = {
     CreateObjectConstructor, CreateObjectPrototype,
     object_static_methods,   nullptr,
     object_methods,          object_properties,
     FinishObjectClassInit};
 
-const Class PlainObject::class_ = {js_Object_str,
-                                   JSCLASS_HAS_CACHED_PROTO(JSProto_Object),
-                                   JS_NULL_CLASS_OPS, &PlainObjectClassSpec};
+const JSClass PlainObject::class_ = {js_Object_str,
+                                     JSCLASS_HAS_CACHED_PROTO(JSProto_Object),
+                                     JS_NULL_CLASS_OPS, &PlainObjectClassSpec};
 
-const Class* const js::ObjectClassPtr = &PlainObject::class_;
+const JSClass* const js::ObjectClassPtr = &PlainObject::class_;
--- a/js/src/builtin/Promise.cpp
+++ b/js/src/builtin/Promise.cpp
@@ -206,17 +206,17 @@ class MutableWrappedPtrOperations<Promis
     return MutableHandleObject::fromMarkedLocation(&capability().reject);
   }
 };
 
 }  // namespace js
 
 class PromiseAllDataHolder : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
   JSObject* promiseObj() {
     return &getFixedSlot(PromiseAllDataHolderSlot_Promise).toObject();
   }
   JSObject* resolveObj() {
     return &getFixedSlot(PromiseAllDataHolderSlot_ResolveFunction).toObject();
   }
   Value valuesArray() {
     return getFixedSlot(PromiseAllDataHolderSlot_ValuesArray);
@@ -237,17 +237,17 @@ class PromiseAllDataHolder : public Nati
         getFixedSlot(PromiseAllDataHolderSlot_RemainingElements).toInt32();
     remainingCount--;
     setFixedSlot(PromiseAllDataHolderSlot_RemainingElements,
                  Int32Value(remainingCount));
     return remainingCount;
   }
 };
 
-const Class PromiseAllDataHolder::class_ = {
+const JSClass PromiseAllDataHolder::class_ = {
     "PromiseAllDataHolder",
     JSCLASS_HAS_RESERVED_SLOTS(PromiseAllDataHolderSlots)};
 
 static PromiseAllDataHolder* NewPromiseAllDataHolder(JSContext* cx,
                                                      HandleObject resultPromise,
                                                      HandleValue valuesArray,
                                                      HandleObject resolve) {
   PromiseAllDataHolder* dataHolder =
@@ -296,17 +296,17 @@ class PromiseDebugInfo : public NativeOb
     Slot_ResolutionSite,
     Slot_AllocationTime,
     Slot_ResolutionTime,
     Slot_Id,
     SlotCount
   };
 
  public:
-  static const Class class_;
+  static const JSClass class_;
   static PromiseDebugInfo* create(
       JSContext* cx, Handle<PromiseObject*> promise,
       const mozilla::Maybe<mozilla::TimeStamp>& maybeNow) {
     Rooted<PromiseDebugInfo*> debugInfo(
         cx, NewBuiltinClassInstance<PromiseDebugInfo>(cx));
     if (!debugInfo) {
       return nullptr;
     }
@@ -419,18 +419,18 @@ class PromiseDebugInfo : public NativeOb
     }
 
     debugInfo->setFixedSlot(Slot_ResolutionSite, ObjectOrNullValue(stack));
     debugInfo->setFixedSlot(Slot_ResolutionTime,
                             DoubleValue(MillisecondsSinceStartup(maybeNow)));
   }
 };
 
-const Class PromiseDebugInfo::class_ = {"PromiseDebugInfo",
-                                        JSCLASS_HAS_RESERVED_SLOTS(SlotCount)};
+const JSClass PromiseDebugInfo::class_ = {
+    "PromiseDebugInfo", JSCLASS_HAS_RESERVED_SLOTS(SlotCount)};
 
 double PromiseObject::allocationTime() {
   auto debugInfo = PromiseDebugInfo::FromPromise(this);
   if (debugInfo) {
     return debugInfo->allocationTime();
   }
   return 0;
 }
@@ -588,17 +588,17 @@ class PromiseReactionRecord : public Nat
   uint32_t handlerArgSlot() {
     MOZ_ASSERT(targetState() != JS::PromiseState::Pending);
     return targetState() == JS::PromiseState::Fulfilled
                ? ReactionRecordSlot_OnFulfilledArg
                : ReactionRecordSlot_OnRejectedArg;
   }
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   JSObject* promise() {
     return getFixedSlot(ReactionRecordSlot_Promise).toObjectOrNull();
   }
   int32_t flags() { return getFixedSlot(ReactionRecordSlot_Flags).toInt32(); }
   JS::PromiseState targetState() {
     int32_t flags = this->flags();
     if (!(flags & REACTION_FLAG_RESOLVED)) {
@@ -684,17 +684,17 @@ class PromiseReactionRecord : public Nat
   JSObject* getAndClearIncumbentGlobalObject() {
     JSObject* obj =
         getFixedSlot(ReactionRecordSlot_IncumbentGlobalObject).toObjectOrNull();
     setFixedSlot(ReactionRecordSlot_IncumbentGlobalObject, UndefinedValue());
     return obj;
   }
 };
 
-const Class PromiseReactionRecord::class_ = {
+const JSClass PromiseReactionRecord::class_ = {
     "PromiseReactionRecord", JSCLASS_HAS_RESERVED_SLOTS(ReactionRecordSlots)};
 
 static void AddPromiseFlags(PromiseObject& promise, int32_t flag) {
   int32_t flags = promise.flags();
   promise.setFixedSlot(PromiseSlot_Flags, Int32Value(flags | flag));
 }
 
 static void RemovePromiseFlags(PromiseObject& promise, int32_t flag) {
@@ -5780,18 +5780,18 @@ static const JSPropertySpec promise_stat
 static const ClassSpec PromiseObjectClassSpec = {
     GenericCreateConstructor<PromiseConstructor, 1, gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<PromiseObject>,
     promise_static_methods,
     promise_static_properties,
     promise_methods,
     promise_properties};
 
-const Class PromiseObject::class_ = {
+const JSClass PromiseObject::class_ = {
     "Promise",
     JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_Promise) |
         JSCLASS_HAS_XRAYED_CONSTRUCTOR,
     JS_NULL_CLASS_OPS, &PromiseObjectClassSpec};
 
-const Class PromiseObject::protoClass_ = {
+const JSClass PromiseObject::protoClass_ = {
     "PromiseProto", JSCLASS_HAS_CACHED_PROTO(JSProto_Promise),
     JS_NULL_CLASS_OPS, &PromiseObjectClassSpec};
--- a/js/src/builtin/Promise.h
+++ b/js/src/builtin/Promise.h
@@ -81,18 +81,18 @@ enum PromiseSlots {
 // PROMISE_FLAG_REQUIRES_USER_INTERACTION_HANDLING is set.
 #define PROMISE_FLAG_HAD_USER_INTERACTION_UPON_CREATION 0x40
 
 class AutoSetNewObjectMetadata;
 
 class PromiseObject : public NativeObject {
  public:
   static const unsigned RESERVED_SLOTS = PromiseSlots;
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
   static PromiseObject* create(JSContext* cx, HandleObject executor,
                                HandleObject proto = nullptr,
                                bool needsWrapping = false);
 
   static PromiseObject* createSkippingExecutor(JSContext* cx);
 
   static JSObject* unforgeableResolve(JSContext* cx, HandleValue value);
   static JSObject* unforgeableReject(JSContext* cx, HandleValue value);
--- a/js/src/builtin/RegExp.cpp
+++ b/js/src/builtin/RegExp.cpp
@@ -1804,17 +1804,17 @@ bool js::intrinsic_GetElemBaseForLambda(
   }
 
   /* 'b' must behave like a normal object. */
   if (!b.isObject()) {
     return true;
   }
 
   JSObject& bobj = b.toObject();
-  const Class* clasp = bobj.getClass();
+  const JSClass* clasp = bobj.getClass();
   if (!clasp->isNative() || clasp->getOpsLookupProperty() ||
       clasp->getOpsGetProperty()) {
     return true;
   }
 
   args.rval().setObject(bobj);
   return true;
 }
--- a/js/src/builtin/Stream.cpp
+++ b/js/src/builtin/Stream.cpp
@@ -172,17 +172,17 @@ class ByteStreamChunk : public NativeObj
     enum Slots {
         Slot_Buffer = 0,
         Slot_ByteOffset,
         Slot_ByteLength,
         SlotCount
     };
 
   public:
-    static const Class class_;
+    static const JSClass class_;
 
     ArrayBufferObject* buffer() {
         return &getFixedSlot(Slot_Buffer).toObject().as<ArrayBufferObject>();
     }
     uint32_t byteOffset() { return getFixedSlot(Slot_ByteOffset).toInt32(); }
     void SetByteOffset(uint32_t offset) {
         setFixedSlot(Slot_ByteOffset, Int32Value(offset));
     }
@@ -201,17 +201,17 @@ class ByteStreamChunk : public NativeObj
 
         chunk->setFixedSlot(Slot_Buffer, ObjectValue(*buffer));
         chunk->setFixedSlot(Slot_ByteOffset, Int32Value(byteOffset));
         chunk->setFixedSlot(Slot_ByteLength, Int32Value(byteLength));
         return chunk;
     }
 };
 
-const Class ByteStreamChunk::class_ = {
+const JSClass ByteStreamChunk::class_ = {
     "ByteStreamChunk",
     JSCLASS_HAS_RESERVED_SLOTS(SlotCount)
 };
 
 #endif  // user-defined byte streams
 
 class PullIntoDescriptor : public NativeObject {
  private:
@@ -222,17 +222,17 @@ class PullIntoDescriptor : public Native
     Slot_BytesFilled,
     Slot_ElementSize,
     Slot_Ctor,
     Slot_ReaderType,
     SlotCount
   };
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   ArrayBufferObject* buffer() {
     return &getFixedSlot(Slot_buffer).toObject().as<ArrayBufferObject>();
   }
   void setBuffer(ArrayBufferObject* buffer) {
     setFixedSlot(Slot_buffer, ObjectValue(*buffer));
   }
   JSObject* ctor() { return getFixedSlot(Slot_Ctor).toObjectOrNull(); }
@@ -276,25 +276,25 @@ class PullIntoDescriptor : public Native
     descriptor->setFixedSlot(Slot_BytesFilled, Int32Value(bytesFilled));
     descriptor->setFixedSlot(Slot_ElementSize, Int32Value(elementSize));
     descriptor->setFixedSlot(Slot_ReaderType,
                              Int32Value(static_cast<int32_t>(readerType)));
     return descriptor;
   }
 };
 
-const Class PullIntoDescriptor::class_ = {
+const JSClass PullIntoDescriptor::class_ = {
     "PullIntoDescriptor", JSCLASS_HAS_RESERVED_SLOTS(SlotCount)};
 
 class QueueEntry : public NativeObject {
  private:
   enum Slots { Slot_Value = 0, Slot_Size, SlotCount };
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   Value value() { return getFixedSlot(Slot_Value); }
   double size() { return getFixedSlot(Slot_Size).toNumber(); }
 
   static QueueEntry* create(JSContext* cx, HandleValue value, double size) {
     Rooted<QueueEntry*> entry(cx, NewBuiltinClassInstance<QueueEntry>(cx));
     if (!entry) {
       return nullptr;
@@ -302,18 +302,18 @@ class QueueEntry : public NativeObject {
 
     entry->setFixedSlot(Slot_Value, value);
     entry->setFixedSlot(Slot_Size, NumberValue(size));
 
     return entry;
   }
 };
 
-const Class QueueEntry::class_ = {"QueueEntry",
-                                  JSCLASS_HAS_RESERVED_SLOTS(SlotCount)};
+const JSClass QueueEntry::class_ = {"QueueEntry",
+                                    JSCLASS_HAS_RESERVED_SLOTS(SlotCount)};
 
 /**
  * TeeState objects implement the local variables in Streams spec 3.3.9
  * ReadableStreamTee, which are accessed by several algorithms.
  */
 class TeeState : public NativeObject {
  public:
   /**
@@ -354,17 +354,17 @@ class TeeState : public NativeObject {
     Flag_Canceled1 = 1 << 1,
     Flag_Canceled2 = 1 << 2,
     Flag_CloneForBranch2 = 1 << 3,
   };
   uint32_t flags() const { return getFixedSlot(Slot_Flags).toInt32(); }
   void setFlags(uint32_t flags) { setFixedSlot(Slot_Flags, Int32Value(flags)); }
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   bool cloneForBranch2() const { return flags() & Flag_CloneForBranch2; }
 
   bool closedOrErrored() const { return flags() & Flag_ClosedOrErrored; }
   void setClosedOrErrored() {
     MOZ_ASSERT(!(flags() & Flag_ClosedOrErrored));
     setFlags(flags() | Flag_ClosedOrErrored);
   }
@@ -443,40 +443,40 @@ class TeeState : public NativeObject {
       return nullptr;
     }
     state->setFixedSlot(Slot_Stream, ObjectValue(*wrappedStream));
 
     return state;
   }
 };
 
-const Class TeeState::class_ = {"TeeState",
-                                JSCLASS_HAS_RESERVED_SLOTS(SlotCount)};
-
-#define CLASS_SPEC(cls, nCtorArgs, nSlots, specFlags, classFlags, classOps) \
-  const ClassSpec cls::classSpec_ = {                                       \
-      GenericCreateConstructor<cls::constructor, nCtorArgs,                 \
-                               gc::AllocKind::FUNCTION>,                    \
-      GenericCreatePrototype<cls>,                                          \
-      nullptr,                                                              \
-      nullptr,                                                              \
-      cls##_methods,                                                        \
-      cls##_properties,                                                     \
-      nullptr,                                                              \
-      specFlags};                                                           \
-                                                                            \
-  const Class cls::class_ = {#cls,                                          \
-                             JSCLASS_HAS_RESERVED_SLOTS(nSlots) |           \
-                                 JSCLASS_HAS_CACHED_PROTO(JSProto_##cls) |  \
-                                 classFlags,                                \
-                             classOps, &cls::classSpec_};                   \
-                                                                            \
-  const Class cls::protoClass_ = {"object",                                 \
-                                  JSCLASS_HAS_CACHED_PROTO(JSProto_##cls),  \
-                                  JS_NULL_CLASS_OPS, &cls::classSpec_};
+const JSClass TeeState::class_ = {"TeeState",
+                                  JSCLASS_HAS_RESERVED_SLOTS(SlotCount)};
+
+#define CLASS_SPEC(cls, nCtorArgs, nSlots, specFlags, classFlags, classOps)  \
+  const ClassSpec cls::classSpec_ = {                                        \
+      GenericCreateConstructor<cls::constructor, nCtorArgs,                  \
+                               gc::AllocKind::FUNCTION>,                     \
+      GenericCreatePrototype<cls>,                                           \
+      nullptr,                                                               \
+      nullptr,                                                               \
+      cls##_methods,                                                         \
+      cls##_properties,                                                      \
+      nullptr,                                                               \
+      specFlags};                                                            \
+                                                                             \
+  const JSClass cls::class_ = {#cls,                                         \
+                               JSCLASS_HAS_RESERVED_SLOTS(nSlots) |          \
+                                   JSCLASS_HAS_CACHED_PROTO(JSProto_##cls) | \
+                                   classFlags,                               \
+                               classOps, &cls::classSpec_};                  \
+                                                                             \
+  const JSClass cls::protoClass_ = {"object",                                \
+                                    JSCLASS_HAS_CACHED_PROTO(JSProto_##cls), \
+                                    JS_NULL_CLASS_OPS, &cls::classSpec_};
 
 /*** 3.2. Class ReadableStream **********************************************/
 
 static MOZ_MUST_USE bool SetUpExternalReadableByteStreamController(
     JSContext* cx, Handle<ReadableStream*> stream,
     JS::ReadableStreamUnderlyingSource* source);
 
 ReadableStream* ReadableStream::createExternalSourceStream(
@@ -2030,17 +2030,17 @@ static const JSFunctionSpec ReadableStre
     JS_FN("cancel", ReadableStreamDefaultReader_cancel, 1, 0),
     JS_FN("read", ReadableStreamDefaultReader_read, 0, 0),
     JS_FN("releaseLock", ReadableStreamDefaultReader_releaseLock, 0, 0),
     JS_FS_END};
 
 static const JSPropertySpec ReadableStreamDefaultReader_properties[] = {
     JS_PSG("closed", ReadableStreamDefaultReader_closed, 0), JS_PS_END};
 
-const Class ReadableStreamReader::class_ = {"ReadableStreamReader"};
+const JSClass ReadableStreamReader::class_ = {"ReadableStreamReader"};
 
 CLASS_SPEC(ReadableStreamDefaultReader, 1, SlotCount,
            ClassSpec::DontDefineConstructor, 0, JS_NULL_CLASS_OPS);
 
 /*** 3.7. Class ReadableStreamBYOBReader ************************************/
 
 // Not implemented.
 
--- a/js/src/builtin/Stream.h
+++ b/js/src/builtin/Stream.h
@@ -110,19 +110,19 @@ class ReadableStream : public NativeObje
       HandleObject proto = nullptr);
   static ReadableStream* createExternalSourceStream(
       JSContext* cx, JS::ReadableStreamUnderlyingSource* source,
       void* nsISupportsObject_alreadyAddreffed = nullptr,
       HandleObject proto = nullptr);
 
   static bool constructor(JSContext* cx, unsigned argc, Value* vp);
   static const ClassSpec classSpec_;
-  static const Class class_;
+  static const JSClass class_;
   static const ClassSpec protoClassSpec_;
-  static const Class protoClass_;
+  static const JSClass protoClass_;
 };
 
 /**
  * Tells whether or not read() result objects inherit from Object.prototype.
  * Generally, they should do so only if the reader was created by author code.
  * See <https://streams.spec.whatwg.org/#readable-stream-create-read-result>.
  */
 enum class ForAuthorCodeBool { No, Yes };
@@ -194,26 +194,26 @@ class ReadableStreamReader : public Nati
 
   JSObject* closedPromise() const {
     return &getFixedSlot(Slot_ClosedPromise).toObject();
   }
   void setClosedPromise(JSObject* wrappedPromise) {
     setFixedSlot(Slot_ClosedPromise, ObjectValue(*wrappedPromise));
   }
 
-  static const Class class_;
+  static const JSClass class_;
 };
 
 class ReadableStreamDefaultReader : public ReadableStreamReader {
  public:
   static bool constructor(JSContext* cx, unsigned argc, Value* vp);
   static const ClassSpec classSpec_;
-  static const Class class_;
+  static const JSClass class_;
   static const ClassSpec protoClassSpec_;
-  static const Class protoClass_;
+  static const JSClass protoClass_;
 };
 
 /**
  * Common base class of both readable and writable stream controllers.
  */
 class StreamController : public NativeObject {
  public:
   /**
@@ -381,19 +381,19 @@ class ReadableStreamDefaultController : 
  public:
   Value strategySize() const { return getFixedSlot(Slot_StrategySize); }
   void setStrategySize(const Value& size) {
     setFixedSlot(Slot_StrategySize, size);
   }
 
   static bool constructor(JSContext* cx, unsigned argc, Value* vp);
   static const ClassSpec classSpec_;
-  static const Class class_;
+  static const JSClass class_;
   static const ClassSpec protoClassSpec_;
-  static const Class protoClass_;
+  static const JSClass protoClass_;
 };
 
 class ReadableByteStreamController : public ReadableStreamController {
  public:
   /**
    * Memory layout for ReadableByteStreamControllers, starting after the
    * slots shared among all types of controllers.
    *
@@ -421,37 +421,37 @@ class ReadableByteStreamController : pub
     return getFixedSlot(Slot_AutoAllocateSize);
   }
   void setAutoAllocateChunkSize(const Value& size) {
     setFixedSlot(Slot_AutoAllocateSize, size);
   }
 
   static bool constructor(JSContext* cx, unsigned argc, Value* vp);
   static const ClassSpec classSpec_;
-  static const Class class_;
+  static const JSClass class_;
   static const ClassSpec protoClassSpec_;
-  static const Class protoClass_;
+  static const JSClass protoClass_;
 };
 
 class ByteLengthQueuingStrategy : public NativeObject {
  public:
   static bool constructor(JSContext* cx, unsigned argc, Value* vp);
   static const ClassSpec classSpec_;
-  static const Class class_;
+  static const JSClass class_;
   static const ClassSpec protoClassSpec_;
-  static const Class protoClass_;
+  static const JSClass protoClass_;
 };
 
 class CountQueuingStrategy : public NativeObject {
  public:
   static bool constructor(JSContext* cx, unsigned argc, Value* vp);
   static const ClassSpec classSpec_;
-  static const Class class_;
+  static const JSClass class_;
   static const ClassSpec protoClassSpec_;
-  static const Class protoClass_;
+  static const JSClass protoClass_;
 };
 
 }  // namespace js
 
 template <>
 inline bool JSObject::is<js::StreamController>() const {
   return is<js::ReadableStreamDefaultController>() ||
          is<js::ReadableByteStreamController>();
--- a/js/src/builtin/String.cpp
+++ b/js/src/builtin/String.cpp
@@ -440,17 +440,17 @@ static bool str_resolve(JSContext* cx, H
 }
 
 static const JSClassOps StringObjectClassOps = {
     nullptr,                /* addProperty */
     nullptr,                /* delProperty */
     str_enumerate, nullptr, /* newEnumerate */
     str_resolve,   str_mayResolve};
 
-const Class StringObject::class_ = {
+const JSClass StringObject::class_ = {
     js_String_str,
     JSCLASS_HAS_RESERVED_SLOTS(StringObject::RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_String),
     &StringObjectClassOps};
 
 /*
  * Perform the initial |RequireObjectCoercible(thisv)| and |ToString(thisv)|
  * from nearly all String.prototype.* functions.
--- a/js/src/builtin/Symbol.cpp
+++ b/js/src/builtin/Symbol.cpp
@@ -12,17 +12,17 @@
 #include "vm/SymbolType.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
 
 using JS::Symbol;
 using namespace js;
 
-const Class SymbolObject::class_ = {
+const JSClass SymbolObject::class_ = {
     "Symbol", JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS) |
                   JSCLASS_HAS_CACHED_PROTO(JSProto_Symbol)};
 
 SymbolObject* SymbolObject::create(JSContext* cx, JS::HandleSymbol symbol) {
   SymbolObject* obj = NewBuiltinClassInstance<SymbolObject>(cx);
   if (!obj) {
     return nullptr;
   }
--- a/js/src/builtin/Symbol.h
+++ b/js/src/builtin/Symbol.h
@@ -16,17 +16,17 @@ class GlobalObject;
 
 class SymbolObject : public NativeObject {
   /* Stores this Symbol object's [[PrimitiveValue]]. */
   static const unsigned PRIMITIVE_VALUE_SLOT = 0;
 
  public:
   static const unsigned RESERVED_SLOTS = 1;
 
-  static const Class class_;
+  static const JSClass class_;
 
   static JSObject* initClass(JSContext* cx, Handle<GlobalObject*> global,
                              bool defineMembers);
 
   /*
    * Creates a new Symbol object boxing the given primitive Symbol.  The
    * object's [[Prototype]] is determined from context.
    */
--- a/js/src/builtin/TestingFunctions.cpp
+++ b/js/src/builtin/TestingFunctions.cpp
@@ -2932,17 +2932,17 @@ static bool SetIonCheckGraphCoherency(JS
 class CloneBufferObject : public NativeObject {
   static const JSPropertySpec props_[3];
 
   static const size_t DATA_SLOT = 0;
   static const size_t SYNTHETIC_SLOT = 1;
   static const size_t NUM_SLOTS = 2;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static CloneBufferObject* Create(JSContext* cx) {
     RootedObject obj(cx, JS_NewObject(cx, &class_));
     if (!obj) {
       return nullptr;
     }
     obj->as<CloneBufferObject>().setReservedSlot(DATA_SLOT,
                                                  PrivateValue(nullptr));
@@ -3156,17 +3156,17 @@ static const JSClassOps CloneBufferObjec
     nullptr, /* addProperty */
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     CloneBufferObject::Finalize};
 
-const Class CloneBufferObject::class_ = {
+const JSClass CloneBufferObject::class_ = {
     "CloneBuffer",
     JSCLASS_HAS_RESERVED_SLOTS(CloneBufferObject::NUM_SLOTS) |
         JSCLASS_FOREGROUND_FINALIZE,
     &CloneBufferObjectClassOps};
 
 const JSPropertySpec CloneBufferObject::props_[] = {
     JS_PSGS("clonebuffer", getCloneBuffer, setCloneBuffer, 0),
     JS_PSGS("arraybuffer", getCloneBufferAsArrayBuffer, setCloneBuffer, 0),
@@ -4338,17 +4338,17 @@ static bool AllocationMarker(JSContext* 
 
     RootedValue nurseryVal(cx);
     if (!JS_GetProperty(cx, options, "nursery", &nurseryVal)) {
       return false;
     }
     allocateInsideNursery = ToBoolean(nurseryVal);
   }
 
-  static const Class cls = {"AllocationMarker"};
+  static const JSClass cls = {"AllocationMarker"};
 
   auto newKind = allocateInsideNursery ? GenericObject : TenuredObject;
   RootedObject obj(cx, NewObjectWithGivenProto(cx, &cls, nullptr, newKind));
   if (!obj) {
     return false;
   }
 
   args.rval().setObject(*obj);
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -34,17 +34,17 @@
 using mozilla::AssertedCast;
 using mozilla::CheckedInt32;
 using mozilla::IsPowerOfTwo;
 using mozilla::PodCopy;
 using mozilla::PointerRangeSize;
 
 using namespace js;
 
-const Class js::TypedObjectModuleObject::class_ = {
+const JSClass js::TypedObjectModuleObject::class_ = {
     "TypedObject", JSCLASS_HAS_RESERVED_SLOTS(SlotCount) |
                        JSCLASS_HAS_CACHED_PROTO(JSProto_TypedObject)};
 
 static const JSFunctionSpec TypedObjectMethods[] = {
     JS_SELF_HOSTED_FN("objectType", "TypeOfTypedObject", 1, 0), JS_FS_END};
 
 static void ReportCannotConvertTo(JSContext* cx, HandleValue fromValue,
                                   const char* toType) {
@@ -188,17 +188,17 @@ static JSObject* GetPrototype(JSContext*
 /***************************************************************************
  * Typed Prototypes
  *
  * Every type descriptor has an associated prototype. Instances of
  * that type descriptor use this as their prototype. Per the spec,
  * typed object prototypes cannot be mutated.
  */
 
-const Class js::TypedProto::class_ = {
+const JSClass js::TypedProto::class_ = {
     "TypedProto", JSCLASS_HAS_RESERVED_SLOTS(JS_TYPROTO_SLOTS)};
 
 /***************************************************************************
  * Scalar type objects
  *
  * Scalar type objects like `uint8`, `uint16`, are all instances of
  * the ScalarTypeDescr class. Like all type objects, they have a reserved
  * slot pointing to a TypeRepresentation object, which is used to
@@ -209,17 +209,17 @@ static const JSClassOps ScalarTypeDescrC
                                                    nullptr, /* delProperty */
                                                    nullptr, /* enumerate */
                                                    nullptr, /* newEnumerate */
                                                    nullptr, /* resolve */
                                                    nullptr, /* mayResolve */
                                                    TypeDescr::finalize,
                                                    ScalarTypeDescr::call};
 
-const Class js::ScalarTypeDescr::class_ = {
+const JSClass js::ScalarTypeDescr::class_ = {
     "Scalar",
     JSCLASS_HAS_RESERVED_SLOTS(JS_DESCR_SLOTS) | JSCLASS_BACKGROUND_FINALIZE,
     &ScalarTypeDescrClassOps};
 
 const JSFunctionSpec js::ScalarTypeDescr::typeObjectMethods[] = {
     JS_SELF_HOSTED_FN("toSource", "DescrToSource", 0, 0),
     JS_SELF_HOSTED_FN("array", "ArrayShorthand", 1, 0),
     JS_SELF_HOSTED_FN("equivalent", "TypeDescrEquivalent", 1, 0), JS_FS_END};
@@ -363,17 +363,17 @@ static const JSClassOps ReferenceTypeDes
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     TypeDescr::finalize,
     ReferenceTypeDescr::call};
 
-const Class js::ReferenceTypeDescr::class_ = {
+const JSClass js::ReferenceTypeDescr::class_ = {
     "Reference",
     JSCLASS_HAS_RESERVED_SLOTS(JS_DESCR_SLOTS) | JSCLASS_BACKGROUND_FINALIZE,
     &ReferenceTypeDescrClassOps};
 
 const JSFunctionSpec js::ReferenceTypeDescr::typeObjectMethods[] = {
     JS_SELF_HOSTED_FN("toSource", "DescrToSource", 0, 0),
     {JSFunctionSpec::Name("array"), {nullptr, nullptr}, 1, 0, "ArrayShorthand"},
     {JSFunctionSpec::Name("equivalent"),
@@ -505,17 +505,17 @@ static const JSClassOps ArrayTypeDescrCl
                                                   nullptr, /* newEnumerate */
                                                   nullptr, /* resolve */
                                                   nullptr, /* mayResolve */
                                                   TypeDescr::finalize,
                                                   nullptr, /* call */
                                                   nullptr, /* hasInstance */
                                                   TypedObject::construct};
 
-const Class ArrayTypeDescr::class_ = {
+const JSClass ArrayTypeDescr::class_ = {
     "ArrayType",
     JSCLASS_HAS_RESERVED_SLOTS(JS_DESCR_SLOTS) | JSCLASS_BACKGROUND_FINALIZE,
     &ArrayTypeDescrClassOps};
 
 const JSPropertySpec ArrayMetaTypeDescr::typeObjectProperties[] = {JS_PS_END};
 
 const JSFunctionSpec ArrayMetaTypeDescr::typeObjectMethods[] = {
     {JSFunctionSpec::Name("array"), {nullptr, nullptr}, 1, 0, "ArrayShorthand"},
@@ -754,17 +754,17 @@ static const JSClassOps StructTypeDescrC
                                                    nullptr, /* newEnumerate */
                                                    nullptr, /* resolve */
                                                    nullptr, /* mayResolve */
                                                    TypeDescr::finalize,
                                                    StructTypeDescr::call,
                                                    nullptr, /* hasInstance */
                                                    TypedObject::construct};
 
-const Class StructTypeDescr::class_ = {
+const JSClass StructTypeDescr::class_ = {
     "StructType",
     JSCLASS_HAS_RESERVED_SLOTS(JS_DESCR_SLOTS) | JSCLASS_BACKGROUND_FINALIZE,
     &StructTypeDescrClassOps};
 
 const JSPropertySpec StructMetaTypeDescr::typeObjectProperties[] = {JS_PS_END};
 
 const JSFunctionSpec StructMetaTypeDescr::typeObjectMethods[] = {
     {JSFunctionSpec::Name("array"), {nullptr, nullptr}, 1, 0, "ArrayShorthand"},
@@ -1600,17 +1600,17 @@ void OutlineTypedObject::setOwnerAndData
       // catch the actual write, register the owner preemptively now.
       storeBuffer()->putWholeCell(owner);
     }
   }
 }
 
 /*static*/
 OutlineTypedObject* OutlineTypedObject::createUnattachedWithClass(
-    JSContext* cx, const Class* clasp, HandleTypeDescr descr,
+    JSContext* cx, const JSClass* clasp, HandleTypeDescr descr,
     gc::InitialHeap heap) {
   MOZ_ASSERT(clasp == &OutlineTransparentTypedObject::class_ ||
              clasp == &OutlineOpaqueTypedObject::class_);
 
   AutoSetNewObjectMetadata metadata(cx);
 
   RootedObjectGroup group(
       cx, ObjectGroup::defaultNewGroup(
@@ -1673,19 +1673,19 @@ void OutlineTypedObject::attach(JSContex
 
 /*static*/
 OutlineTypedObject* OutlineTypedObject::createDerived(
     JSContext* cx, HandleTypeDescr type, HandleTypedObject typedObj,
     uint32_t offset) {
   MOZ_ASSERT(offset <= typedObj->size());
   MOZ_ASSERT(offset + type->size() <= typedObj->size());
 
-  const js::Class* clasp = typedObj->opaque()
-                               ? &OutlineOpaqueTypedObject::class_
-                               : &OutlineTransparentTypedObject::class_;
+  const JSClass* clasp = typedObj->opaque()
+                             ? &OutlineOpaqueTypedObject::class_
+                             : &OutlineTransparentTypedObject::class_;
   Rooted<OutlineTypedObject*> obj(cx);
   obj = createUnattachedWithClass(cx, clasp, type);
   if (!obj) {
     return nullptr;
   }
 
   obj->attach(cx, *typedObj, offset);
   return obj;
@@ -2185,18 +2185,19 @@ void OutlineTypedObject::notifyBufferDet
  */
 
 /* static */
 InlineTypedObject* InlineTypedObject::create(JSContext* cx,
                                              HandleTypeDescr descr,
                                              gc::InitialHeap heap) {
   gc::AllocKind allocKind = allocKindForTypeDescriptor(descr);
 
-  const Class* clasp = descr->opaque() ? &InlineOpaqueTypedObject::class_
-                                       : &InlineTransparentTypedObject::class_;
+  const JSClass* clasp = descr->opaque()
+                             ? &InlineOpaqueTypedObject::class_
+                             : &InlineTransparentTypedObject::class_;
 
   RootedObjectGroup group(
       cx, ObjectGroup::defaultNewGroup(
               cx, clasp, TaggedProto(&descr->typedProto()), descr));
   if (!group) {
     return nullptr;
   }
 
@@ -2274,36 +2275,36 @@ const ObjectOps TypedObject::objectOps_ 
     TypedObject::obj_getProperty,
     TypedObject::obj_setProperty,
     TypedObject::obj_getOwnPropertyDescriptor,
     TypedObject::obj_deleteProperty,
     nullptr, /* getElements */
     nullptr, /* thisValue */
 };
 
-#define DEFINE_TYPEDOBJ_CLASS(Name, Trace, Moved)                          \
-  static const JSClassOps Name##ClassOps = {                               \
-      nullptr, /* addProperty */                                           \
-      nullptr, /* delProperty */                                           \
-      nullptr, /* enumerate   */                                           \
-      TypedObject::obj_newEnumerate,                                       \
-      nullptr, /* resolve     */                                           \
-      nullptr, /* mayResolve  */                                           \
-      nullptr, /* finalize    */                                           \
-      nullptr, /* call        */                                           \
-      nullptr, /* hasInstance */                                           \
-      nullptr, /* construct   */                                           \
-      Trace,                                                               \
-  };                                                                       \
-  static const ClassExtension Name##ClassExt = {                           \
-      Moved /* objectMovedOp */                                            \
-  };                                                                       \
-  const Class Name::class_ = {                                             \
-      #Name,           Class::NON_NATIVE | JSCLASS_DELAY_METADATA_BUILDER, \
-      &Name##ClassOps, JS_NULL_CLASS_SPEC,                                 \
+#define DEFINE_TYPEDOBJ_CLASS(Name, Trace, Moved)                            \
+  static const JSClassOps Name##ClassOps = {                                 \
+      nullptr, /* addProperty */                                             \
+      nullptr, /* delProperty */                                             \
+      nullptr, /* enumerate   */                                             \
+      TypedObject::obj_newEnumerate,                                         \
+      nullptr, /* resolve     */                                             \
+      nullptr, /* mayResolve  */                                             \
+      nullptr, /* finalize    */                                             \
+      nullptr, /* call        */                                             \
+      nullptr, /* hasInstance */                                             \
+      nullptr, /* construct   */                                             \
+      Trace,                                                                 \
+  };                                                                         \
+  static const ClassExtension Name##ClassExt = {                             \
+      Moved /* objectMovedOp */                                              \
+  };                                                                         \
+  const JSClass Name::class_ = {                                             \
+      #Name,           JSClass::NON_NATIVE | JSCLASS_DELAY_METADATA_BUILDER, \
+      &Name##ClassOps, JS_NULL_CLASS_SPEC,                                   \
       &Name##ClassExt, &TypedObject::objectOps_}
 
 DEFINE_TYPEDOBJ_CLASS(OutlineTransparentTypedObject,
                       OutlineTypedObject::obj_trace, nullptr);
 DEFINE_TYPEDOBJ_CLASS(OutlineOpaqueTypedObject, OutlineTypedObject::obj_trace,
                       nullptr);
 DEFINE_TYPEDOBJ_CLASS(InlineTransparentTypedObject,
                       InlineTypedObject::obj_trace,
@@ -2366,17 +2367,17 @@ bool TypedObject::construct(JSContext* c
   return false;
 }
 
 /* static */ JS::Result<TypedObject*, JS::OOM&> TypedObject::create(
     JSContext* cx, js::gc::AllocKind kind, js::gc::InitialHeap heap,
     js::HandleShape shape, js::HandleObjectGroup group) {
   debugCheckNewObject(group, shape, kind, heap);
 
-  const js::Class* clasp = group->clasp();
+  const JSClass* clasp = group->clasp();
   MOZ_ASSERT(::IsTypedObjectClass(clasp));
 
   JSObject* obj =
       js::AllocateObject(cx, kind, /* nDynamicSlots = */ 0, heap, clasp);
   if (!obj) {
     return cx->alreadyReportedOOM();
   }
 
--- a/js/src/builtin/TypedObject.h
+++ b/js/src/builtin/TypedObject.h
@@ -34,17 +34,17 @@
  * info on the API itself, see the Harmony wiki page at
  * http://wiki.ecmascript.org/doku.php?id=harmony:typed_objects or the
  * ES6 spec (not finalized at the time of this writing).
  *
  * - Initialization:
  *
  * Currently, all "globals" related to typed objects are packaged
  * within a single "module" object `TypedObject`. This module has its
- * own js::Class and when that class is initialized, we also create
+ * own JSClass and when that class is initialized, we also create
  * and define all other values (in `js::InitTypedObjectModuleClass()`).
  *
  * - Type objects, meta type objects, and type representations:
  *
  * There are a number of pre-defined type objects, one for each
  * scalar type (`uint8` etc). Each of these has its own class_,
  * defined in `DefineNumericClass()`.
  *
@@ -134,17 +134,17 @@ class ComplexTypeDescr;
 class StructTypeDescr;
 class TypedProto;
 
 /*
  * The prototype for a typed object.
  */
 class TypedProto : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 };
 
 class TypeDescr : public NativeObject {
  public:
   TypedProto& typedProto() const {
     return getReservedSlot(JS_DESCR_SLOT_TYPROTO).toObject().as<TypedProto>();
   }
 
@@ -205,30 +205,30 @@ class TypeDescr : public NativeObject {
   static void finalize(JSFreeOp* fop, JSObject* obj);
 };
 
 typedef Handle<TypeDescr*> HandleTypeDescr;
 
 class SimpleTypeDescr : public TypeDescr {};
 
 // Type for scalar type constructors like `uint8`. All such type
-// constructors share a common js::Class and JSFunctionSpec. Scalar
+// constructors share a common JSClass and JSFunctionSpec. Scalar
 // types are non-opaque (their storage is visible unless combined with
 // an opaque reference type.)
 class ScalarTypeDescr : public SimpleTypeDescr {
  public:
   typedef Scalar::Type Type;
 
   static const type::Kind Kind = type::Scalar;
   static const bool Opaque = false;
   static uint32_t size(Type t);
   static uint32_t alignment(Type t);
   static const char* typeName(Type type);
 
-  static const Class class_;
+  static const JSClass class_;
   static const JSFunctionSpec typeObjectMethods[];
 
   Type type() const {
     // Make sure the values baked into TypedObjectConstants.h line up with
     // the Scalar::Type enum. We don't define Scalar::Type directly in
     // terms of these constants to avoid making TypedObjectConstants.h a
     // public header file.
     static_assert(
@@ -301,28 +301,28 @@ class ScalarTypeDescr : public SimpleTyp
 enum class ReferenceType {
   TYPE_ANY = JS_REFERENCETYPEREPR_ANY,
   TYPE_OBJECT = JS_REFERENCETYPEREPR_OBJECT,
   TYPE_WASM_ANYREF = JS_REFERENCETYPEREPR_WASM_ANYREF,
   TYPE_STRING = JS_REFERENCETYPEREPR_STRING
 };
 
 // Type for reference type constructors like `Any`, `String`, and
-// `Object`. All such type constructors share a common js::Class and
+// `Object`. All such type constructors share a common JSClass and
 // JSFunctionSpec. All these types are opaque.
 class ReferenceTypeDescr : public SimpleTypeDescr {
  public:
   // Must match order of JS_FOR_EACH_REFERENCE_TYPE_REPR below
   typedef ReferenceType Type;
   static const char* typeName(Type type);
 
   static const int32_t TYPE_MAX = int32_t(ReferenceType::TYPE_STRING) + 1;
   static const type::Kind Kind = type::Reference;
   static const bool Opaque = true;
-  static const Class class_;
+  static const JSClass class_;
   static uint32_t size(Type t);
   static uint32_t alignment(Type t);
   static const JSFunctionSpec typeObjectMethods[];
 
   ReferenceType type() const {
     return (ReferenceType)getReservedSlot(JS_DESCR_SLOT_TYPE).toInt32();
   }
 
@@ -350,17 +350,17 @@ class ComplexTypeDescr : public TypeDesc
   }
 
   bool allowConstruct() const {
     return getReservedSlot(JS_DESCR_SLOT_FLAGS).toInt32() &
            JS_DESCR_FLAG_ALLOW_CONSTRUCT;
   }
 };
 
-bool IsTypedObjectClass(const Class* clasp);  // Defined below
+bool IsTypedObjectClass(const JSClass* clasp);  // Defined below
 bool IsTypedObjectArray(JSObject& obj);
 
 MOZ_MUST_USE bool CreateUserSizeAndAlignmentProperties(JSContext* cx,
                                                        HandleTypeDescr obj);
 
 class ArrayTypeDescr;
 
 /*
@@ -397,17 +397,17 @@ class ArrayMetaTypeDescr : public Native
   static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
 };
 
 /*
  * Type descriptor created by `new ArrayType(type, n)`
  */
 class ArrayTypeDescr : public ComplexTypeDescr {
  public:
-  static const Class class_;
+  static const JSClass class_;
   static const type::Kind Kind = type::Array;
 
   TypeDescr& elementType() const {
     return getReservedSlot(JS_DESCR_SLOT_ARRAY_ELEM_TYPE)
         .toObject()
         .as<TypeDescr>();
   }
 
@@ -479,17 +479,17 @@ class StructMetaTypeDescr : public Nativ
     // alignment and returns that size.  If `alignment` is not NULL then
     // return the structure alignment through that pointer.
     mozilla::CheckedInt32 close(int32_t* alignment = nullptr);
   };
 };
 
 class StructTypeDescr : public ComplexTypeDescr {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   // Returns the number of fields defined in this struct.
   size_t fieldCount() const;
 
   // Set `*out` to the index of the field named `id` and returns true,
   // or return false if no such field exists.
   MOZ_MUST_USE bool fieldIndex(jsid id, size_t* out) const;
 
@@ -529,17 +529,17 @@ class TypedObjectModuleObject : public N
     Int64Desc,
     Float32Desc,
     Float64Desc,
     ObjectDesc,
     WasmAnyRefDesc,
     SlotCount
   };
 
-  static const Class class_;
+  static const JSClass class_;
 };
 
 /* Base type for transparent and opaque typed objects. */
 class TypedObject : public JSObject {
   static const bool IsTypedObjectClass = true;
 
   static MOZ_MUST_USE bool obj_getArrayElement(JSContext* cx,
                                                Handle<TypedObject*> typedObj,
@@ -673,17 +673,17 @@ class OutlineTypedObject : public TypedO
 
   void resetOffset(size_t offset) {
     MOZ_ASSERT(offset <= (size_t)size());
     setData(typedMemBase() + offset);
   }
 
   // Helper for createUnattached()
   static OutlineTypedObject* createUnattachedWithClass(
-      JSContext* cx, const Class* clasp, HandleTypeDescr type,
+      JSContext* cx, const JSClass* clasp, HandleTypeDescr type,
       gc::InitialHeap heap = gc::DefaultHeap);
 
   // Creates an unattached typed object or handle (depending on the
   // type parameter T). Note that it is only legal for unattached
   // handles to escape to the end user; for non-handles, the caller
   // should always invoke one of the `attach()` methods below.
   //
   // Arguments:
@@ -709,24 +709,24 @@ class OutlineTypedObject : public TypedO
   void notifyBufferDetached(void* newData);
 
   static void obj_trace(JSTracer* trace, JSObject* object);
 };
 
 // Class for a transparent typed object whose owner is an array buffer.
 class OutlineTransparentTypedObject : public OutlineTypedObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 };
 
 // Class for an opaque typed object whose owner may be either an array buffer
 // or an opaque inlined typed object.
 class OutlineOpaqueTypedObject : public OutlineTypedObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 };
 
 // Class for a typed object whose data is allocated inline.
 class InlineTypedObject : public TypedObject {
   friend class TypedObject;
 
   // Start of the inline data, which immediately follows the shape and type.
   uint8_t data_[1];
@@ -765,27 +765,27 @@ class InlineTypedObject : public TypedOb
       JSContext* cx, Handle<InlineTypedObject*> templateObject,
       gc::InitialHeap heap);
 };
 
 // Class for a transparent typed object with inline data, which may have a
 // lazily allocated array buffer.
 class InlineTransparentTypedObject : public InlineTypedObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   uint8_t* inlineTypedMem() const {
     return InlineTypedObject::inlineTypedMem();
   }
 };
 
 // Class for an opaque typed object with inline data and no array buffer.
 class InlineOpaqueTypedObject : public InlineTypedObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 };
 
 /*
  * Usage: NewOpaqueTypedObject(typeObj)
  *
  * Constructs a new, unattached instance of `Handle`.
  */
 MOZ_MUST_USE bool NewOpaqueTypedObject(JSContext* cx, unsigned argc, Value* vp);
@@ -1002,53 +1002,53 @@ MOZ_MUST_USE bool UnboxBoxedWasmAnyRef(J
 // into problems with the Unagi compiler.
 JS_FOR_EACH_UNIQUE_SCALAR_NUMBER_TYPE_REPR_CTYPE(JS_STORE_SCALAR_CLASS_DEFN)
 JS_FOR_EACH_UNIQUE_SCALAR_NUMBER_TYPE_REPR_CTYPE(JS_LOAD_SCALAR_CLASS_DEFN)
 JS_FOR_EACH_SCALAR_BIGINT_TYPE_REPR(JS_STORE_SCALAR_CLASS_DEFN)
 JS_FOR_EACH_SCALAR_BIGINT_TYPE_REPR(JS_LOAD_SCALAR_CLASS_DEFN)
 JS_FOR_EACH_REFERENCE_TYPE_REPR(JS_STORE_REFERENCE_CLASS_DEFN)
 JS_FOR_EACH_REFERENCE_TYPE_REPR(JS_LOAD_REFERENCE_CLASS_DEFN)
 
-inline bool IsTypedObjectClass(const Class* class_) {
+inline bool IsTypedObjectClass(const JSClass* class_) {
   return class_ == &OutlineTransparentTypedObject::class_ ||
          class_ == &InlineTransparentTypedObject::class_ ||
          class_ == &OutlineOpaqueTypedObject::class_ ||
          class_ == &InlineOpaqueTypedObject::class_;
 }
 
-inline bool IsOpaqueTypedObjectClass(const Class* class_) {
+inline bool IsOpaqueTypedObjectClass(const JSClass* class_) {
   return class_ == &OutlineOpaqueTypedObject::class_ ||
          class_ == &InlineOpaqueTypedObject::class_;
 }
 
-inline bool IsOutlineTypedObjectClass(const Class* class_) {
+inline bool IsOutlineTypedObjectClass(const JSClass* class_) {
   return class_ == &OutlineOpaqueTypedObject::class_ ||
          class_ == &OutlineTransparentTypedObject::class_;
 }
 
-inline bool IsInlineTypedObjectClass(const Class* class_) {
+inline bool IsInlineTypedObjectClass(const JSClass* class_) {
   return class_ == &InlineOpaqueTypedObject::class_ ||
          class_ == &InlineTransparentTypedObject::class_;
 }
 
-inline const Class* GetOutlineTypedObjectClass(bool opaque) {
+inline const JSClass* GetOutlineTypedObjectClass(bool opaque) {
   return opaque ? &OutlineOpaqueTypedObject::class_
                 : &OutlineTransparentTypedObject::class_;
 }
 
-inline bool IsSimpleTypeDescrClass(const Class* clasp) {
+inline bool IsSimpleTypeDescrClass(const JSClass* clasp) {
   return clasp == &ScalarTypeDescr::class_ ||
          clasp == &ReferenceTypeDescr::class_;
 }
 
-inline bool IsComplexTypeDescrClass(const Class* clasp) {
+inline bool IsComplexTypeDescrClass(const JSClass* clasp) {
   return clasp == &StructTypeDescr::class_ || clasp == &ArrayTypeDescr::class_;
 }
 
-inline bool IsTypeDescrClass(const Class* clasp) {
+inline bool IsTypeDescrClass(const JSClass* clasp) {
   return IsSimpleTypeDescrClass(clasp) || IsComplexTypeDescrClass(clasp);
 }
 
 inline bool TypedObject::opaque() const {
   return IsOpaqueTypedObjectClass(getClass());
 }
 
 JSObject* InitTypedObjectModuleObject(JSContext* cx,
--- a/js/src/builtin/WeakMapObject.cpp
+++ b/js/src/builtin/WeakMapObject.cpp
@@ -272,23 +272,23 @@ const ClassSpec WeakMapObject::classSpec
                              gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<WeakMapObject>,
     nullptr,
     nullptr,
     WeakMapObject::methods,
     WeakMapObject::properties,
 };
 
-const Class WeakMapObject::class_ = {
+const JSClass WeakMapObject::class_ = {
     "WeakMap",
     JSCLASS_HAS_PRIVATE | JSCLASS_HAS_CACHED_PROTO(JSProto_WeakMap) |
         JSCLASS_BACKGROUND_FINALIZE,
     &WeakCollectionObject::classOps_, &WeakMapObject::classSpec_};
 
-const Class WeakMapObject::protoClass_ = {
+const JSClass WeakMapObject::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_WeakMap), JS_NULL_CLASS_OPS,
     &WeakMapObject::classSpec_};
 
 const JSPropertySpec WeakMapObject::properties[] = {
     JS_STRING_SYM_PS(toStringTag, "WeakMap", JSPROP_READONLY), JS_PS_END};
 
 const JSFunctionSpec WeakMapObject::methods[] = {
     JS_FN("has", has, 1, 0), JS_FN("get", get, 1, 0),
--- a/js/src/builtin/WeakMapObject.h
+++ b/js/src/builtin/WeakMapObject.h
@@ -31,18 +31,18 @@ class WeakCollectionObject : public Nati
       MutableHandleObject ret);
 
  protected:
   static const JSClassOps classOps_;
 };
 
 class WeakMapObject : public WeakCollectionObject {
  public:
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
  private:
   static const ClassSpec classSpec_;
 
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
 
   static MOZ_MUST_USE bool construct(JSContext* cx, unsigned argc, Value* vp);
--- a/js/src/builtin/WeakSetObject.cpp
+++ b/js/src/builtin/WeakSetObject.cpp
@@ -134,23 +134,23 @@ const ClassSpec WeakSetObject::classSpec
                              gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<WeakSetObject>,
     nullptr,
     nullptr,
     WeakSetObject::methods,
     WeakSetObject::properties,
 };
 
-const Class WeakSetObject::class_ = {
+const JSClass WeakSetObject::class_ = {
     "WeakSet",
     JSCLASS_HAS_PRIVATE | JSCLASS_HAS_CACHED_PROTO(JSProto_WeakSet) |
         JSCLASS_BACKGROUND_FINALIZE,
     &WeakCollectionObject::classOps_, &WeakSetObject::classSpec_};
 
-const Class WeakSetObject::protoClass_ = {
+const JSClass WeakSetObject::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_WeakSet), JS_NULL_CLASS_OPS,
     &WeakSetObject::classSpec_};
 
 const JSPropertySpec WeakSetObject::properties[] = {
     JS_STRING_SYM_PS(toStringTag, "WeakSet", JSPROP_READONLY), JS_PS_END};
 
 const JSFunctionSpec WeakSetObject::methods[] = {
     JS_FN("add", add, 1, 0), JS_FN("delete", delete_, 1, 0),
--- a/js/src/builtin/WeakSetObject.h
+++ b/js/src/builtin/WeakSetObject.h
@@ -10,18 +10,18 @@
 #include "builtin/WeakMapObject.h"
 
 namespace js {
 
 class GlobalObject;
 
 class WeakSetObject : public WeakCollectionObject {
  public:
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
  private:
   static const ClassSpec classSpec_;
 
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
 
   static WeakSetObject* create(JSContext* cx, HandleObject proto = nullptr);
--- a/js/src/builtin/intl/Collator.cpp
+++ b/js/src/builtin/intl/Collator.cpp
@@ -42,17 +42,17 @@ using js::intl::StringsAreEqual;
 const JSClassOps CollatorObject::classOps_ = {nullptr, /* addProperty */
                                               nullptr, /* delProperty */
                                               nullptr, /* enumerate */
                                               nullptr, /* newEnumerate */
                                               nullptr, /* resolve */
                                               nullptr, /* mayResolve */
                                               CollatorObject::finalize};
 
-const Class CollatorObject::class_ = {
+const JSClass CollatorObject::class_ = {
     js_Object_str,
     JSCLASS_HAS_RESERVED_SLOTS(CollatorObject::SLOT_COUNT) |
         JSCLASS_FOREGROUND_FINALIZE,
     &CollatorObject::classOps_};
 
 static bool collator_toSource(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   args.rval().setString(cx->names().Collator);
--- a/js/src/builtin/intl/Collator.h
+++ b/js/src/builtin/intl/Collator.h
@@ -20,17 +20,17 @@ struct UCollator;
 namespace js {
 
 class GlobalObject;
 
 /******************** Collator ********************/
 
 class CollatorObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static constexpr uint32_t INTERNALS_SLOT = 0;
   static constexpr uint32_t UCOLLATOR_SLOT = 1;
   static constexpr uint32_t SLOT_COUNT = 2;
 
   static_assert(INTERNALS_SLOT == INTL_INTERNALS_OBJECT_SLOT,
                 "INTERNALS_SLOT must match self-hosting define for internals "
                 "object slot");
--- a/js/src/builtin/intl/DateTimeFormat.cpp
+++ b/js/src/builtin/intl/DateTimeFormat.cpp
@@ -50,17 +50,17 @@ const JSClassOps DateTimeFormatObject::c
     nullptr, /* addProperty */
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     DateTimeFormatObject::finalize};
 
-const Class DateTimeFormatObject::class_ = {
+const JSClass DateTimeFormatObject::class_ = {
     js_Object_str,
     JSCLASS_HAS_RESERVED_SLOTS(DateTimeFormatObject::SLOT_COUNT) |
         JSCLASS_FOREGROUND_FINALIZE,
     &DateTimeFormatObject::classOps_};
 
 static bool dateTimeFormat_toSource(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   args.rval().setString(cx->names().DateTimeFormat);
--- a/js/src/builtin/intl/DateTimeFormat.h
+++ b/js/src/builtin/intl/DateTimeFormat.h
@@ -18,17 +18,17 @@
 using UDateFormat = void*;
 
 namespace js {
 
 class GlobalObject;
 
 class DateTimeFormatObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static constexpr uint32_t INTERNALS_SLOT = 0;
   static constexpr uint32_t UDATE_FORMAT_SLOT = 1;
   static constexpr uint32_t SLOT_COUNT = 2;
 
   static_assert(INTERNALS_SLOT == INTL_INTERNALS_OBJECT_SLOT,
                 "INTERNALS_SLOT must match self-hosting define for internals "
                 "object slot");
--- a/js/src/builtin/intl/IntlObject.cpp
+++ b/js/src/builtin/intl/IntlObject.cpp
@@ -496,18 +496,18 @@ bool js::intl_GetLocaleInfo(JSContext* c
   if (!DefineDataProperty(cx, info, cx->names().direction, dir)) {
     return false;
   }
 
   args.rval().setObject(*info);
   return true;
 }
 
-const Class js::IntlClass = {js_Object_str,
-                             JSCLASS_HAS_CACHED_PROTO(JSProto_Intl)};
+const JSClass js::IntlClass = {js_Object_str,
+                               JSCLASS_HAS_CACHED_PROTO(JSProto_Intl)};
 
 static bool intl_toSource(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   args.rval().setString(cx->names().Intl);
   return true;
 }
 
 static const JSFunctionSpec intl_static_methods[] = {
--- a/js/src/builtin/intl/IntlObject.h
+++ b/js/src/builtin/intl/IntlObject.h
@@ -11,17 +11,17 @@
 
 #include "js/RootingAPI.h"
 #include "js/TypeDecls.h"
 
 namespace js {
 
 class GlobalObject;
 
-extern const Class IntlClass;
+extern const JSClass IntlClass;
 
 /**
  * Initializes the Intl Object and its standard built-in properties.
  * Spec: ECMAScript Internationalization API Specification, 8.0, 8.1
  */
 extern JSObject* InitIntlClass(JSContext* cx, JS::Handle<GlobalObject*> global);
 
 /**
--- a/js/src/builtin/intl/Locale.cpp
+++ b/js/src/builtin/intl/Locale.cpp
@@ -25,17 +25,17 @@
 #include "vm/JSContext.h"
 #include "vm/StringType.h"
 
 #include "vm/JSObject-inl.h"
 #include "vm/NativeObject-inl.h"
 
 using namespace js;
 
-const Class LocaleObject::class_ = {
+const JSClass LocaleObject::class_ = {
     js_Object_str,
     JSCLASS_HAS_RESERVED_SLOTS(LocaleObject::SLOT_COUNT),
 };
 
 static bool locale_toSource(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   args.rval().setString(cx->names().Locale);
   return true;
--- a/js/src/builtin/intl/Locale.h
+++ b/js/src/builtin/intl/Locale.h
@@ -14,17 +14,17 @@
 #include "vm/NativeObject.h"
 
 namespace js {
 
 class GlobalObject;
 
 class LocaleObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static constexpr uint32_t INTERNALS_SLOT = 0;
   static constexpr uint32_t SLOT_COUNT = 1;
 
   static_assert(INTERNALS_SLOT == INTL_INTERNALS_OBJECT_SLOT,
                 "INTERNALS_SLOT must match self-hosting define for internals "
                 "object slot");
 };
--- a/js/src/builtin/intl/NumberFormat.cpp
+++ b/js/src/builtin/intl/NumberFormat.cpp
@@ -61,17 +61,17 @@ using JS::AutoStableStringChars;
 const JSClassOps NumberFormatObject::classOps_ = {nullptr, /* addProperty */
                                                   nullptr, /* delProperty */
                                                   nullptr, /* enumerate */
                                                   nullptr, /* newEnumerate */
                                                   nullptr, /* resolve */
                                                   nullptr, /* mayResolve */
                                                   NumberFormatObject::finalize};
 
-const Class NumberFormatObject::class_ = {
+const JSClass NumberFormatObject::class_ = {
     js_Object_str,
     JSCLASS_HAS_RESERVED_SLOTS(NumberFormatObject::SLOT_COUNT) |
         JSCLASS_FOREGROUND_FINALIZE,
     &NumberFormatObject::classOps_};
 
 static bool numberFormat_toSource(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   args.rval().setString(cx->names().NumberFormat);
--- a/js/src/builtin/intl/NumberFormat.h
+++ b/js/src/builtin/intl/NumberFormat.h
@@ -22,17 +22,17 @@ struct UFormattedValue;
 struct UNumberFormatter;
 
 namespace js {
 
 class ArrayObject;
 
 class NumberFormatObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static constexpr uint32_t INTERNALS_SLOT = 0;
   static constexpr uint32_t UNUMBER_FORMATTER_SLOT = 1;
   static constexpr uint32_t UFORMATTED_NUMBER_SLOT = 2;
   static constexpr uint32_t SLOT_COUNT = 3;
 
   static_assert(INTERNALS_SLOT == INTL_INTERNALS_OBJECT_SLOT,
                 "INTERNALS_SLOT must match self-hosting define for internals "
--- a/js/src/builtin/intl/PluralRules.cpp
+++ b/js/src/builtin/intl/PluralRules.cpp
@@ -37,17 +37,17 @@ using js::intl::IcuLocale;
 const JSClassOps PluralRulesObject::classOps_ = {nullptr, /* addProperty */
                                                  nullptr, /* delProperty */
                                                  nullptr, /* enumerate */
                                                  nullptr, /* newEnumerate */
                                                  nullptr, /* resolve */
                                                  nullptr, /* mayResolve */
                                                  PluralRulesObject::finalize};
 
-const Class PluralRulesObject::class_ = {
+const JSClass PluralRulesObject::class_ = {
     js_Object_str,
     JSCLASS_HAS_RESERVED_SLOTS(PluralRulesObject::SLOT_COUNT) |
         JSCLASS_FOREGROUND_FINALIZE,
     &PluralRulesObject::classOps_};
 
 static bool pluralRules_toSource(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   args.rval().setString(cx->names().PluralRules);
--- a/js/src/builtin/intl/PluralRules.h
+++ b/js/src/builtin/intl/PluralRules.h
@@ -17,17 +17,17 @@
 struct UFormattedNumber;
 struct UNumberFormatter;
 struct UPluralRules;
 
 namespace js {
 
 class PluralRulesObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static constexpr uint32_t INTERNALS_SLOT = 0;
   static constexpr uint32_t UPLURAL_RULES_SLOT = 1;
   static constexpr uint32_t UNUMBER_FORMATTER_SLOT = 2;
   static constexpr uint32_t UFORMATTED_NUMBER_SLOT = 3;
   static constexpr uint32_t SLOT_COUNT = 4;
 
   static_assert(INTERNALS_SLOT == INTL_INTERNALS_OBJECT_SLOT,
--- a/js/src/builtin/intl/RelativeTimeFormat.cpp
+++ b/js/src/builtin/intl/RelativeTimeFormat.cpp
@@ -36,17 +36,17 @@ const JSClassOps RelativeTimeFormatObjec
     nullptr, /* addProperty */
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     RelativeTimeFormatObject::finalize};
 
-const Class RelativeTimeFormatObject::class_ = {
+const JSClass RelativeTimeFormatObject::class_ = {
     js_Object_str,
     JSCLASS_HAS_RESERVED_SLOTS(RelativeTimeFormatObject::SLOT_COUNT) |
         JSCLASS_FOREGROUND_FINALIZE,
     &RelativeTimeFormatObject::classOps_};
 
 static bool relativeTimeFormat_toSource(JSContext* cx, unsigned argc,
                                         Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
--- a/js/src/builtin/intl/RelativeTimeFormat.h
+++ b/js/src/builtin/intl/RelativeTimeFormat.h
@@ -16,17 +16,17 @@
 #include "vm/NativeObject.h"
 
 struct URelativeDateTimeFormatter;
 
 namespace js {
 
 class RelativeTimeFormatObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static constexpr uint32_t INTERNALS_SLOT = 0;
   static constexpr uint32_t URELATIVE_TIME_FORMAT_SLOT = 1;
   static constexpr uint32_t SLOT_COUNT = 2;
 
   static_assert(INTERNALS_SLOT == INTL_INTERNALS_OBJECT_SLOT,
                 "INTERNALS_SLOT must match self-hosting define for internals "
                 "object slot");
--- a/js/src/debugger/Debugger.cpp
+++ b/js/src/debugger/Debugger.cpp
@@ -534,17 +534,17 @@ static const JSClassOps GlobalDebuggerVe
     nullptr,
     nullptr,
     nullptr,
     nullptr,
     nullptr,
     nullptr,
     GlobalDebuggerVectorHolder_finalize};
 
-static const Class GlobalDebuggerVectorHolder_class = {
+static const JSClass GlobalDebuggerVectorHolder_class = {
     "GlobalDebuggerVectorHolder",
     JSCLASS_HAS_PRIVATE | JSCLASS_BACKGROUND_FINALIZE,
     &GlobalDebuggerVectorHolder_classOps};
 
 /* static */
 JSObject* DebugAPI::newGlobalDebuggersHolder(JSContext* cx) {
   NativeObject* obj = NewNativeObjectWithGivenProto(
       cx, &GlobalDebuggerVectorHolder_class, nullptr);
@@ -3861,17 +3861,17 @@ const JSClassOps Debugger::classOps_ = {
                                         nullptr, /* resolve     */
                                         nullptr, /* mayResolve  */
                                         nullptr, /* finalize    */
                                         nullptr, /* call        */
                                         nullptr, /* hasInstance */
                                         nullptr, /* construct   */
                                         Debugger::traceObject};
 
-const Class Debugger::class_ = {
+const JSClass Debugger::class_ = {
     "Debugger",
     JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(JSSLOT_DEBUG_COUNT),
     &Debugger::classOps_};
 
 static Debugger* Debugger_fromThisValue(JSContext* cx, const CallArgs& args,
                                         const char* fnname) {
   JSObject* thisobj = RequireObject(cx, args.thisv());
   if (!thisobj) {
--- a/js/src/debugger/Debugger.h
+++ b/js/src/debugger/Debugger.h
@@ -832,17 +832,17 @@ class Debugger : private mozilla::Linked
   friend struct js::GCManagedDeletePolicy<Debugger>;
 
   void traceForMovingGC(JSTracer* trc);
   void traceCrossCompartmentEdges(JSTracer* tracer);
 
   static const JSClassOps classOps_;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
  private:
   static MOZ_MUST_USE bool getHookImpl(JSContext* cx, CallArgs& args,
                                        Debugger& dbg, Hook which);
   static MOZ_MUST_USE bool setHookImpl(JSContext* cx, CallArgs& args,
                                        Debugger& dbg, Hook which);
 
   static bool getEnabled(JSContext* cx, unsigned argc, Value* vp);
--- a/js/src/debugger/DebuggerMemory.cpp
+++ b/js/src/debugger/DebuggerMemory.cpp
@@ -60,17 +60,17 @@ Debugger* DebuggerMemory::getDebugger() 
 
 /* static */
 bool DebuggerMemory::construct(JSContext* cx, unsigned argc, Value* vp) {
   JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NO_CONSTRUCTOR,
                             "Debugger.Source");
   return false;
 }
 
-/* static */ const Class DebuggerMemory::class_ = {
+/* static */ const JSClass DebuggerMemory::class_ = {
     "Memory", JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(JSSLOT_COUNT)};
 
 /* static */
 DebuggerMemory* DebuggerMemory::checkThis(JSContext* cx, CallArgs& args,
                                           const char* fnName) {
   const Value& thisValue = args.thisv();
 
   if (!thisValue.isObject()) {
--- a/js/src/debugger/DebuggerMemory.h
+++ b/js/src/debugger/DebuggerMemory.h
@@ -25,17 +25,17 @@ class DebuggerMemory : public NativeObje
   Debugger* getDebugger();
 
  public:
   static DebuggerMemory* create(JSContext* cx, Debugger* dbg);
 
   enum { JSSLOT_DEBUGGER, JSSLOT_COUNT };
 
   static bool construct(JSContext* cx, unsigned argc, Value* vp);
-  static const Class class_;
+  static const JSClass class_;
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
 
   // Accessor properties of Debugger.Memory.prototype.
 
   static bool setTrackingAllocationSites(JSContext* cx, unsigned argc,
                                          Value* vp);
   static bool getTrackingAllocationSites(JSContext* cx, unsigned argc,
--- a/js/src/debugger/Environment.cpp
+++ b/js/src/debugger/Environment.cpp
@@ -60,17 +60,17 @@ const JSClassOps DebuggerEnvironment::cl
     nullptr,                              /* mayResolve  */
     nullptr,                              /* finalize    */
     nullptr,                              /* call        */
     nullptr,                              /* hasInstance */
     nullptr,                              /* construct   */
     CallTraceMethod<DebuggerEnvironment>, /* trace */
 };
 
-const Class DebuggerEnvironment::class_ = {
+const JSClass DebuggerEnvironment::class_ = {
     "Environment",
     JSCLASS_HAS_PRIVATE |
         JSCLASS_HAS_RESERVED_SLOTS(DebuggerEnvironment::RESERVED_SLOTS),
     &classOps_};
 
 void DebuggerEnvironment::trace(JSTracer* trc) {
   // There is a barrier on private pointers, so the Unbarriered marking
   // is okay.
--- a/js/src/debugger/Environment.h
+++ b/js/src/debugger/Environment.h
@@ -30,17 +30,17 @@ class GlobalObject;
 enum class DebuggerEnvironmentType { Declarative, With, Object };
 
 class DebuggerEnvironment : public NativeObject {
  public:
   enum { OWNER_SLOT };
 
   static const unsigned RESERVED_SLOTS = 1;
 
-  static const Class class_;
+  static const JSClass class_;
 
   static NativeObject* initClass(JSContext* cx, Handle<GlobalObject*> global,
                                  HandleObject dbgCtor);
   static DebuggerEnvironment* create(JSContext* cx, HandleObject proto,
                                      HandleObject referent,
                                      HandleNativeObject debugger);
 
   void trace(JSTracer* trc);
--- a/js/src/debugger/Frame.cpp
+++ b/js/src/debugger/Frame.cpp
@@ -181,27 +181,27 @@ const JSClassOps DebuggerFrame::classOps
     nullptr,                        /* mayResolve  */
     finalize,                       /* finalize */
     nullptr,                        /* call        */
     nullptr,                        /* hasInstance */
     nullptr,                        /* construct   */
     CallTraceMethod<DebuggerFrame>, /* trace */
 };
 
-const Class DebuggerFrame::class_ = {
+const JSClass DebuggerFrame::class_ = {
     "Frame",
     JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS) |
         // We require foreground finalization so we can destruct GeneratorInfo's
         // HeapPtrs.
         JSCLASS_FOREGROUND_FINALIZE,
     &DebuggerFrame::classOps_};
 
 enum { JSSLOT_DEBUGARGUMENTS_FRAME, JSSLOT_DEBUGARGUMENTS_COUNT };
 
-const Class DebuggerArguments::class_ = {
+const JSClass DebuggerArguments::class_ = {
     "Arguments", JSCLASS_HAS_RESERVED_SLOTS(JSSLOT_DEBUGARGUMENTS_COUNT)};
 
 bool DebuggerFrame::resume(const FrameIter& iter) {
   FrameIter::Data* data = iter.copyData();
   if (!data) {
     return false;
   }
   setFrameIterData(data);
--- a/js/src/debugger/Frame.h
+++ b/js/src/debugger/Frame.h
@@ -95,34 +95,34 @@ class ScriptedOnPopHandler final : publi
 };
 
 enum class DebuggerFrameType { Eval, Global, Call, Module, WasmCall };
 
 enum class DebuggerFrameImplementation { Interpreter, Baseline, Ion, Wasm };
 
 class DebuggerArguments : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static DebuggerArguments* create(JSContext* cx, HandleObject proto,
                                    HandleDebuggerFrame frame);
 
  private:
   enum { FRAME_SLOT };
 
   static const unsigned RESERVED_SLOTS = 1;
 };
 
 class DebuggerFrame : public NativeObject {
   friend class DebuggerArguments;
   friend class ScriptedOnStepHandler;
   friend class ScriptedOnPopHandler;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   enum {
     OWNER_SLOT = 0,
     ARGUMENTS_SLOT,
     ONSTEP_HANDLER_SLOT,
     ONPOP_HANDLER_SLOT,
 
     // If this is a frame for a generator call, and the generator object has
--- a/js/src/debugger/Object.cpp
+++ b/js/src/debugger/Object.cpp
@@ -80,17 +80,17 @@ const JSClassOps DebuggerObject::classOp
     nullptr,                         /* mayResolve  */
     nullptr,                         /* finalize    */
     nullptr,                         /* call        */
     nullptr,                         /* hasInstance */
     nullptr,                         /* construct   */
     CallTraceMethod<DebuggerObject>, /* trace */
 };
 
-const Class DebuggerObject::class_ = {
+const JSClass DebuggerObject::class_ = {
     "Object", JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS),
     &classOps_};
 
 void DebuggerObject::trace(JSTracer* trc) {
   // There is a barrier on private pointers, so the Unbarriered marking
   // is okay.
   if (JSObject* referent = (JSObject*)getPrivate()) {
     TraceManuallyBarrieredCrossCompartmentEdge(
--- a/js/src/debugger/Object.h
+++ b/js/src/debugger/Object.h
@@ -31,17 +31,17 @@ class Debugger;
 class EvalOptions;
 class GlobalObject;
 class PromiseObject;
 
 enum { JSSLOT_DEBUGOBJECT_OWNER, JSSLOT_DEBUGOBJECT_COUNT };
 
 class DebuggerObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static NativeObject* initClass(JSContext* cx, Handle<GlobalObject*> global,
                                  HandleObject debugCtor);
   static DebuggerObject* create(JSContext* cx, HandleObject proto,
                                 HandleObject referent,
                                 HandleNativeObject debugger);
 
   void trace(JSTracer* trc);
--- a/js/src/debugger/Script.cpp
+++ b/js/src/debugger/Script.cpp
@@ -66,17 +66,17 @@ const JSClassOps DebuggerScript::classOp
     nullptr,                         /* mayResolve  */
     nullptr,                         /* finalize    */
     nullptr,                         /* call        */
     nullptr,                         /* hasInstance */
     nullptr,                         /* construct   */
     CallTraceMethod<DebuggerScript>, /* trace */
 };
 
-const Class DebuggerScript::class_ = {
+const JSClass DebuggerScript::class_ = {
     "Script", JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS),
     &classOps_};
 
 void DebuggerScript::trace(JSTracer* trc) {
   JSObject* upcast = this;
   // This comes from a private pointer, so no barrier needed.
   gc::Cell* cell = getReferentCell();
   if (cell) {
--- a/js/src/debugger/Script.h
+++ b/js/src/debugger/Script.h
@@ -22,17 +22,17 @@ class BaseScript;
 class GlobalObject;
 
 namespace gc {
 struct Cell;
 }
 
 class DebuggerScript : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   enum {
     OWNER_SLOT,
 
     // Holds any instrumentation ID that has been assigned to the script.
     INSTRUMENTATION_ID_SLOT,
 
     RESERVED_SLOTS,
--- a/js/src/debugger/Source.cpp
+++ b/js/src/debugger/Source.cpp
@@ -58,17 +58,17 @@ const JSClassOps DebuggerSource::classOp
     nullptr,                         /* mayResolve  */
     nullptr,                         /* finalize    */
     nullptr,                         /* call        */
     nullptr,                         /* hasInstance */
     nullptr,                         /* construct   */
     CallTraceMethod<DebuggerSource>, /* trace */
 };
 
-const Class DebuggerSource::class_ = {
+const JSClass DebuggerSource::class_ = {
     "Source", JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS),
     &classOps_};
 
 /* static */
 NativeObject* DebuggerSource::initClass(JSContext* cx,
                                         Handle<GlobalObject*> global,
                                         HandleObject debugCtor) {
   return InitClass(cx, debugCtor, nullptr, &class_, construct, 0, properties_,
--- a/js/src/debugger/Source.h
+++ b/js/src/debugger/Source.h
@@ -17,17 +17,17 @@
 namespace js {
 class GlobalObject;
 }
 
 namespace js {
 
 class DebuggerSource : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   enum {
     OWNER_SLOT,
     TEXT_SLOT,
     RESERVED_SLOTS,
   };
 
   static NativeObject* initClass(JSContext* cx, Handle<GlobalObject*> global,
--- a/js/src/gc/Allocator.cpp
+++ b/js/src/gc/Allocator.cpp
@@ -27,17 +27,17 @@ using mozilla::TimeDuration;
 using mozilla::TimeStamp;
 
 using namespace js;
 using namespace gc;
 
 template <AllowGC allowGC /* = CanGC */>
 JSObject* js::AllocateObject(JSContext* cx, AllocKind kind,
                              size_t nDynamicSlots, InitialHeap heap,
-                             const Class* clasp) {
+                             const JSClass* clasp) {
   MOZ_ASSERT(IsObjectAllocKind(kind));
   size_t thingSize = Arena::thingSize(kind);
 
   MOZ_ASSERT(thingSize == Arena::thingSize(kind));
   MOZ_ASSERT(thingSize >= sizeof(JSObject_Slots0));
   static_assert(
       sizeof(JSObject_Slots0) >= MinCellSize,
       "All allocations must be at least the allocator-imposed minimum size.");
@@ -78,29 +78,29 @@ JSObject* js::AllocateObject(JSContext* 
   }
 
   return GCRuntime::tryNewTenuredObject<allowGC>(cx, kind, thingSize,
                                                  nDynamicSlots);
 }
 template JSObject* js::AllocateObject<NoGC>(JSContext* cx, gc::AllocKind kind,
                                             size_t nDynamicSlots,
                                             gc::InitialHeap heap,
-                                            const Class* clasp);
+                                            const JSClass* clasp);
 template JSObject* js::AllocateObject<CanGC>(JSContext* cx, gc::AllocKind kind,
                                              size_t nDynamicSlots,
                                              gc::InitialHeap heap,
-                                             const Class* clasp);
+                                             const JSClass* clasp);
 
 // Attempt to allocate a new JSObject out of the nursery. If there is not
 // enough room in the nursery or there is an OOM, this method will return
 // nullptr.
 template <AllowGC allowGC>
 JSObject* GCRuntime::tryNewNurseryObject(JSContext* cx, size_t thingSize,
                                          size_t nDynamicSlots,
-                                         const Class* clasp) {
+                                         const JSClass* clasp) {
   MOZ_RELEASE_ASSERT(!cx->isHelperThreadContext());
 
   MOZ_ASSERT(cx->isNurseryAllocAllowed());
   MOZ_ASSERT(!cx->isNurseryAllocSuppressed());
   MOZ_ASSERT(!cx->zone()->isAtomsZone());
 
   JSObject* obj =
       cx->nursery().allocateObject(cx, thingSize, nDynamicSlots, clasp);
--- a/js/src/gc/Allocator.h
+++ b/js/src/gc/Allocator.h
@@ -27,17 +27,17 @@ T* Allocate(JSContext* cx);
 // Allocate a JSObject.
 //
 // A longer signature that includes additional information in support of various
 // optimizations. If dynamic slots are requested they will be allocated and the
 // pointer stored directly in |NativeObject::slots_|.
 template <AllowGC allowGC = CanGC>
 JSObject* AllocateObject(JSContext* cx, gc::AllocKind kind,
                          size_t nDynamicSlots, gc::InitialHeap heap,
-                         const Class* clasp);
+                         const JSClass* clasp);
 
 // Internal function used for nursery-allocatable strings.
 template <typename StringAllocT, AllowGC allowGC = CanGC>
 StringAllocT* AllocateStringImpl(JSContext* cx, gc::InitialHeap heap);
 
 // Allocate a string.
 //
 // Use for nursery-allocatable strings. Returns a value cast to the correct
--- a/js/src/gc/GCRuntime.h
+++ b/js/src/gc/GCRuntime.h
@@ -484,17 +484,17 @@ class GCRuntime {
   void releaseHeldRelocatedArenas();
   void releaseHeldRelocatedArenasWithoutUnlocking(const AutoLockGC& lock);
 
   // Allocator
   template <AllowGC allowGC>
   MOZ_MUST_USE bool checkAllocatorState(JSContext* cx, AllocKind kind);
   template <AllowGC allowGC>
   JSObject* tryNewNurseryObject(JSContext* cx, size_t thingSize,
-                                size_t nDynamicSlots, const Class* clasp);
+                                size_t nDynamicSlots, const JSClass* clasp);
   template <AllowGC allowGC>
   static JSObject* tryNewTenuredObject(JSContext* cx, AllocKind kind,
                                        size_t thingSize, size_t nDynamicSlots);
   template <typename T, AllowGC allowGC>
   static T* tryNewTenuredThing(JSContext* cx, AllocKind kind, size_t thingSize);
   template <AllowGC allowGC>
   JSString* tryNewNurseryString(JSContext* cx, size_t thingSize,
                                 AllocKind kind);
--- a/js/src/gc/GCTrace.cpp
+++ b/js/src/gc/GCTrace.cpp
@@ -127,17 +127,17 @@ void GCTrace::traceNurseryAlloc(Cell* th
 
 void GCTrace::traceTenuredAlloc(Cell* thing, AllocKind kind) {
   if (thing) {
     TraceEvent(gcTraceFile, TraceEventTenuredAlloc, uint64_t(thing),
                uint8_t(kind));
   }
 }
 
-void js::gc::GCTrace::maybeTraceClass(const Class* clasp) {
+void js::gc::GCTrace::maybeTraceClass(const JSClass* clasp) {
   if (tracedClasses.has(clasp)) {
     return;
   }
 
   TraceEvent(gcTraceFile, TraceEventClassInfo, uint64_t(clasp));
   TraceString(gcTraceFile, clasp->name);
   TraceInt(gcTraceFile, clasp->flags);
   TraceInt(gcTraceFile, clasp->hasFinalize());
--- a/js/src/gc/GCTrace.h
+++ b/js/src/gc/GCTrace.h
@@ -38,23 +38,23 @@ class GCTrace {
   void traceMajorGCStart();
   void traceTenuredFinalize(Cell* thing);
   void traceMajorGCEnd();
   void traceTypeNewScript(js::ObjectGroup* group);
 
  private:
   FILE* gcTraceFile = nullptr;
 
-  HashSet<const Class*, DefaultHasher<const Class*>, SystemAllocPolicy>
+  HashSet<const JSClass*, DefaultHasher<const JSClass*>, SystemAllocPolicy>
       tracedClasses;
   HashSet<const ObjectGroup*, DefaultHasher<const ObjectGroup*>,
           SystemAllocPolicy>
       tracedGroups;
 
-  void maybeTraceClass(const Class* clasp);
+  void maybeTraceClass(const JSClass* clasp);
   void maybeTraceGroup(ObjectGroup* group);
 
 #else
 
   MOZ_MUST_USE bool initTrace(GCRuntime& gc) { return true; }
   void finishTrace() {}
   bool traceEnabled() { return false; }
   void traceNurseryAlloc(Cell* thing, size_t size) {}
--- a/js/src/gc/Marking.cpp
+++ b/js/src/gc/Marking.cpp
@@ -1432,17 +1432,17 @@ static void VisitTraceList(const Functor
 
 // Call the trace hook set on the object, if present. If further tracing of
 // NativeObject fields is required, this will return the native object.
 enum class CheckGeneration { DoChecks, NoChecks };
 template <typename Functor>
 static inline NativeObject* CallTraceHook(Functor&& f, JSTracer* trc,
                                           JSObject* obj,
                                           CheckGeneration check) {
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   MOZ_ASSERT(clasp);
   MOZ_ASSERT(obj->isNative() == clasp->isNative());
 
   if (!clasp->hasTrace()) {
     return &obj->as<NativeObject>();
   }
 
   if (clasp->isTrace(InlineTypedObject::obj_trace)) {
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -404,17 +404,17 @@ void js::Nursery::leaveZealMode() {
     setStartPosition();
     poisonAndInitCurrentChunk();
   }
 }
 #endif  // JS_GC_ZEAL
 
 JSObject* js::Nursery::allocateObject(JSContext* cx, size_t size,
                                       size_t nDynamicSlots,
-                                      const js::Class* clasp) {
+                                      const JSClass* clasp) {
   // Ensure there's enough space to replace the contents with a
   // RelocationOverlay.
   MOZ_ASSERT(size >= sizeof(RelocationOverlay));
 
   // Sanity check the finalizer.
   MOZ_ASSERT_IF(clasp->hasFinalize(),
                 CanNurseryAllocateFinalizedClass(clasp) || clasp->isProxy());
 
--- a/js/src/gc/Nursery.h
+++ b/js/src/gc/Nursery.h
@@ -151,17 +151,17 @@ class TenuringTracer : public JSTracer {
   void traceSlots(JS::Value* vp, JS::Value* end);
 };
 
 // Classes with JSCLASS_SKIP_NURSERY_FINALIZE or Wrapper classes with
 // CROSS_COMPARTMENT flags will not have their finalizer called if they are
 // nursery allocated and not promoted to the tenured heap. The finalizers for
 // these classes must do nothing except free data which was allocated via
 // Nursery::allocateBuffer.
-inline bool CanNurseryAllocateFinalizedClass(const js::Class* const clasp) {
+inline bool CanNurseryAllocateFinalizedClass(const JSClass* const clasp) {
   MOZ_ASSERT(clasp->hasFinalize());
   return clasp->flags & JSCLASS_SKIP_NURSERY_FINALIZE;
 }
 
 class Nursery {
  public:
   static const size_t Alignment = gc::ChunkSize;
   static const size_t ChunkShift = gc::ChunkShift;
@@ -225,17 +225,17 @@ class Nursery {
   }
 
   template <typename T>
   inline bool isInside(const SharedMem<T>& p) const;
 
   // Allocate and return a pointer to a new GC object with its |slots|
   // pointer pre-filled. Returns nullptr if the Nursery is full.
   JSObject* allocateObject(JSContext* cx, size_t size, size_t numDynamic,
-                           const js::Class* clasp);
+                           const JSClass* clasp);
 
   // Allocate and return a pointer to a new string. Returns nullptr if the
   // Nursery is full.
   gc::Cell* allocateString(JS::Zone* zone, size_t size, gc::AllocKind kind);
 
   // String zones are stored just before the string in nursery memory.
   static JS::Zone* getStringZone(const JSString* str) {
 #ifdef DEBUG
--- a/js/src/gc/ObjectKind-inl.h
+++ b/js/src/gc/ObjectKind-inl.h
@@ -13,17 +13,17 @@
 #define gc_ObjectKind_inl_h
 
 #include "vm/NativeObject.h"
 
 namespace js {
 namespace gc {
 
 static inline bool CanBeFinalizedInBackground(AllocKind kind,
-                                              const Class* clasp) {
+                                              const JSClass* clasp) {
   MOZ_ASSERT(IsObjectAllocKind(kind));
   /* If the class has no finalizer or a finalizer that is safe to call on
    * a different thread, we change the alloc kind. For example,
    * AllocKind::OBJECT0 calls the finalizer on the main thread,
    * AllocKind::OBJECT0_BACKGROUND calls the finalizer on the gcHelperThread.
    * IsBackgroundFinalized is called to prevent recursively incrementing
    * the alloc kind; kind may already be a background finalize kind.
    */
@@ -46,17 +46,17 @@ extern const AllocKind slotsToThingKind[
 /* Get the best kind to use when making an object with the given slot count. */
 static inline AllocKind GetGCObjectKind(size_t numSlots) {
   if (numSlots >= SLOTS_TO_THING_KIND_LIMIT) {
     return AllocKind::OBJECT16;
   }
   return slotsToThingKind[numSlots];
 }
 
-static inline AllocKind GetGCObjectKind(const Class* clasp) {
+static inline AllocKind GetGCObjectKind(const JSClass* clasp) {
   if (clasp == FunctionClassPtr) {
     return AllocKind::FUNCTION;
   }
 
   MOZ_ASSERT(!clasp->isProxy(), "Proxies should use GetProxyGCObjectKind");
 
   uint32_t nslots = JSCLASS_RESERVED_SLOTS(clasp);
   if (clasp->flags & JSCLASS_HAS_PRIVATE) {
@@ -127,17 +127,17 @@ static inline size_t GetGCKindSlots(Allo
     case AllocKind::OBJECT16:
     case AllocKind::OBJECT16_BACKGROUND:
       return 16;
     default:
       MOZ_CRASH("Bad object alloc kind");
   }
 }
 
-static inline size_t GetGCKindSlots(AllocKind thingKind, const Class* clasp) {
+static inline size_t GetGCKindSlots(AllocKind thingKind, const JSClass* clasp) {
   size_t nslots = GetGCKindSlots(thingKind);
 
   /* An object's private data uses the space taken by its last fixed slot. */
   if (clasp->flags & JSCLASS_HAS_PRIVATE) {
     MOZ_ASSERT(nslots > 0);
     nslots--;
   }
 
--- a/js/src/jit/BaselineCacheIRCompiler.cpp
+++ b/js/src/jit/BaselineCacheIRCompiler.cpp
@@ -2352,17 +2352,17 @@ bool BaselineCacheIRCompiler::emitGuardF
       Address flagAddr(BaselineFrameReg, BaselineFrame::reverseOffsetOfFlags());
       masm.branchTest32(Assembler::NonZero, flagAddr,
                         Imm32(BaselineFrame::HAS_ARGS_OBJ), failure->label());
     } break;
     case CallFlags::FunApplyArray: {
       // Ensure that args is an array object.
       masm.branchTestObject(Assembler::NotEqual, argsAddr, failure->label());
       masm.unboxObject(argsAddr, scratch);
-      const Class* clasp = &ArrayObject::class_;
+      const JSClass* clasp = &ArrayObject::class_;
       masm.branchTestObjClass(Assembler::NotEqual, scratch, clasp, scratch2,
                               scratch, failure->label());
 
       // Get the array elements and length
       Register elementsReg = scratch;
       masm.loadPtr(Address(scratch, NativeObject::offsetOfElements()),
                    elementsReg);
       Register calleeArgcReg = scratch2;
--- a/js/src/jit/BaselineInspector.cpp
+++ b/js/src/jit/BaselineInspector.cpp
@@ -779,24 +779,24 @@ JSObject* BaselineInspector::getTemplate
         return result;
       }
     }
   }
 
   return nullptr;
 }
 
-JSObject* BaselineInspector::getTemplateObjectForClassHook(jsbytecode* pc,
-                                                           const Class* clasp) {
+JSObject* BaselineInspector::getTemplateObjectForClassHook(
+    jsbytecode* pc, const JSClass* clasp) {
   const ICEntry& entry = icEntryFromPC(pc);
   for (ICStub* stub = entry.firstStub(); stub; stub = stub->next()) {
     if (ICStub::IsCacheIRKind(stub->kind())) {
       auto filter = [stub, clasp](CacheIRReader& args,
                                   const CacheIRStubInfo* info) {
-        return info->getStubField<Class*>(stub, args.stubOffset()) == clasp;
+        return info->getStubField<JSClass*>(stub, args.stubOffset()) == clasp;
       };
       JSObject* result = MaybeTemplateObject(
           stub, MetaTwoByteKind::ClassTemplateObject, filter);
       if (result) {
         return result;
       }
     }
   }
--- a/js/src/jit/BaselineInspector.h
+++ b/js/src/jit/BaselineInspector.h
@@ -90,17 +90,17 @@ class BaselineInspector {
 
   bool hasSeenNegativeIndexGetElement(jsbytecode* pc);
   bool hasSeenNonIntegerIndex(jsbytecode* pc);
   bool hasSeenAccessedGetter(jsbytecode* pc);
   bool hasSeenDoubleResult(jsbytecode* pc);
 
   JSObject* getTemplateObject(jsbytecode* pc);
   JSObject* getTemplateObjectForNative(jsbytecode* pc, Native native);
-  JSObject* getTemplateObjectForClassHook(jsbytecode* pc, const Class* clasp);
+  JSObject* getTemplateObjectForClassHook(jsbytecode* pc, const JSClass* clasp);
 
   // Sometimes the group a template object will have is known, even if the
   // object itself isn't.
   ObjectGroup* getTemplateObjectGroup(jsbytecode* pc);
 
   JSFunction* getSingleCallee(jsbytecode* pc);
 
   LexicalEnvironmentObject* templateNamedLambdaObject();
--- a/js/src/jit/CacheIR.cpp
+++ b/js/src/jit/CacheIR.cpp
@@ -1649,17 +1649,17 @@ AttachDecision GetPropIRGenerator::tryAt
     case ProxyStubType::Generic:
       return tryAttachGenericProxy(obj, objId, id,
                                    /* handleDOMProxies = */ false);
   }
 
   MOZ_CRASH("Unexpected ProxyStubType");
 }
 
-static TypedThingLayout GetTypedThingLayout(const Class* clasp) {
+static TypedThingLayout GetTypedThingLayout(const JSClass* clasp) {
   if (IsTypedArrayClass(clasp)) {
     return Layout_TypedArray;
   }
   if (IsOutlineTypedObjectClass(clasp)) {
     return Layout_OutlineTypedObject;
   }
   if (IsInlineTypedObjectClass(clasp)) {
     return Layout_InlineTypedObject;
@@ -3671,17 +3671,17 @@ static bool CanAttachAddElement(NativeOb
   // Make sure the objects on the prototype don't have any indexed properties
   // or that such properties can't appear without a shape change.
   do {
     // The first two checks are also relevant to the receiver object.
     if (obj->isIndexed()) {
       return false;
     }
 
-    const Class* clasp = obj->getClass();
+    const JSClass* clasp = obj->getClass();
     if (clasp != &ArrayObject::class_ &&
         (clasp->getAddProperty() || clasp->getResolve() ||
          clasp->getOpsLookupProperty() || clasp->getOpsSetProperty())) {
       return false;
     }
 
     // If we're initializing a property instead of setting one, the objects
     // on the prototype are not relevant.
@@ -5439,18 +5439,18 @@ void CallIRGenerator::trackAttached(cons
     sp.valueProperty("thisval", thisval_);
     sp.valueProperty("argc", Int32Value(argc_));
   }
 #endif
 }
 
 // Class which holds a shape pointer for use when caches might reference data in
 // other zones.
-static const Class shapeContainerClass = {"ShapeContainer",
-                                          JSCLASS_HAS_RESERVED_SLOTS(1)};
+static const JSClass shapeContainerClass = {"ShapeContainer",
+                                            JSCLASS_HAS_RESERVED_SLOTS(1)};
 
 static const size_t SHAPE_CONTAINER_SLOT = 0;
 
 JSObject* jit::NewWrapperWithObjectShape(JSContext* cx,
                                          HandleNativeObject obj) {
   MOZ_ASSERT(cx->compartment() != obj->compartment());
 
   RootedObject wrapper(cx);
--- a/js/src/jit/CacheIR.h
+++ b/js/src/jit/CacheIR.h
@@ -962,17 +962,17 @@ class MOZ_RAII CacheIRWriter : public JS
 
   void guardClass(ObjOperandId obj, GuardClassKind kind) {
     static_assert(sizeof(GuardClassKind) == sizeof(uint8_t),
                   "GuardClassKind must fit in a byte");
     writeOpWithOperandId(CacheOp::GuardClass, obj);
     buffer_.writeByte(uint32_t(kind));
   }
 
-  FieldOffset guardAnyClass(ObjOperandId obj, const Class* clasp) {
+  FieldOffset guardAnyClass(ObjOperandId obj, const JSClass* clasp) {
     writeOpWithOperandId(CacheOp::GuardAnyClass, obj);
     return addStubField(uintptr_t(clasp), StubField::Type::RawWord);
   }
 
   void guardFunctionIsNative(ObjOperandId obj) {
     writeOpWithOperandId(CacheOp::GuardFunctionIsNative, obj);
   }
 
--- a/js/src/jit/CacheIRCompiler.cpp
+++ b/js/src/jit/CacheIRCompiler.cpp
@@ -957,17 +957,17 @@ template GCPtr<JSString*>& CacheIRStubIn
 template GCPtr<JSFunction*>& CacheIRStubInfo::getStubField<ICStub>(
     ICStub* stub, uint32_t offset) const;
 template GCPtr<JS::Symbol*>& CacheIRStubInfo::getStubField<ICStub>(
     ICStub* stub, uint32_t offset) const;
 template GCPtr<JS::Value>& CacheIRStubInfo::getStubField<ICStub>(
     ICStub* stub, uint32_t offset) const;
 template GCPtr<jsid>& CacheIRStubInfo::getStubField<ICStub>(
     ICStub* stub, uint32_t offset) const;
-template GCPtr<Class*>& CacheIRStubInfo::getStubField<ICStub>(
+template GCPtr<JSClass*>& CacheIRStubInfo::getStubField<ICStub>(
     ICStub* stub, uint32_t offset) const;
 template GCPtr<ArrayObject*>& CacheIRStubInfo::getStubField<ICStub>(
     ICStub* stub, uint32_t offset) const;
 
 template <typename T, typename V>
 static void InitGCPtr(uintptr_t* ptr, V val) {
   AsGCPtr<T>(ptr)->init(mozilla::BitwiseCast<T>(val));
 }
@@ -1633,17 +1633,17 @@ bool CacheIRCompiler::emitGuardClass() {
   Register obj = allocator.useRegister(masm, objId);
   AutoScratchRegister scratch(allocator, masm);
 
   FailurePath* failure;
   if (!addFailurePath(&failure)) {
     return false;
   }
 
-  const Class* clasp = nullptr;
+  const JSClass* clasp = nullptr;
   switch (reader.guardClassKind()) {
     case GuardClassKind::Array:
       clasp = &ArrayObject::class_;
       break;
     case GuardClassKind::MappedArguments:
       clasp = &MappedArgumentsObject::class_;
       break;
     case GuardClassKind::UnmappedArguments:
@@ -1704,17 +1704,17 @@ bool CacheIRCompiler::emitGuardSpecificN
   AutoScratchRegister scratch(allocator, masm);
 
   FailurePath* failure;
   if (!addFailurePath(&failure)) {
     return false;
   }
 
   // Ensure obj is a function.
-  const Class* clasp = &JSFunction::class_;
+  const JSClass* clasp = &JSFunction::class_;
   masm.branchTestObjClass(Assembler::NotEqual, obj, clasp, scratch, obj,
                           failure->label());
 
   // Ensure function native matches.
   masm.branchPtr(Assembler::NotEqual,
                  Address(obj, JSFunction::offsetOfNativeOrEnv()),
                  ImmPtr(nativeFunc), failure->label());
   return true;
--- a/js/src/jit/CacheIRCompiler.h
+++ b/js/src/jit/CacheIRCompiler.h
@@ -890,19 +890,19 @@ class MOZ_RAII CacheIRCompiler {
   ObjectGroup* groupStubField(uint32_t offset) {
     MOZ_ASSERT(stubFieldPolicy_ == StubFieldPolicy::Constant);
     return (ObjectGroup*)readStubWord(offset, StubField::Type::ObjectGroup);
   }
   JS::Compartment* compartmentStubField(uint32_t offset) {
     MOZ_ASSERT(stubFieldPolicy_ == StubFieldPolicy::Constant);
     return (JS::Compartment*)readStubWord(offset, StubField::Type::RawWord);
   }
-  const Class* classStubField(uintptr_t offset) {
+  const JSClass* classStubField(uintptr_t offset) {
     MOZ_ASSERT(stubFieldPolicy_ == StubFieldPolicy::Constant);
-    return (const Class*)readStubWord(offset, StubField::Type::RawWord);
+    return (const JSClass*)readStubWord(offset, StubField::Type::RawWord);
   }
   const void* proxyHandlerStubField(uintptr_t offset) {
     MOZ_ASSERT(stubFieldPolicy_ == StubFieldPolicy::Constant);
     return (const void*)readStubWord(offset, StubField::Type::RawWord);
   }
   jsid idStubField(uint32_t offset) {
     MOZ_ASSERT(stubFieldPolicy_ == StubFieldPolicy::Constant);
     return jsid::fromRawBits(readStubWord(offset, StubField::Type::Id));
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -12735,23 +12735,23 @@ void CodeGenerator::emitIsCallableOrCons
   masm.jump(&done);
 
   masm.bind(&notFunction);
 
   // Just skim proxies off. Their notion of isCallable()/isConstructor() is
   // more complicated.
   masm.branchTestClassIsProxy(true, output, failure);
 
-  masm.branchPtr(Assembler::NonZero, Address(output, offsetof(js::Class, cOps)),
+  masm.branchPtr(Assembler::NonZero, Address(output, offsetof(JSClass, cOps)),
                  ImmPtr(nullptr), &hasCOps);
   masm.move32(Imm32(0), output);
   masm.jump(&done);
 
   masm.bind(&hasCOps);
-  masm.loadPtr(Address(output, offsetof(js::Class, cOps)), output);
+  masm.loadPtr(Address(output, offsetof(JSClass, cOps)), output);
   size_t opsOffset = mode == Callable ? offsetof(JSClassOps, call)
                                       : offsetof(JSClassOps, construct);
   masm.cmpPtrSet(Assembler::NonZero, Address(output, opsOffset),
                  ImmPtr(nullptr), output);
 
   masm.bind(&done);
 }
 
@@ -12922,23 +12922,23 @@ void CodeGenerator::visitIsTypedArray(LI
     ool = oolCallVM<Fn, jit::IsPossiblyWrappedTypedArray>(
         lir, ArgList(object), StoreRegisterTo(output));
   }
 
   Label notTypedArray;
   Label done;
 
   static_assert(Scalar::Int8 == 0, "Int8 is the first typed array class");
-  const Class* firstTypedArrayClass =
+  const JSClass* firstTypedArrayClass =
       TypedArrayObject::classForType(Scalar::Int8);
 
   static_assert(
       (Scalar::BigUint64 - Scalar::Int8) == Scalar::MaxTypedArrayViewType - 1,
       "BigUint64 is the last typed array class");
-  const Class* lastTypedArrayClass =
+  const JSClass* lastTypedArrayClass =
       TypedArrayObject::classForType(Scalar::BigUint64);
 
   masm.loadObjClassUnsafe(object, output);
   masm.branchPtr(Assembler::Below, output, ImmPtr(firstTypedArrayClass),
                  &notTypedArray);
   masm.branchPtr(Assembler::Above, output, ImmPtr(lastTypedArrayClass),
                  &notTypedArray);
 
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -5640,17 +5640,17 @@ AbortReasonOr<Ok> IonBuilder::jsop_sprea
   // leaked to user. The complications of spread call iterator behaviour are
   // handled when the user objects are expanded and copied into this hidden
   // array.
 
 #ifdef DEBUG
   // If we know class, ensure it is what we expected
   MDefinition* argument = current->peek(-1);
   if (TemporaryTypeSet* objTypes = argument->resultTypeSet()) {
-    if (const Class* clasp = objTypes->getKnownClass(constraints())) {
+    if (const JSClass* clasp = objTypes->getKnownClass(constraints())) {
       MOZ_ASSERT(clasp == &ArrayObject::class_);
     }
   }
 #endif
 
   MDefinition* argArr = current->pop();
   MDefinition* argThis = current->pop();
   MDefinition* argFunc = current->pop();
@@ -7679,32 +7679,32 @@ void IonBuilder::maybeMarkEmpty(MDefinit
     if (types) {
       ins->setResultTypeSet(types);
       return;
     }
   }
 }
 
 // Return whether property lookups can be performed effectlessly on clasp.
-static bool ClassHasEffectlessLookup(const Class* clasp) {
+static bool ClassHasEffectlessLookup(const JSClass* clasp) {
   return IsTypedObjectClass(clasp) ||
          (clasp->isNative() && !clasp->getOpsLookupProperty());
 }
 
 // Return whether an object might have a property for name which is not
 // accounted for by type information.
 static bool ObjectHasExtraOwnProperty(CompileRealm* realm,
                                       TypeSet::ObjectKey* object, jsid id) {
   // Some typed object properties are not reflected in type information.
   if (object->isGroup() && object->group()->maybeTypeDescr()) {
     return object->group()->typeDescr().hasProperty(realm->runtime()->names(),
                                                     id);
   }
 
-  const Class* clasp = object->clasp();
+  const JSClass* clasp = object->clasp();
 
   // Array |length| properties are not reflected in type information.
   if (clasp == &ArrayObject::class_) {
     return JSID_IS_ATOM(id, realm->runtime()->names().length);
   }
 
   // Resolve hooks can install new properties on objects on demand.
   JSObject* singleton = object->isSingleton() ? object->singleton() : nullptr;
@@ -7857,17 +7857,17 @@ JSObject* IonBuilder::testSingletonPrope
         if (!alloc().ensureBallast()) {
           return nullptr;
         }
 
         if (analysisContext) {
           key->ensureTrackedProperty(analysisContext, id);
         }
 
-        const Class* clasp = key->clasp();
+        const JSClass* clasp = key->clasp();
         if (!ClassHasEffectlessLookup(clasp) ||
             ObjectHasExtraOwnProperty(realm, key, id)) {
           return nullptr;
         }
         if (key->unknownProperties()) {
           return nullptr;
         }
         HeapTypeSetKey property = key->property(id);
@@ -7926,17 +7926,17 @@ AbortReasonOr<bool> IonBuilder::testNotD
         return abort(AbortReason::Alloc);
       }
 
       if (!key->hasStableClassAndProto(constraints()) ||
           key->unknownProperties()) {
         return false;
       }
 
-      const Class* clasp = key->clasp();
+      const JSClass* clasp = key->clasp();
       if (!ClassHasEffectlessLookup(clasp) ||
           ObjectHasExtraOwnProperty(realm, key, id)) {
         return false;
       }
 
       // If the object is a singleton, we can do a lookup now to avoid
       // unnecessary invalidations later on, in case the property types
       // have not yet been instantiated.
@@ -8866,30 +8866,30 @@ AbortReasonOr<Ok> IonBuilder::pushDerive
   current->push(derivedTypedObj);
 
   // Determine (if possible) the class/proto that `derivedTypedObj` will
   // have. For derived typed objects, the opacity will be the same as the
   // incoming object from which the derived typed object is, well, derived.
   // The prototype will be determined based on the type descriptor (and is
   // immutable).
   TemporaryTypeSet* objTypes = obj->resultTypeSet();
-  const Class* expectedClass = nullptr;
-  if (const Class* objClass =
+  const JSClass* expectedClass = nullptr;
+  if (const JSClass* objClass =
           objTypes ? objTypes->getKnownClass(constraints()) : nullptr) {
     MOZ_ASSERT(IsTypedObjectClass(objClass));
     expectedClass =
         GetOutlineTypedObjectClass(IsOpaqueTypedObjectClass(objClass));
   }
   const TypedProto* expectedProto = derivedPrediction.getKnownPrototype();
   MOZ_ASSERT_IF(expectedClass, IsTypedObjectClass(expectedClass));
 
   // Determine (if possible) the class/proto that the observed type set
   // describes.
   TemporaryTypeSet* observedTypes = bytecodeTypes(pc);
-  const Class* observedClass = observedTypes->getKnownClass(constraints());
+  const JSClass* observedClass = observedTypes->getKnownClass(constraints());
 
   // If expectedClass/expectedProto are both non-null (and hence known), we
   // can predict precisely what object group derivedTypedObj will have.
   // Therefore, if we observe that this group is already contained in the set
   // of observedTypes, we can skip the barrier.
   //
   // Barriers still wind up being needed in some relatively
   // rare cases:
@@ -9899,17 +9899,17 @@ AbortReasonOr<Ok> IonBuilder::initOrSetE
   // We can avoid worrying about holes in the IC if we know a priori we are safe
   // from them. If TI can guard that there are no indexed properties on the
   // prototype chain, we know that we aren't missing any setters by overwriting
   // the hole with another value.
   bool guardHoles;
   MOZ_TRY_VAR(guardHoles, ElementAccessHasExtraIndexedProperty(this, object));
 
   // Make sure the object being written to doesn't have copy on write elements.
-  const Class* clasp =
+  const JSClass* clasp =
       object->resultTypeSet()
           ? object->resultTypeSet()->getKnownClass(constraints())
           : nullptr;
   bool checkNative = !clasp || !clasp->isNative();
   object = addMaybeCopyElementsForWrite(object, checkNative);
 
   // Emit SetPropertyCache.
   bool strict = JSOp(*pc) == JSOP_STRICTSETELEM;
@@ -10505,17 +10505,17 @@ NativeObject* IonBuilder::commonPrototyp
       continue;
     }
 
     while (key) {
       if (key->unknownProperties()) {
         return nullptr;
       }
 
-      const Class* clasp = key->clasp();
+      const JSClass* clasp = key->clasp();
       if (!ClassHasEffectlessLookup(clasp)) {
         return nullptr;
       }
       JSObject* singleton = key->isSingleton() ? key->singleton() : nullptr;
       if (ObjectHasExtraOwnProperty(realm, key, id)) {
         if (!singleton || !singleton->is<GlobalObject>()) {
           return nullptr;
         }
@@ -10736,17 +10736,17 @@ AbortReasonOr<Ok> IonBuilder::annotateGe
       continue;
     }
     TypeSet::ObjectKey* key = TypeSet::ObjectKey::get(group);
     if (key->unknownProperties() || !key->proto().isObject()) {
       continue;
     }
     JSObject* proto = checkNurseryObject(key->proto().toObject());
 
-    const Class* clasp = key->clasp();
+    const JSClass* clasp = key->clasp();
     if (!ClassHasEffectlessLookup(clasp) ||
         ObjectHasExtraOwnProperty(realm, key, NameToId(name))) {
       continue;
     }
 
     HeapTypeSetKey ownTypes = key->property(NameToId(name));
     if (ownTypes.isOwnProperty(constraints())) {
       continue;
@@ -13742,17 +13742,17 @@ AbortReasonOr<Ok> IonBuilder::loadTypedO
   MOZ_TRY(loadTypedObjectData(typedObj, &owner, &ownerByteOffset));
 
   if (!ownerByteOffset.add(baseByteOffset)) {
     return abort(AbortReason::Disable,
                  "Overflow after adding the base offset.");
   }
 
   TemporaryTypeSet* ownerTypes = owner->resultTypeSet();
-  const Class* clasp =
+  const JSClass* clasp =
       ownerTypes ? ownerTypes->getKnownClass(constraints()) : nullptr;
   if (clasp && IsInlineTypedObjectClass(clasp)) {
     // Perform the load directly from the owner pointer.
     if (!ownerByteOffset.add(InlineTypedObject::offsetOfDataStart())) {
       return abort(AbortReason::Disable,
                    "Overflow after adding the data start.");
     }
     *ownerElements = owner;
--- a/js/src/jit/IonBuilder.h
+++ b/js/src/jit/IonBuilder.h
@@ -833,21 +833,21 @@ class IonBuilder : public MIRGenerator,
   InliningResult inlineIsCallable(CallInfo& callInfo);
   InliningResult inlineIsConstructor(CallInfo& callInfo);
   InliningResult inlineIsObject(CallInfo& callInfo);
   InliningResult inlineToObject(CallInfo& callInfo);
   InliningResult inlineIsCrossRealmArrayConstructor(CallInfo& callInfo);
   InliningResult inlineToInteger(CallInfo& callInfo);
   InliningResult inlineToString(CallInfo& callInfo);
   InliningResult inlineDump(CallInfo& callInfo);
-  InliningResult inlineHasClass(CallInfo& callInfo, const Class* clasp,
-                                const Class* clasp2 = nullptr,
-                                const Class* clasp3 = nullptr,
-                                const Class* clasp4 = nullptr);
-  InliningResult inlineGuardToClass(CallInfo& callInfo, const Class* clasp);
+  InliningResult inlineHasClass(CallInfo& callInfo, const JSClass* clasp,
+                                const JSClass* clasp2 = nullptr,
+                                const JSClass* clasp3 = nullptr,
+                                const JSClass* clasp4 = nullptr);
+  InliningResult inlineGuardToClass(CallInfo& callInfo, const JSClass* clasp);
   InliningResult inlineIsConstructing(CallInfo& callInfo);
   InliningResult inlineSubstringKernel(CallInfo& callInfo);
   InliningResult inlineObjectHasPrototype(CallInfo& callInfo);
   InliningResult inlineFinishBoundFunctionInit(CallInfo& callInfo);
   InliningResult inlineIsPackedArray(CallInfo& callInfo);
   InliningResult inlineWasmCall(CallInfo& callInfo, JSFunction* target);
 
   // Testing functions.
--- a/js/src/jit/IonCacheIRCompiler.cpp
+++ b/js/src/jit/IonCacheIRCompiler.cpp
@@ -677,17 +677,17 @@ bool IonCacheIRCompiler::emitGuardCompar
 }
 
 bool IonCacheIRCompiler::emitGuardAnyClass() {
   JitSpew(JitSpew_Codegen, __FUNCTION__);
   ObjOperandId objId = reader.objOperandId();
   Register obj = allocator.useRegister(masm, objId);
   AutoScratchRegister scratch(allocator, masm);
 
-  const Class* clasp = classStubField(reader.stubOffset());
+  const JSClass* clasp = classStubField(reader.stubOffset());
 
   FailurePath* failure;
   if (!addFailurePath(&failure)) {
     return false;
   }
 
   if (objectGuardNeedsSpectreMitigations(objId)) {
     masm.branchTestObjClass(Assembler::NotEqual, obj, clasp, scratch, obj,
--- a/js/src/jit/MCallOptimize.cpp
+++ b/js/src/jit/MCallOptimize.cpp
@@ -624,17 +624,17 @@ IonBuilder::InliningResult IonBuilder::i
     MInstruction* byteOffset = addTypedArrayByteOffset(thisArg);
     current->push(byteOffset);
     return InliningStatus_Inlined;
   }
 
   // Try to optimize RegExp getters.
   RegExpFlags mask = RegExpFlag::NoFlags;
   if (RegExpObject::isOriginalFlagGetter(native, &mask)) {
-    const Class* clasp = thisTypes->getKnownClass(constraints());
+    const JSClass* clasp = thisTypes->getKnownClass(constraints());
     if (clasp != &RegExpObject::class_) {
       return InliningStatus_NotInlined;
     }
 
     MLoadFixedSlot* flags =
         MLoadFixedSlot::New(alloc(), thisArg, RegExpObject::flagsSlot());
     current->add(flags);
     flags->setResultType(MIRType::Int32);
@@ -815,17 +815,17 @@ IonBuilder::InliningResult IonBuilder::i
 
     MInstruction* setLength = setInitializedLength(array, initLength);
     MOZ_TRY(resumeAfter(setLength));
   }
 
   return InliningStatus_Inlined;
 }
 
-static bool IsArrayClass(const Class* clasp) {
+static bool IsArrayClass(const JSClass* clasp) {
   return clasp == &ArrayObject::class_;
 }
 
 IonBuilder::InliningResult IonBuilder::inlineArrayIsArray(CallInfo& callInfo) {
   if (callInfo.constructing() || callInfo.argc() != 1) {
     trackOptimizationOutcome(TrackedOutcome::CantInlineNativeBadForm);
     return InliningStatus_NotInlined;
   }
@@ -913,17 +913,17 @@ IonBuilder::InliningResult IonBuilder::i
       OBJECT_FLAG_SPARSE_INDEXES | OBJECT_FLAG_LENGTH_OVERFLOW |
       OBJECT_FLAG_ITERATED | OBJECT_FLAG_NON_EXTENSIBLE_ELEMENTS;
 
   MDefinition* obj = callInfo.thisArg();
   TemporaryTypeSet* thisTypes = obj->resultTypeSet();
   if (!thisTypes) {
     return InliningStatus_NotInlined;
   }
-  const Class* clasp = thisTypes->getKnownClass(constraints());
+  const JSClass* clasp = thisTypes->getKnownClass(constraints());
   if (clasp != &ArrayObject::class_) {
     return InliningStatus_NotInlined;
   }
   if (thisTypes->hasObjectFlags(constraints(), unhandledFlags)) {
     trackOptimizationOutcome(TrackedOutcome::ArrayBadFlags);
     return InliningStatus_NotInlined;
   }
 
@@ -982,17 +982,17 @@ IonBuilder::InliningResult IonBuilder::i
   // for MArrayJoin can be notified to check for common empty and one-item
   // arrays.
   bool optimizeForArray = ([&]() {
     TemporaryTypeSet* thisTypes = callInfo.thisArg()->resultTypeSet();
     if (!thisTypes) {
       return false;
     }
 
-    const Class* clasp = thisTypes->getKnownClass(constraints());
+    const JSClass* clasp = thisTypes->getKnownClass(constraints());
     if (clasp != &ArrayObject::class_) {
       return false;
     }
 
     return true;
   })();
 
   callInfo.setImplicitlyUsedUnchecked();
@@ -1038,17 +1038,17 @@ IonBuilder::InliningResult IonBuilder::i
   if (obj->type() != MIRType::Object) {
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* thisTypes = obj->resultTypeSet();
   if (!thisTypes) {
     return InliningStatus_NotInlined;
   }
-  const Class* clasp = thisTypes->getKnownClass(constraints());
+  const JSClass* clasp = thisTypes->getKnownClass(constraints());
   if (clasp != &ArrayObject::class_) {
     return InliningStatus_NotInlined;
   }
 
   bool hasIndexedProperty;
   MOZ_TRY_VAR(hasIndexedProperty,
               ElementAccessHasExtraIndexedProperty(this, obj));
   if (hasIndexedProperty) {
@@ -1169,17 +1169,17 @@ IonBuilder::InliningResult IonBuilder::i
   }
 
   // |this| must be a dense array.
   TemporaryTypeSet* thisTypes = obj->resultTypeSet();
   if (!thisTypes) {
     return InliningStatus_NotInlined;
   }
 
-  const Class* clasp = thisTypes->getKnownClass(constraints());
+  const JSClass* clasp = thisTypes->getKnownClass(constraints());
   if (clasp != &ArrayObject::class_) {
     return InliningStatus_NotInlined;
   }
 
   // Watch out for extra indexed properties on the object or its prototype.
   bool hasIndexedProperty;
   MOZ_TRY_VAR(hasIndexedProperty,
               ElementAccessHasExtraIndexedProperty(this, obj));
@@ -2061,17 +2061,17 @@ IonBuilder::InliningResult IonBuilder::i
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* arrayTypes = array->resultTypeSet();
   if (!arrayTypes) {
     return InliningStatus_NotInlined;
   }
 
-  const Class* clasp = arrayTypes->getKnownClass(constraints());
+  const JSClass* clasp = arrayTypes->getKnownClass(constraints());
   if (clasp != &ArrayObject::class_) {
     return InliningStatus_NotInlined;
   }
 
   // Only inline if the array uses dense storage.
   ObjectGroupFlags unhandledFlags = OBJECT_FLAG_SPARSE_INDEXES |
                                     OBJECT_FLAG_LENGTH_OVERFLOW |
                                     OBJECT_FLAG_NON_PACKED;
@@ -2321,17 +2321,17 @@ IonBuilder::InliningResult IonBuilder::i
   MDefinition* strArg = callInfo.getArg(1);
   MDefinition* lastIndexArg = callInfo.getArg(2);
 
   if (rxArg->type() != MIRType::Object && rxArg->type() != MIRType::Value) {
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* rxTypes = rxArg->resultTypeSet();
-  const Class* clasp =
+  const JSClass* clasp =
       rxTypes ? rxTypes->getKnownClass(constraints()) : nullptr;
   if (clasp != &RegExpObject::class_) {
     return InliningStatus_NotInlined;
   }
 
   if (strArg->type() != MIRType::String && strArg->type() != MIRType::Value) {
     return InliningStatus_NotInlined;
   }
@@ -2371,17 +2371,17 @@ IonBuilder::InliningResult IonBuilder::i
   MDefinition* strArg = callInfo.getArg(1);
   MDefinition* lastIndexArg = callInfo.getArg(2);
 
   if (rxArg->type() != MIRType::Object && rxArg->type() != MIRType::Value) {
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* regexpTypes = rxArg->resultTypeSet();
-  const Class* clasp =
+  const JSClass* clasp =
       regexpTypes ? regexpTypes->getKnownClass(constraints()) : nullptr;
   if (clasp != &RegExpObject::class_) {
     return InliningStatus_NotInlined;
   }
 
   if (strArg->type() != MIRType::String && strArg->type() != MIRType::Value) {
     return InliningStatus_NotInlined;
   }
@@ -2420,17 +2420,17 @@ IonBuilder::InliningResult IonBuilder::i
   MDefinition* strArg = callInfo.getArg(1);
   MDefinition* lastIndexArg = callInfo.getArg(2);
 
   if (rxArg->type() != MIRType::Object && rxArg->type() != MIRType::Value) {
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* rxTypes = rxArg->resultTypeSet();
-  const Class* clasp =
+  const JSClass* clasp =
       rxTypes ? rxTypes->getKnownClass(constraints()) : nullptr;
   if (clasp != &RegExpObject::class_) {
     return InliningStatus_NotInlined;
   }
 
   if (strArg->type() != MIRType::String && strArg->type() != MIRType::Value) {
     return InliningStatus_NotInlined;
   }
@@ -2466,17 +2466,18 @@ IonBuilder::InliningResult IonBuilder::i
   }
 
   MDefinition* arg = callInfo.getArg(0);
 
   bool isRegExpObjectKnown = false;
   bool isRegExpObjectConstant;
   if (arg->type() == MIRType::Object) {
     TemporaryTypeSet* types = arg->resultTypeSet();
-    const Class* clasp = types ? types->getKnownClass(constraints()) : nullptr;
+    const JSClass* clasp =
+        types ? types->getKnownClass(constraints()) : nullptr;
     if (clasp) {
       isRegExpObjectKnown = true;
       isRegExpObjectConstant = (clasp == &RegExpObject::class_);
     }
   } else if (!arg->mightBeType(MIRType::Object)) {
     // NB: This case only happens when Phi-nodes flow into IsRegExpObject.
     // IsRegExpObject itself will never be called with a non-Object value.
     isRegExpObjectKnown = true;
@@ -2809,17 +2810,17 @@ IonBuilder::InliningResult IonBuilder::i
   if (!res) {
     return InliningStatus_NotInlined;
   }
 
   // At this point we know we're going to inline this.
   callInfo.setImplicitlyUsedUnchecked();
 
   // Try to constant fold some common cases.
-  if (const Class* knownClass = types->getKnownClass(constraints())) {
+  if (const JSClass* knownClass = types->getKnownClass(constraints())) {
     if (knownClass == &PlainObject::class_) {
       pushConstant(StringValue(names().objectObject));
       return InliningStatus_Inlined;
     }
     if (IsArrayClass(knownClass)) {
       pushConstant(StringValue(names().objectArray));
       return InliningStatus_Inlined;
     }
@@ -2832,44 +2833,44 @@ IonBuilder::InliningResult IonBuilder::i
   MObjectClassToString* toString = MObjectClassToString::New(alloc(), arg);
   current->add(toString);
   current->push(toString);
 
   return InliningStatus_Inlined;
 }
 
 IonBuilder::InliningResult IonBuilder::inlineHasClass(CallInfo& callInfo,
-                                                      const Class* clasp1,
-                                                      const Class* clasp2,
-                                                      const Class* clasp3,
-                                                      const Class* clasp4) {
+                                                      const JSClass* clasp1,
+                                                      const JSClass* clasp2,
+                                                      const JSClass* clasp3,
+                                                      const JSClass* clasp4) {
   MOZ_ASSERT(!callInfo.constructing());
   MOZ_ASSERT(callInfo.argc() == 1);
 
   if (callInfo.getArg(0)->type() != MIRType::Object) {
     return InliningStatus_NotInlined;
   }
   if (getInlineReturnType() != MIRType::Boolean) {
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* types = callInfo.getArg(0)->resultTypeSet();
-  const Class* knownClass =
+  const JSClass* knownClass =
       types ? types->getKnownClass(constraints()) : nullptr;
   if (knownClass) {
     pushConstant(BooleanValue(knownClass == clasp1 || knownClass == clasp2 ||
                               knownClass == clasp3 || knownClass == clasp4));
   } else {
     MHasClass* hasClass1 = MHasClass::New(alloc(), callInfo.getArg(0), clasp1);
     current->add(hasClass1);
 
     if (!clasp2 && !clasp3 && !clasp4) {
       current->push(hasClass1);
     } else {
-      const Class* remaining[] = {clasp2, clasp3, clasp4};
+      const JSClass* remaining[] = {clasp2, clasp3, clasp4};
       MDefinition* last = hasClass1;
       for (size_t i = 0; i < ArrayLength(remaining); i++) {
         MHasClass* hasClass =
             MHasClass::New(alloc(), callInfo.getArg(0), remaining[i]);
         current->add(hasClass);
         MBitOr* either = MBitOr::New(alloc(), last, hasClass);
         either->infer(inspector, pc);
         current->add(either);
@@ -2880,31 +2881,31 @@ IonBuilder::InliningResult IonBuilder::i
       current->push(result);
     }
   }
 
   callInfo.setImplicitlyUsedUnchecked();
   return InliningStatus_Inlined;
 }
 
-IonBuilder::InliningResult IonBuilder::inlineGuardToClass(CallInfo& callInfo,
-                                                          const Class* clasp) {
+IonBuilder::InliningResult IonBuilder::inlineGuardToClass(
+    CallInfo& callInfo, const JSClass* clasp) {
   MOZ_ASSERT(!callInfo.constructing());
   MOZ_ASSERT(callInfo.argc() == 1);
 
   if (callInfo.getArg(0)->type() != MIRType::Object) {
     return InliningStatus_NotInlined;
   }
 
   if (getInlineReturnType() != MIRType::Object) {
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* types = callInfo.getArg(0)->resultTypeSet();
-  const Class* knownClass =
+  const JSClass* knownClass =
       types ? types->getKnownClass(constraints()) : nullptr;
 
   if (knownClass && knownClass == clasp) {
     current->push(callInfo.getArg(0));
   } else {
     MGuardToClass* guardToClass =
         MGuardToClass::New(alloc(), callInfo.getArg(0), clasp);
     current->add(guardToClass);
@@ -2929,17 +2930,17 @@ IonBuilder::InliningResult IonBuilder::i
     return InliningStatus_NotInlined;
   }
 
   if (resultArg->type() != MIRType::Object) {
     return InliningStatus_NotInlined;
   }
 
   TemporaryTypeSet* resultTypes = resultArg->resultTypeSet();
-  const Class* resultClasp =
+  const JSClass* resultClasp =
       resultTypes ? resultTypes->getKnownClass(constraints()) : nullptr;
   if (resultClasp != &ArrayObject::class_) {
     return InliningStatus_NotInlined;
   }
 
   callInfo.setImplicitlyUsedUnchecked();
 
   MInstruction* next =
@@ -3071,17 +3072,17 @@ IonBuilder::InliningResult IonBuilder::i
     // Don't inline if the argument might be a wrapper.
     if (types->forAllClasses(constraints(), IsProxyClass) !=
         TemporaryTypeSet::ForAllResult::ALL_FALSE) {
       return InliningStatus_NotInlined;
     }
 
     // Don't inline if we saw mixed use of (Shared)ArrayBuffers and other
     // objects.
-    auto IsArrayBufferMaybeSharedClass = [](const Class* clasp) {
+    auto IsArrayBufferMaybeSharedClass = [](const JSClass* clasp) {
       return clasp == &ArrayBufferObject::class_ ||
              clasp == &SharedArrayBufferObject::class_;
     };
     switch (
         types->forAllClasses(constraints(), IsArrayBufferMaybeSharedClass)) {
       case TemporaryTypeSet::ForAllResult::ALL_FALSE:
         ins = MNewTypedArrayFromArray::New(
             alloc(), constraints(), templateObject,
@@ -3516,17 +3517,18 @@ IonBuilder::InliningResult IonBuilder::i
   MDefinition* arg = callInfo.getArg(0);
 
   // Try inlining with constant true/false: only objects may be callable at
   // all, and if we know the class check if it is callable.
   bool isCallableKnown = false;
   bool isCallableConstant;
   if (arg->type() == MIRType::Object) {
     TemporaryTypeSet* types = arg->resultTypeSet();
-    const Class* clasp = types ? types->getKnownClass(constraints()) : nullptr;
+    const JSClass* clasp =
+        types ? types->getKnownClass(constraints()) : nullptr;
     if (clasp && !clasp->isProxy()) {
       isCallableKnown = true;
       isCallableConstant = clasp->nonProxyCallable();
     }
   } else if (!arg->mightBeType(MIRType::Object)) {
     // Primitive (including undefined and null).
     isCallableKnown = true;
     isCallableConstant = false;
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -5644,17 +5644,17 @@ bool jit::ElementAccessIsDenseNative(Com
   }
 
   TemporaryTypeSet* types = obj->resultTypeSet();
   if (!types) {
     return false;
   }
 
   // Typed arrays are native classes but do not have dense elements.
-  const Class* clasp = types->getKnownClass(constraints);
+  const JSClass* clasp = types->getKnownClass(constraints);
   return clasp && clasp->isNative() && !IsTypedArrayClass(clasp);
 }
 
 bool jit::ElementAccessIsTypedArray(CompilerConstraintList* constraints,
                                     MDefinition* obj, MDefinition* id,
                                     Scalar::Type* arrayType) {
   if (obj->mightBeType(MIRType::String)) {
     return false;
@@ -5984,17 +5984,17 @@ AbortReasonOr<bool> PrototypeHasIndexedP
   } while (obj);
 
   return false;
 }
 
 // Whether obj or any of its prototypes have an indexed property.
 AbortReasonOr<bool> jit::TypeCanHaveExtraIndexedProperties(
     IonBuilder* builder, TemporaryTypeSet* types) {
-  const Class* clasp = types->getKnownClass(builder->constraints());
+  const JSClass* clasp = types->getKnownClass(builder->constraints());
 
   // Note: typed arrays have indexed properties not accounted for by type
   // information, though these are all in bounds and will be accounted for
   // by JIT paths.
   if (!clasp ||
       (ClassCanHaveExtraProperties(clasp) && !IsTypedArrayClass(clasp))) {
     return true;
   }
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -10608,66 +10608,66 @@ class MIsObject : public MUnaryInstructi
 
   bool congruentTo(const MDefinition* ins) const override {
     return congruentIfOperandsEqual(ins);
   }
   AliasSet getAliasSet() const override { return AliasSet::None(); }
 };
 
 class MHasClass : public MUnaryInstruction, public SingleObjectPolicy::Data {
-  const Class* class_;
-
-  MHasClass(MDefinition* object, const Class* clasp)
+  const JSClass* class_;
+
+  MHasClass(MDefinition* object, const JSClass* clasp)
       : MUnaryInstruction(classOpcode, object), class_(clasp) {
     MOZ_ASSERT(object->type() == MIRType::Object ||
                (object->type() == MIRType::Value &&
                 object->mightBeType(MIRType::Object)));
     setResultType(MIRType::Boolean);
     setMovable();
   }
 
  public:
   INSTRUCTION_HEADER(HasClass)
   TRIVIAL_NEW_WRAPPERS
   NAMED_OPERANDS((0, object))
 
-  const Class* getClass() const { return class_; }
+  const JSClass* getClass() const { return class_; }
   AliasSet getAliasSet() const override { return AliasSet::None(); }
   bool congruentTo(const MDefinition* ins) const override {
     if (!ins->isHasClass()) {
       return false;
     }
     if (getClass() != ins->toHasClass()->getClass()) {
       return false;
     }
     return congruentIfOperandsEqual(ins);
   }
 };
 
 class MGuardToClass : public MUnaryInstruction,
                       public SingleObjectPolicy::Data {
-  const Class* class_;
-
-  MGuardToClass(MDefinition* object, const Class* clasp)
+  const JSClass* class_;
+
+  MGuardToClass(MDefinition* object, const JSClass* clasp)
       : MUnaryInstruction(classOpcode, object), class_(clasp) {
     MOZ_ASSERT(object->type() == MIRType::Object);
     setResultType(MIRType::Object);
     setMovable();
 
     // We will bail out if the class type is incorrect, so we need to ensure we
     // don't eliminate this instruction
     setGuard();
   }
 
  public:
   INSTRUCTION_HEADER(GuardToClass)
   TRIVIAL_NEW_WRAPPERS
   NAMED_OPERANDS((0, object))
 
-  const Class* getClass() const { return class_; }
+  const JSClass* getClass() const { return class_; }
   AliasSet getAliasSet() const override { return AliasSet::None(); }
   bool congruentTo(const MDefinition* ins) const override {
     if (!ins->isGuardToClass()) {
       return false;
     }
     if (getClass() != ins->toGuardToClass()->getClass()) {
       return false;
     }
--- a/js/src/jit/MacroAssembler-inl.h
+++ b/js/src/jit/MacroAssembler-inl.h
@@ -395,17 +395,17 @@ void MacroAssembler::branchIfObjectEmula
                                                      Label* slowCheck,
                                                      Label* label) {
   // The branches to out-of-line code here implement a conservative version
   // of the JSObject::isWrapper test performed in EmulatesUndefined.
   loadObjClassUnsafe(objReg, scratch);
 
   branchTestClassIsProxy(true, scratch, slowCheck);
 
-  Address flags(scratch, Class::offsetOfFlags());
+  Address flags(scratch, JSClass::offsetOfFlags());
   branchTest32(Assembler::NonZero, flags, Imm32(JSCLASS_EMULATES_UNDEFINED),
                label);
 }
 
 void MacroAssembler::branchFunctionKind(Condition cond,
                                         FunctionFlags::FunctionKind kind,
                                         Register fun, Register scratch,
                                         Label* label) {
@@ -417,34 +417,33 @@ void MacroAssembler::branchFunctionKind(
   int32_t mask = IMM32_16ADJ(FunctionFlags::FUNCTION_KIND_MASK);
   int32_t bit = IMM32_16ADJ(kind << FunctionFlags::FUNCTION_KIND_SHIFT);
   load32(address, scratch);
   and32(Imm32(mask), scratch);
   branch32(cond, scratch, Imm32(bit), label);
 }
 
 void MacroAssembler::branchTestObjClass(Condition cond, Register obj,
-                                        const js::Class* clasp,
-                                        Register scratch,
+                                        const JSClass* clasp, Register scratch,
                                         Register spectreRegToZero,
                                         Label* label) {
   MOZ_ASSERT(obj != scratch);
   MOZ_ASSERT(scratch != spectreRegToZero);
 
   loadPtr(Address(obj, JSObject::offsetOfGroup()), scratch);
   branchPtr(cond, Address(scratch, ObjectGroup::offsetOfClasp()), ImmPtr(clasp),
             label);
 
   if (JitOptions.spectreObjectMitigationsMisc) {
     spectreZeroRegister(cond, scratch, spectreRegToZero);
   }
 }
 
 void MacroAssembler::branchTestObjClassNoSpectreMitigations(
-    Condition cond, Register obj, const js::Class* clasp, Register scratch,
+    Condition cond, Register obj, const JSClass* clasp, Register scratch,
     Label* label) {
   loadPtr(Address(obj, JSObject::offsetOfGroup()), scratch);
   branchPtr(cond, Address(scratch, ObjectGroup::offsetOfClasp()), ImmPtr(clasp),
             label);
 }
 
 void MacroAssembler::branchTestObjClass(Condition cond, Register obj,
                                         const Address& clasp, Register scratch,
@@ -586,18 +585,18 @@ void MacroAssembler::branchTestObjGroupN
                                                             Label* label) {
   MOZ_ASSERT(obj != group);
   branchPtr(cond, Address(obj, JSObject::offsetOfGroup()), group, label);
 }
 
 void MacroAssembler::branchTestClassIsProxy(bool proxy, Register clasp,
                                             Label* label) {
   branchTest32(proxy ? Assembler::NonZero : Assembler::Zero,
-               Address(clasp, Class::offsetOfFlags()), Imm32(JSCLASS_IS_PROXY),
-               label);
+               Address(clasp, JSClass::offsetOfFlags()),
+               Imm32(JSCLASS_IS_PROXY), label);
 }
 
 void MacroAssembler::branchTestObjectIsProxy(bool proxy, Register object,
                                              Register scratch, Label* label) {
   loadObjClassUnsafe(object, scratch);
   branchTestClassIsProxy(proxy, scratch, label);
 }
 
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -1424,25 +1424,25 @@ void MacroAssembler::typeOfObject(Regist
 
   // Proxies can emulate undefined and have complex isCallable behavior.
   branchTestClassIsProxy(true, scratch, slow);
 
   // JSFunctions are always callable.
   branchPtr(Assembler::Equal, scratch, ImmPtr(&JSFunction::class_), isCallable);
 
   // Objects that emulate undefined.
-  Address flags(scratch, Class::offsetOfFlags());
+  Address flags(scratch, JSClass::offsetOfFlags());
   branchTest32(Assembler::NonZero, flags, Imm32(JSCLASS_EMULATES_UNDEFINED),
                isUndefined);
 
   // Handle classes with a call hook.
-  branchPtr(Assembler::Equal, Address(scratch, offsetof(js::Class, cOps)),
+  branchPtr(Assembler::Equal, Address(scratch, offsetof(JSClass, cOps)),
             ImmPtr(nullptr), isObject);
 
-  loadPtr(Address(scratch, offsetof(js::Class, cOps)), scratch);
+  loadPtr(Address(scratch, offsetof(JSClass, cOps)), scratch);
   branchPtr(Assembler::Equal, Address(scratch, offsetof(JSClassOps, call)),
             ImmPtr(nullptr), isObject);
 
   jump(isCallable);
 }
 
 void MacroAssembler::loadJSContext(Register dest) {
   JitContext* jcx = GetJitContext();
@@ -2951,18 +2951,18 @@ void MacroAssembler::branchIfPretenuredG
   branchTest32(Assembler::NonZero, Address(group, ObjectGroup::offsetOfFlags()),
                Imm32(OBJECT_FLAG_PRE_TENURE), label);
   bind(&unknownProperties);
 }
 
 void MacroAssembler::branchIfNonNativeObj(Register obj, Register scratch,
                                           Label* label) {
   loadObjClassUnsafe(obj, scratch);
-  branchTest32(Assembler::NonZero, Address(scratch, Class::offsetOfFlags()),
-               Imm32(Class::NON_NATIVE), label);
+  branchTest32(Assembler::NonZero, Address(scratch, JSClass::offsetOfFlags()),
+               Imm32(JSClass::NON_NATIVE), label);
 }
 
 void MacroAssembler::branchIfInlineTypedObject(Register obj, Register scratch,
                                                Label* label) {
   loadObjClassUnsafe(obj, scratch);
   branchPtr(Assembler::Equal, scratch, ImmPtr(&InlineOpaqueTypedObject::class_),
             label);
   branchPtr(Assembler::Equal, scratch,
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -1318,21 +1318,21 @@ class MacroAssembler : public MacroAssem
                                               Label* slowCheck, Label* label);
 
   // For all methods below: spectreRegToZero is a register that will be zeroed
   // on speculatively executed code paths (when the branch should be taken but
   // branch prediction speculates it isn't). Usually this will be the object
   // register but the caller may pass a different register.
 
   inline void branchTestObjClass(Condition cond, Register obj,
-                                 const js::Class* clasp, Register scratch,
+                                 const JSClass* clasp, Register scratch,
                                  Register spectreRegToZero, Label* label);
   inline void branchTestObjClassNoSpectreMitigations(Condition cond,
                                                      Register obj,
-                                                     const js::Class* clasp,
+                                                     const JSClass* clasp,
                                                      Register scratch,
                                                      Label* label);
 
   inline void branchTestObjClass(Condition cond, Register obj,
                                  const Address& clasp, Register scratch,
                                  Register spectreRegToZero, Label* label);
   inline void branchTestObjClassNoSpectreMitigations(Condition cond,
                                                      Register obj,
--- a/js/src/jsapi-tests/testBug604087.cpp
+++ b/js/src/jsapi-tests/testBug604087.cpp
@@ -7,17 +7,17 @@
  * 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 "js/Wrapper.h"
 #include "jsapi-tests/tests.h"
 #include "vm/JSObject.h"
 #include "vm/ProxyObject.h"
 
-const js::Class OuterWrapperClass = PROXY_CLASS_DEF(
+const JSClass OuterWrapperClass = PROXY_CLASS_DEF(
     "Proxy", JSCLASS_HAS_RESERVED_SLOTS(1) /* additional class flags */);
 
 static JSObject* wrap(JSContext* cx, JS::HandleObject toWrap,
                       JS::HandleObject target) {
   JSAutoRealm ar(cx, target);
   JS::RootedObject wrapper(cx, toWrap);
   if (!JS_WrapObject(cx, &wrapper)) {
     return nullptr;
--- a/js/src/jsapi-tests/testWeakMap.cpp
+++ b/js/src/jsapi-tests/testWeakMap.cpp
@@ -145,17 +145,17 @@ static size_t DelegateObjectMoved(JSObje
   }
 
   MOZ_RELEASE_ASSERT(keyDelegate == old);
   keyDelegate = obj;
   return 0;
 }
 
 JSObject* newKey() {
-  static const js::Class keyClass = {
+  static const JSClass keyClass = {
       "keyWithDelegate", JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(1),
       JS_NULL_CLASS_OPS, JS_NULL_CLASS_SPEC,
       JS_NULL_CLASS_EXT, JS_NULL_OBJECT_OPS};
 
   JS::RootedObject key(cx, JS_NewObject(cx, &keyClass));
   if (!key) {
     return nullptr;
   }
@@ -204,17 +204,17 @@ JSObject* newDelegate() {
       nullptr, /* hasInstance */
       nullptr, /* construct */
       JS_GlobalObjectTraceHook,
   };
 
   static const js::ClassExtension delegateClassExtension = {
       DelegateObjectMoved};
 
-  static const js::Class delegateClass = {
+  static const JSClass delegateClass = {
       "delegate",
       JSCLASS_GLOBAL_FLAGS | JSCLASS_HAS_RESERVED_SLOTS(1),
       &delegateClassOps,
       JS_NULL_CLASS_SPEC,
       &delegateClassExtension,
       JS_NULL_OBJECT_OPS};
 
   /* Create the global object. */
--- a/js/src/jsapi-tests/testWindowNonConfigurable.cpp
+++ b/js/src/jsapi-tests/testWindowNonConfigurable.cpp
@@ -17,17 +17,17 @@ static bool windowProxy_defineProperty(J
   }
 
   return NativeDefineProperty(cx, obj.as<js::NativeObject>(), id, desc, result);
 }
 
 static const js::ObjectOps windowProxy_objectOps = {nullptr,
                                                     windowProxy_defineProperty};
 
-static const js::Class windowProxy_class = {
+static const JSClass windowProxy_class = {
     "WindowProxy", 0, nullptr, nullptr, nullptr, &windowProxy_objectOps};
 
 BEGIN_TEST(testWindowNonConfigurable) {
   JS::RootedObject obj(cx, JS_NewObject(cx, &windowProxy_class));
   CHECK(obj);
   CHECK(JS_DefineProperty(cx, global, "windowProxy", obj, 0));
   JS::RootedValue v(cx);
   EVAL(
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -915,17 +915,17 @@ JS_PUBLIC_API bool JS_ResolveStandardCla
   if (stdnm && GlobalObject::skipDeselectedConstructor(cx, stdnm->key)) {
     stdnm = nullptr;
   }
 
   // If this class is anonymous, then it doesn't exist as a global
   // property, so we won't resolve anything.
   JSProtoKey key = stdnm ? stdnm->key : JSProto_Null;
   if (key != JSProto_Null) {
-    const Class* clasp = ProtoKeyToClass(key);
+    const JSClass* clasp = ProtoKeyToClass(key);
     if (!clasp || clasp->specShouldDefineConstructor()) {
       if (!GlobalObject::ensureConstructor(cx, global, key)) {
         return false;
       }
 
       *resolved = true;
       return true;
     }
@@ -990,17 +990,17 @@ static bool EnumerateStandardClassesInTa
     if (!includeResolved && global->isStandardClassResolved(key)) {
       continue;
     }
 
     if (GlobalObject::skipDeselectedConstructor(cx, key)) {
       continue;
     }
 
-    if (const Class* clasp = ProtoKeyToClass(key)) {
+    if (const JSClass* clasp = ProtoKeyToClass(key)) {
       if (!clasp->specShouldDefineConstructor()) {
         continue;
       }
     }
 
     jsid id = NameToId(AtomStateOffsetToName(cx->names(), table[i].atomOffset));
     if (!properties.append(id)) {
       return false;
@@ -3065,17 +3065,17 @@ JS_PUBLIC_API bool JS::ObjectToCompleteP
   return true;
 }
 
 JS_PUBLIC_API void JS_SetAllNonReservedSlotsToUndefined(JS::HandleObject obj) {
   if (!obj->isNative()) {
     return;
   }
 
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   unsigned numReserved = JSCLASS_RESERVED_SLOTS(clasp);
   unsigned numSlots = obj->as<NativeObject>().slotSpan();
   for (unsigned i = numReserved; i < numSlots; i++) {
     obj->as<NativeObject>().setSlot(i, UndefinedValue());
   }
 }
 
 JS_PUBLIC_API Value JS_GetReservedSlot(JSObject* obj, uint32_t index) {
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -3355,24 +3355,24 @@ static const ClassSpec DateObjectClassSp
     GenericCreateConstructor<DateConstructor, 7, gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<DateObject>,
     date_static_methods,
     nullptr,
     date_methods,
     nullptr,
     FinishDateClassInit};
 
-const Class DateObject::class_ = {js_Date_str,
-                                  JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS) |
-                                      JSCLASS_HAS_CACHED_PROTO(JSProto_Date),
-                                  JS_NULL_CLASS_OPS, &DateObjectClassSpec};
-
-const Class DateObject::protoClass_ = {js_Object_str,
-                                       JSCLASS_HAS_CACHED_PROTO(JSProto_Date),
-                                       JS_NULL_CLASS_OPS, &DateObjectClassSpec};
+const JSClass DateObject::class_ = {js_Date_str,
+                                    JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS) |
+                                        JSCLASS_HAS_CACHED_PROTO(JSProto_Date),
+                                    JS_NULL_CLASS_OPS, &DateObjectClassSpec};
+
+const JSClass DateObject::protoClass_ = {
+    js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_Date), JS_NULL_CLASS_OPS,
+    &DateObjectClassSpec};
 
 JSObject* js::NewDateObjectMsec(JSContext* cx, ClippedTime t,
                                 HandleObject proto /* = nullptr */) {
   DateObject* obj = NewObjectWithClassProto<DateObject>(cx, proto);
   if (!obj) {
     return nullptr;
   }
   obj->setUTCTime(t);
--- a/js/src/jsexn.cpp
+++ b/js/src/jsexn.cpp
@@ -51,17 +51,17 @@ static bool exn_toSource(JSContext* cx, 
 
 #define IMPLEMENT_ERROR_PROTO_CLASS(name)                        \
   {                                                              \
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_##name),     \
         JS_NULL_CLASS_OPS,                                       \
         &ErrorObject::classSpecs[JSProto_##name - JSProto_Error] \
   }
 
-const Class ErrorObject::protoClasses[JSEXN_ERROR_LIMIT] = {
+const JSClass ErrorObject::protoClasses[JSEXN_ERROR_LIMIT] = {
     IMPLEMENT_ERROR_PROTO_CLASS(Error),
 
     IMPLEMENT_ERROR_PROTO_CLASS(InternalError),
     IMPLEMENT_ERROR_PROTO_CLASS(EvalError),
     IMPLEMENT_ERROR_PROTO_CLASS(RangeError),
     IMPLEMENT_ERROR_PROTO_CLASS(ReferenceError),
     IMPLEMENT_ERROR_PROTO_CLASS(SyntaxError),
     IMPLEMENT_ERROR_PROTO_CLASS(TypeError),
@@ -149,17 +149,17 @@ static const JSClassOps ErrorObjectClass
     nullptr,               /* resolve */
     nullptr,               /* mayResolve */
     exn_finalize, nullptr, /* call        */
     nullptr,               /* hasInstance */
     nullptr,               /* construct   */
     nullptr,               /* trace       */
 };
 
-const Class ErrorObject::classes[JSEXN_ERROR_LIMIT] = {
+const JSClass ErrorObject::classes[JSEXN_ERROR_LIMIT] = {
     IMPLEMENT_ERROR_CLASS(Error), IMPLEMENT_ERROR_CLASS(InternalError),
     IMPLEMENT_ERROR_CLASS(EvalError), IMPLEMENT_ERROR_CLASS(RangeError),
     IMPLEMENT_ERROR_CLASS(ReferenceError), IMPLEMENT_ERROR_CLASS(SyntaxError),
     IMPLEMENT_ERROR_CLASS(TypeError), IMPLEMENT_ERROR_CLASS(URIError),
     // These Error subclasses are not accessible via the global object:
     IMPLEMENT_ERROR_CLASS(DebuggeeWouldRun),
     IMPLEMENT_ERROR_CLASS(CompileError), IMPLEMENT_ERROR_CLASS(LinkError),
     IMPLEMENT_ERROR_CLASS(RuntimeError)};
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -1298,17 +1298,17 @@ JS_FRIEND_API JSAtom* js::GetPropertyNam
                                                 jsbytecode* pc) {
   if (!IsGetPropPC(pc) && !IsSetPropPC(pc)) {
     return nullptr;
   }
   return script->getName(pc);
 }
 
 JS_FRIEND_API void js::SetWindowProxyClass(JSContext* cx,
-                                           const js::Class* clasp) {
+                                           const JSClass* clasp) {
   MOZ_ASSERT(!cx->runtime()->maybeWindowProxyClass());
   cx->runtime()->setWindowProxyClass(clasp);
 }
 
 JS_FRIEND_API void js::SetWindowProxy(JSContext* cx, HandleObject global,
                                       HandleObject windowProxy) {
   AssertHeapIsIdle();
   CHECK_THREAD(cx);
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -532,23 +532,23 @@ extern JS_FRIEND_API bool IsSharableComp
  * Shadow declarations of JS internal structures, for access by inline access
  * functions below. Do not use these structures in any other way. When adding
  * new fields for access by inline methods, make sure to add static asserts to
  * the original header file to ensure that offsets are consistent.
  */
 namespace shadow {
 
 struct ObjectGroup {
-  const Class* clasp;
+  const JSClass* clasp;
   JSObject* proto;
   JS::Realm* realm;
 };
 
 struct BaseShape {
-  const js::Class* clasp_;
+  const JSClass* clasp_;
   JSObject* parent;
 };
 
 class Shape {
  public:
   shadow::BaseShape* base;
   jsid _1;
   uint32_t immutableFlags;
@@ -597,23 +597,23 @@ struct Function {
   const JSJitInfo* jitinfo;
   void* _1;
 };
 
 } /* namespace shadow */
 
 // This is equal to |&JSObject::class_|.  Use it in places where you don't want
 // to #include vm/JSObject.h.
-extern JS_FRIEND_DATA const js::Class* const ObjectClassPtr;
+extern JS_FRIEND_DATA const JSClass* const ObjectClassPtr;
 
 inline const JSClass* GetObjectClass(const JSObject* obj) {
   return reinterpret_cast<const shadow::Object*>(obj)->group->clasp;
 }
 
-JS_FRIEND_API const Class* ProtoKeyToClass(JSProtoKey key);
+JS_FRIEND_API const JSClass* ProtoKeyToClass(JSProtoKey key);
 
 // Returns the key for the class inherited by a given standard class (that
 // is to say, the prototype of this standard class's prototype).
 //
 // You must be sure that this corresponds to a standard class with a cached
 // JSProtoKey before calling this function. In general |key| will match the
 // cached proto key, except in cases where multiple JSProtoKeys share a
 // JSClass.
@@ -1101,17 +1101,17 @@ JS_FRIEND_API JSString* GetPCCountScript
  * new buffer and return the content in it, the size of the newly allocated
  * content within the buffer would be set to the length out-param.
  *
  * In case of out-of-memory, this function returns nullptr and does not set any
  * value to the length out-param.
  */
 JS_FRIEND_API char* GetCodeCoverageSummary(JSContext* cx, size_t* length);
 
-typedef bool (*DOMInstanceClassHasProtoAtDepth)(const Class* instanceClass,
+typedef bool (*DOMInstanceClassHasProtoAtDepth)(const JSClass* instanceClass,
                                                 uint32_t protoID,
                                                 uint32_t depth);
 struct JSDOMCallbacks {
   DOMInstanceClassHasProtoAtDepth instanceClassMatchesProto;
 };
 typedef struct JSDOMCallbacks DOMCallbacks;
 
 extern JS_FRIEND_API void SetDOMCallbacks(JSContext* cx,
@@ -1652,27 +1652,27 @@ extern JS_FRIEND_API JSObject* UnwrapFlo
 extern JS_FRIEND_API JSObject* UnwrapFloat64Array(JSObject* obj);
 
 extern JS_FRIEND_API JSObject* UnwrapArrayBufferView(JSObject* obj);
 
 extern JS_FRIEND_API JSObject* UnwrapReadableStream(JSObject* obj);
 
 namespace detail {
 
-extern JS_FRIEND_DATA const Class* const Int8ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Uint8ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Uint8ClampedArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Int16ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Uint16ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Int32ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Uint32ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const BigInt64ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const BigUint64ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Float32ArrayClassPtr;
-extern JS_FRIEND_DATA const Class* const Float64ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Int8ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Uint8ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Uint8ClampedArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Int16ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Uint16ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Int32ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Uint32ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const BigInt64ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const BigUint64ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Float32ArrayClassPtr;
+extern JS_FRIEND_DATA const JSClass* const Float64ArrayClassPtr;
 
 const size_t TypedArrayLengthSlot = 1;
 
 }  // namespace detail
 
 #define JS_DEFINE_DATA_AND_LENGTH_ACCESSOR(Type, type)                      \
   inline void Get##Type##ArrayLengthAndData(                                \
       JSObject* obj, uint32_t* length, bool* isSharedMemory, type** data) { \
@@ -2547,17 +2547,17 @@ extern JS_FRIEND_API JSObject* ConvertAr
  * universe.
  */
 
 /**
  * Tell the JS engine which Class is used for WindowProxy objects. Used by the
  * functions below.
  */
 extern JS_FRIEND_API void SetWindowProxyClass(JSContext* cx,
-                                              const Class* clasp);
+                                              const JSClass* clasp);
 
 /**
  * Associates a WindowProxy with a Window (global object). `windowProxy` must
  * have the Class set by SetWindowProxyClass.
  */
 extern JS_FRIEND_API void SetWindowProxy(JSContext* cx, JS::HandleObject global,
                                          JS::HandleObject windowProxy);
 
--- a/js/src/jsmath.cpp
+++ b/js/src/jsmath.cpp
@@ -90,18 +90,18 @@ static bool math_function(JSContext* cx,
   if (args.length() == 0) {
     args.rval().setNaN();
     return true;
   }
 
   return math_function<F>(cx, args[0], args.rval());
 }
 
-const Class js::MathClass = {js_Math_str,
-                             JSCLASS_HAS_CACHED_PROTO(JSProto_Math)};
+const JSClass js::MathClass = {js_Math_str,
+                               JSCLASS_HAS_CACHED_PROTO(JSProto_Math)};
 
 bool js::math_abs_handle(JSContext* cx, js::HandleValue v,
                          js::MutableHandleValue r) {
   double x;
   if (!ToNumber(cx, v, &x)) {
     return false;
   }
 
--- a/js/src/jsmath.h
+++ b/js/src/jsmath.h
@@ -18,17 +18,17 @@ namespace js {
 class GlobalObject;
 
 typedef double (*UnaryFunType)(double);
 
 /*
  * JS math functions.
  */
 
-extern const Class MathClass;
+extern const JSClass MathClass;
 
 extern JSObject* InitMathClass(JSContext* cx, Handle<GlobalObject*> global);
 
 extern uint64_t GenerateRandomSeed();
 
 // Fill |seed[0]| and |seed[1]| with random bits, suitable for
 // seeding a XorShift128+ random number generator.
 extern void GenerateXorShift128PlusSeed(mozilla::Array<uint64_t, 2>& seed);
--- a/js/src/jsnum.cpp
+++ b/js/src/jsnum.cpp
@@ -622,17 +622,17 @@ bool js::num_parseInt(JSContext* cx, uns
   return true;
 }
 
 static const JSFunctionSpec number_functions[] = {
     JS_SELF_HOSTED_FN(js_isNaN_str, "Global_isNaN", 1, JSPROP_RESOLVING),
     JS_SELF_HOSTED_FN(js_isFinite_str, "Global_isFinite", 1, JSPROP_RESOLVING),
     JS_FS_END};
 
-const Class NumberObject::class_ = {
+const JSClass NumberObject::class_ = {
     js_Number_str,
     JSCLASS_HAS_RESERVED_SLOTS(1) | JSCLASS_HAS_CACHED_PROTO(JSProto_Number)};
 
 static bool Number(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
 
   if (args.length() > 0) {
     // BigInt proposal section 6.2, steps 2a-c.
--- a/js/src/proxy/Proxy.cpp
+++ b/js/src/proxy/Proxy.cpp
@@ -760,17 +760,17 @@ const ClassExtension js::ProxyClassExten
 
 const ObjectOps js::ProxyObjectOps = {
     proxy_LookupProperty, Proxy::defineProperty,
     Proxy::has,           Proxy::get,
     Proxy::set,           Proxy::getOwnPropertyDescriptor,
     proxy_DeleteProperty, Proxy::getElements,
     Proxy::fun_toString};
 
-const Class js::ProxyClass =
+const JSClass js::ProxyClass =
     PROXY_CLASS_DEF("Proxy", JSCLASS_HAS_CACHED_PROTO(JSProto_Proxy) |
                                  JSCLASS_HAS_RESERVED_SLOTS(2));
 
 JS_FRIEND_API JSObject* js::NewProxyObject(JSContext* cx,
                                            const BaseProxyHandler* handler,
                                            HandleValue priv, JSObject* proto_,
                                            const ProxyOptions& options) {
   AssertHeapIsIdle();
--- a/js/src/shell/OSObject.cpp
+++ b/js/src/shell/OSObject.cpp
@@ -411,17 +411,17 @@ bool RCFile::release() {
   this->close();
   return true;
 }
 
 class FileObject : public NativeObject {
   enum : uint32_t { FILE_SLOT = 0, NUM_SLOTS };
 
  public:
-  static const js::Class class_;
+  static const JSClass class_;
 
   static FileObject* create(JSContext* cx, RCFile* file) {
     FileObject* obj = js::NewBuiltinClassInstance<FileObject>(cx);
     if (!obj) {
       return nullptr;
     }
 
     InitReservedSlot(obj, FILE_SLOT, file, MemoryUse::FileObjectFile);
@@ -465,17 +465,17 @@ static const JSClassOps FileObjectClassO
     nullptr,              /* mayResolve */
     FileObject::finalize, /* finalize */
     nullptr,              /* call */
     nullptr,              /* hasInstance */
     nullptr,              /* construct */
     nullptr               /* trace */
 };
 
-const js::Class FileObject::class_ = {
+const JSClass FileObject::class_ = {
     "File",
     JSCLASS_HAS_RESERVED_SLOTS(FileObject::NUM_SLOTS) |
         JSCLASS_FOREGROUND_FINALIZE,
     &FileObjectClassOps};
 
 static FileObject* redirect(JSContext* cx, HandleString relFilename,
                             RCFile** globalFile) {
   RootedString filename(cx, ResolvePath(cx, relFilename, RootRelative));
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -516,17 +516,17 @@ static JSObject* NewGlobalObject(JSConte
                                  JSPrincipals* principals,
                                  ShellGlobalKind kind);
 
 /*
  * A toy WindowProxy class for the shell. This is intended for testing code
  * where global |this| is a WindowProxy. All requests are forwarded to the
  * underlying global and no navigation is supported.
  */
-const js::Class ShellWindowProxyClass =
+const JSClass ShellWindowProxyClass =
     PROXY_CLASS_DEF("ShellWindowProxy", JSCLASS_HAS_RESERVED_SLOTS(1));
 
 JSObject* NewShellWindowProxy(JSContext* cx, JS::HandleObject global) {
   MOZ_ASSERT(global->is<GlobalObject>());
 
   js::WrapperOptions options;
   options.setClass(&ShellWindowProxyClass);
   options.setSingleton(true);
@@ -7013,17 +7013,17 @@ class StreamCacheEntryObject : public Na
     memcpy(buffer->dataPointer(), bytes.begin(), bytes.length());
 
     args.rval().setObject(*buffer);
     return true;
   }
 
  public:
   static const unsigned RESERVED_SLOTS = 1;
-  static const Class class_;
+  static const JSClass class_;
   static const JSPropertySpec properties[];
 
   static bool construct(JSContext* cx, unsigned argc, Value* vp) {
     CallArgs args = CallArgsFromVp(argc, vp);
     if (!args.requireAtLeast(cx, "streamCacheEntry", 1)) {
       return false;
     }
 
@@ -7077,17 +7077,17 @@ const JSClassOps StreamCacheEntryObject:
     nullptr, /* addProperty */
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     StreamCacheEntryObject::finalize};
 
-const Class StreamCacheEntryObject::class_ = {
+const JSClass StreamCacheEntryObject::class_ = {
     "StreamCacheEntryObject",
     JSCLASS_HAS_RESERVED_SLOTS(StreamCacheEntryObject::RESERVED_SLOTS) |
         JSCLASS_BACKGROUND_FINALIZE,
     &StreamCacheEntryObject::classOps_};
 
 struct BufferStreamJob {
   Variant<Uint8Vector, StreamCacheEntryPtr> source;
   Thread thread;
@@ -8093,17 +8093,17 @@ static constexpr uint32_t DOM_OBJECT_SLO
 static const JSClass* GetDomClass();
 
 static JSObject* GetDOMPrototype(JSContext* cx, JSObject* global);
 
 static const JSClass TransplantableDOMObjectClass = {
     "TransplantableDOMObject",
     JSCLASS_IS_DOMJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(1)};
 
-static const Class TransplantableDOMProxyObjectClass =
+static const JSClass TransplantableDOMProxyObjectClass =
     PROXY_CLASS_DEF("TransplantableDOMProxyObject",
                     JSCLASS_IS_DOMJSCLASS | JSCLASS_HAS_RESERVED_SLOTS(1));
 
 class TransplantableDOMProxyHandler final : public ForwardingProxyHandler {
  public:
   static const TransplantableDOMProxyHandler singleton;
   static const char family;
 
@@ -9815,17 +9815,17 @@ static bool dom_constructor(JSContext* c
   }
 
   InitDOMObject(domObj);
 
   args.rval().setObject(*domObj);
   return true;
 }
 
-static bool InstanceClassHasProtoAtDepth(const Class* clasp, uint32_t protoID,
+static bool InstanceClassHasProtoAtDepth(const JSClass* clasp, uint32_t protoID,
                                          uint32_t depth) {
   // Only the (fake) DOM object supports any JIT optimizations.
   return clasp == GetDomClass();
 }
 
 static bool ShellBuildId(JS::BuildIdCharVector* buildId) {
   // The browser embeds the date into the buildid and the buildid is embedded
   // in the binary, so every 'make' necessarily builds a new firefox binary.
--- a/js/src/vm/ArgumentsObject.cpp
+++ b/js/src/vm/ArgumentsObject.cpp
@@ -209,18 +209,18 @@ struct CopyScriptFrameIterArgs {
       ArgumentsObject::MaybeForwardToCallObject(iter_.abstractFramePtr(), obj,
                                                 data);
     }
   }
 };
 
 ArgumentsObject* ArgumentsObject::createTemplateObject(JSContext* cx,
                                                        bool mapped) {
-  const Class* clasp = mapped ? &MappedArgumentsObject::class_
-                              : &UnmappedArgumentsObject::class_;
+  const JSClass* clasp = mapped ? &MappedArgumentsObject::class_
+                                : &UnmappedArgumentsObject::class_;
 
   RootedObject proto(
       cx, GlobalObject::getOrCreateObjectPrototype(cx, cx->global()));
   if (!proto) {
     return nullptr;
   }
 
   RootedObjectGroup group(
@@ -1000,17 +1000,17 @@ const JSClassOps MappedArgumentsObject::
 const js::ClassExtension MappedArgumentsObject::classExt_ = {
     ArgumentsObject::objectMoved /* objectMovedOp */
 };
 
 const ObjectOps MappedArgumentsObject::objectOps_ = {
     nullptr, /* lookupProperty */
     MappedArgumentsObject::obj_defineProperty};
 
-const Class MappedArgumentsObject::class_ = {
+const JSClass MappedArgumentsObject::class_ = {
     "Arguments",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(MappedArgumentsObject::RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_Object) |
         JSCLASS_SKIP_NURSERY_FINALIZE | JSCLASS_BACKGROUND_FINALIZE,
     &MappedArgumentsObject::classOps_,
     nullptr,
     &MappedArgumentsObject::classExt_,
@@ -1032,16 +1032,16 @@ const JSClassOps UnmappedArgumentsObject
     nullptr, /* hasInstance */
     nullptr, /* construct   */
     ArgumentsObject::trace};
 
 const js::ClassExtension UnmappedArgumentsObject::classExt_ = {
     ArgumentsObject::objectMoved /* objectMovedOp */
 };
 
-const Class UnmappedArgumentsObject::class_ = {
+const JSClass UnmappedArgumentsObject::class_ = {
     "Arguments",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(UnmappedArgumentsObject::RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_Object) |
         JSCLASS_SKIP_NURSERY_FINALIZE | JSCLASS_BACKGROUND_FINALIZE,
     &UnmappedArgumentsObject::classOps_, nullptr,
     &UnmappedArgumentsObject::classExt_};
--- a/js/src/vm/ArgumentsObject.h
+++ b/js/src/vm/ArgumentsObject.h
@@ -413,17 +413,17 @@ class ArgumentsObject : public NativeObj
 };
 
 class MappedArgumentsObject : public ArgumentsObject {
   static const JSClassOps classOps_;
   static const ClassExtension classExt_;
   static const ObjectOps objectOps_;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   JSFunction& callee() const {
     return getFixedSlot(CALLEE_SLOT).toObject().as<JSFunction>();
   }
 
   bool hasOverriddenCallee() const {
     const Value& v = getFixedSlot(INITIAL_LENGTH_SLOT);
     return v.toInt32() & CALLEE_OVERRIDDEN_BIT;
@@ -444,17 +444,17 @@ class MappedArgumentsObject : public Arg
                                  ObjectOpResult& result);
 };
 
 class UnmappedArgumentsObject : public ArgumentsObject {
   static const JSClassOps classOps_;
   static const ClassExtension classExt_;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
  private:
   static bool obj_enumerate(JSContext* cx, HandleObject obj);
   static bool obj_resolve(JSContext* cx, HandleObject obj, HandleId id,
                           bool* resolvedp);
 };
 
 }  // namespace js
--- a/js/src/vm/ArrayBufferObject.cpp
+++ b/js/src/vm/ArrayBufferObject.cpp
@@ -321,26 +321,26 @@ static const ClassSpec ArrayBufferObject
     arraybuffer_functions,
     arraybuffer_properties,
     arraybuffer_proto_functions,
     arraybuffer_proto_properties};
 
 static const ClassExtension ArrayBufferObjectClassExtension = {
     ArrayBufferObject::objectMoved};
 
-const Class ArrayBufferObject::class_ = {
+const JSClass ArrayBufferObject::class_ = {
     "ArrayBuffer",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_ArrayBuffer) |
         JSCLASS_BACKGROUND_FINALIZE,
     &ArrayBufferObjectClassOps, &ArrayBufferObjectClassSpec,
     &ArrayBufferObjectClassExtension};
 
-const Class ArrayBufferObject::protoClass_ = {
+const JSClass ArrayBufferObject::protoClass_ = {
     "ArrayBufferPrototype", JSCLASS_HAS_CACHED_PROTO(JSProto_ArrayBuffer),
     JS_NULL_CLASS_OPS, &ArrayBufferObjectClassSpec};
 
 bool js::IsArrayBuffer(HandleValue v) {
   return v.isObject() && v.toObject().is<ArrayBufferObject>();
 }
 
 bool js::IsArrayBuffer(HandleObject obj) {
--- a/js/src/vm/ArrayBufferObject.h
+++ b/js/src/vm/ArrayBufferObject.h
@@ -300,18 +300,18 @@ class ArrayBufferObject : public ArrayBu
     BufferKind kind() const { return kind_; }
     JS::BufferContentsFreeFunc freeFunc() const { return free_; }
     void* freeUserData() const { return freeUserData_; }
 
     explicit operator bool() const { return data_ != nullptr; }
     WasmArrayRawBuffer* wasmBuffer() const;
   };
 
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   static bool byteLengthGetter(JSContext* cx, unsigned argc, Value* vp);
 
   static bool fun_slice(JSContext* cx, unsigned argc, Value* vp);
 
   static bool fun_isView(JSContext* cx, unsigned argc, Value* vp);
 
   static bool fun_species(JSContext* cx, unsigned argc, Value* vp);
--- a/js/src/vm/ArrayObject-inl.h
+++ b/js/src/vm/ArrayObject-inl.h
@@ -31,17 +31,17 @@ inline void ArrayObject::setLength(JSCon
   }
 
   getElementsHeader()->length = length;
 }
 
 /* static */ inline ArrayObject* ArrayObject::createArrayInternal(
     JSContext* cx, gc::AllocKind kind, gc::InitialHeap heap, HandleShape shape,
     HandleObjectGroup group, AutoSetNewObjectMetadata&) {
-  const js::Class* clasp = group->clasp();
+  const JSClass* clasp = group->clasp();
   MOZ_ASSERT(shape && group);
   MOZ_ASSERT(clasp == shape->getObjectClass());
   MOZ_ASSERT(clasp == &ArrayObject::class_);
   MOZ_ASSERT_IF(clasp->hasFinalize(), heap == gc::TenuredHeap);
   MOZ_ASSERT_IF(group->hasUnanalyzedPreliminaryObjects(),
                 heap == js::gc::TenuredHeap);
   MOZ_ASSERT_IF(group->shouldPreTenureDontCheckGeneration(),
                 heap == gc::TenuredHeap);
--- a/js/src/vm/ArrayObject.h
+++ b/js/src/vm/ArrayObject.h
@@ -16,17 +16,17 @@ class AutoSetNewObjectMetadata;
 class ArrayObject : public NativeObject {
  public:
   // Array(x) eagerly allocates dense elements if x <= this value. Without
   // the subtraction the max would roll over to the next power-of-two (4096)
   // due to the way that growElements() and goodAllocated() work.
   static const uint32_t EagerAllocationMaxLength =
       2048 - ObjectElements::VALUES_PER_HEADER;
 
-  static const Class class_;
+  static const JSClass class_;
 
   bool lengthIsWritable() const {
     return !getElementsHeader()->hasNonwritableArrayLength();
   }
 
   uint32_t length() const { return getElementsHeader()->length; }
 
   void setNonWritableLength(JSContext* cx) {
--- a/js/src/vm/AsyncFunction.cpp
+++ b/js/src/vm/AsyncFunction.cpp
@@ -166,17 +166,17 @@ JSObject* js::AsyncFunctionResolve(
   } else {
     if (!AsyncFunctionThrown(cx, promise, valueOrReason)) {
       return nullptr;
     }
   }
   return promise;
 }
 
-const Class AsyncFunctionGeneratorObject::class_ = {
+const JSClass AsyncFunctionGeneratorObject::class_ = {
     "AsyncFunctionGenerator",
     JSCLASS_HAS_RESERVED_SLOTS(AsyncFunctionGeneratorObject::RESERVED_SLOTS)};
 
 AsyncFunctionGeneratorObject* AsyncFunctionGeneratorObject::create(
     JSContext* cx, HandleFunction fun) {
   MOZ_ASSERT(fun->isAsync() && !fun->isGenerator());
 
   Rooted<PromiseObject*> resultPromise(cx, CreatePromiseObjectForAsync(cx));
--- a/js/src/vm/AsyncFunction.h
+++ b/js/src/vm/AsyncFunction.h
@@ -40,17 +40,17 @@ JSObject* AsyncFunctionResolve(JSContext
 class AsyncFunctionGeneratorObject : public AbstractGeneratorObject {
  public:
   enum {
     PROMISE_SLOT = AbstractGeneratorObject::RESERVED_SLOTS,
 
     RESERVED_SLOTS
   };
 
-  static const Class class_;
+  static const JSClass class_;
 
   static AsyncFunctionGeneratorObject* create(JSContext* cx,
                                               HandleFunction asyncGen);
 
   PromiseObject* promise() {
     return &getFixedSlot(PROMISE_SLOT).toObject().as<PromiseObject>();
   }
 };
--- a/js/src/vm/AsyncIteration.cpp
+++ b/js/src/vm/AsyncIteration.cpp
@@ -49,17 +49,17 @@ MOZ_MUST_USE bool js::AsyncGeneratorYiel
 // ES2019 draft rev 49b781ec80117b60f73327ef3054703a3111e40c
 // 25.5.3.7 AsyncGeneratorYield, step 8.c.
 MOZ_MUST_USE bool js::AsyncGeneratorYieldReturnAwaitedRejected(
     JSContext* cx, Handle<AsyncGeneratorObject*> asyncGenObj,
     HandleValue reason) {
   return AsyncGeneratorResume(cx, asyncGenObj, CompletionKind::Throw, reason);
 }
 
-const Class AsyncFromSyncIteratorObject::class_ = {
+const JSClass AsyncFromSyncIteratorObject::class_ = {
     "AsyncFromSyncIteratorObject",
     JSCLASS_HAS_RESERVED_SLOTS(AsyncFromSyncIteratorObject::Slots)};
 
 // ES2019 draft rev c012f9c70847559a1d9dc0d35d35b27fec42911e
 // 25.1.4.1 CreateAsyncFromSyncIterator
 JSObject* js::CreateAsyncFromSyncIterator(JSContext* cx, HandleObject iter,
                                           HandleValue nextMethod) {
   // Steps 1-3.
@@ -144,17 +144,17 @@ static bool AsyncGeneratorReturn(JSConte
 static bool AsyncGeneratorThrow(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
 
   // Steps 1-3.
   return AsyncGeneratorEnqueue(cx, args.thisv(), CompletionKind::Throw,
                                args.get(0), args.rval());
 }
 
-const Class AsyncGeneratorObject::class_ = {
+const JSClass AsyncGeneratorObject::class_ = {
     "AsyncGenerator", JSCLASS_HAS_RESERVED_SLOTS(AsyncGeneratorObject::Slots)};
 
 // ES 2017 draft 9.1.13.
 // OrdinaryCreateFromConstructor specialized for AsyncGeneratorObjects.
 static AsyncGeneratorObject* OrdinaryCreateFromConstructorAsynGen(
     JSContext* cx, HandleFunction fun) {
   // Step 1 (skipped).
 
@@ -266,17 +266,17 @@ AsyncGeneratorRequest* AsyncGeneratorObj
     Handle<AsyncGeneratorObject*> asyncGenObj) {
   if (asyncGenObj->isSingleQueue()) {
     return asyncGenObj->singleQueueRequest();
   }
 
   return &asyncGenObj->queue()->getAs<AsyncGeneratorRequest>(0);
 }
 
-const Class AsyncGeneratorRequest::class_ = {
+const JSClass AsyncGeneratorRequest::class_ = {
     "AsyncGeneratorRequest",
     JSCLASS_HAS_RESERVED_SLOTS(AsyncGeneratorRequest::Slots)};
 
 // ES2019 draft rev c012f9c70847559a1d9dc0d35d35b27fec42911e
 // 25.5.3.1 AsyncGeneratorRequest Records
 /* static */
 AsyncGeneratorRequest* AsyncGeneratorRequest::create(
     JSContext* cx, CompletionKind completionKind, HandleValue completionValue,
--- a/js/src/vm/AsyncIteration.h
+++ b/js/src/vm/AsyncIteration.h
@@ -74,17 +74,17 @@ class AsyncGeneratorRequest : public Nat
   void clearData() {
     setFixedSlot(Slot_CompletionValue, NullValue());
     setFixedSlot(Slot_Promise, NullValue());
   }
 
   friend AsyncGeneratorObject;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static AsyncGeneratorRequest* create(JSContext* cx,
                                        CompletionKind completionKind,
                                        HandleValue completionValue,
                                        Handle<PromiseObject*> promise);
 
   CompletionKind completionKind() const {
     return static_cast<CompletionKind>(
@@ -181,17 +181,17 @@ class AsyncGeneratorObject : public Abst
   ListObject* queue() const {
     return &getFixedSlot(Slot_QueueOrRequest).toObject().as<ListObject>();
   }
   void setQueue(ListObject* queue_) {
     setFixedSlot(Slot_QueueOrRequest, ObjectValue(*queue_));
   }
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static AsyncGeneratorObject* create(JSContext* cx, HandleFunction asyncGen);
 
   bool isSuspendedStart() const { return state() == State_SuspendedStart; }
   bool isSuspendedYield() const { return state() == State_SuspendedYield; }
   bool isExecuting() const { return state() == State_Executing; }
   bool isAwaitingYieldReturn() const {
     return state() == State_AwaitingYieldReturn;
@@ -275,17 +275,17 @@ class AsyncFromSyncIteratorObject : publ
   };
 
   void init(JSObject* iterator, const Value& nextMethod) {
     setFixedSlot(Slot_Iterator, ObjectValue(*iterator));
     setFixedSlot(Slot_NextMethod, nextMethod);
   }
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static JSObject* create(JSContext* cx, HandleObject iter,
                           HandleValue nextMethod);
 
   JSObject* iterator() const { return &getFixedSlot(Slot_Iterator).toObject(); }
 
   const Value& nextMethod() const { return getFixedSlot(Slot_NextMethod); }
 };
--- a/js/src/vm/BooleanObject.h
+++ b/js/src/vm/BooleanObject.h
@@ -17,17 +17,17 @@ class GlobalObject;
 
 class BooleanObject : public NativeObject {
   /* Stores this Boolean object's [[PrimitiveValue]]. */
   static const unsigned PRIMITIVE_VALUE_SLOT = 0;
 
  public:
   static const unsigned RESERVED_SLOTS = 1;
 
-  static const Class class_;
+  static const JSClass class_;
 
   /*
    * Creates a new Boolean object boxing the given primitive bool.
    * If proto is nullptr, the [[Prototype]] will default to Boolean.prototype.
    */
   static inline BooleanObject* create(JSContext* cx, bool b,
                                       HandleObject proto = nullptr);
 
--- a/js/src/vm/Caches-inl.h
+++ b/js/src/vm/Caches-inl.h
@@ -13,31 +13,31 @@
 #include "gc/GCTrace.h"
 #include "vm/Probes.h"
 #include "vm/Realm.h"
 
 #include "vm/JSObject-inl.h"
 
 namespace js {
 
-inline bool NewObjectCache::lookupProto(const Class* clasp, JSObject* proto,
+inline bool NewObjectCache::lookupProto(const JSClass* clasp, JSObject* proto,
                                         gc::AllocKind kind,
                                         EntryIndex* pentry) {
   MOZ_ASSERT(!proto->is<GlobalObject>());
   return lookup(clasp, proto, kind, pentry);
 }
 
-inline bool NewObjectCache::lookupGlobal(const Class* clasp,
+inline bool NewObjectCache::lookupGlobal(const JSClass* clasp,
                                          GlobalObject* global,
                                          gc::AllocKind kind,
                                          EntryIndex* pentry) {
   return lookup(clasp, global, kind, pentry);
 }
 
-inline void NewObjectCache::fillGlobal(EntryIndex entry, const Class* clasp,
+inline void NewObjectCache::fillGlobal(EntryIndex entry, const JSClass* clasp,
                                        GlobalObject* global, gc::AllocKind kind,
                                        NativeObject* obj) {
   // MOZ_ASSERT(global == obj->getGlobal());
   return fill(entry, clasp, global, kind, obj);
 }
 
 inline NativeObject* NewObjectCache::newObjectFromHit(JSContext* cx,
                                                       EntryIndex entryIndex,
--- a/js/src/vm/Caches.h
+++ b/js/src/vm/Caches.h
@@ -86,17 +86,17 @@ class NewObjectCache {
   static void staticAsserts() {
     JS_STATIC_ASSERT(NewObjectCache::MAX_OBJ_SIZE == sizeof(JSObject_Slots16));
     JS_STATIC_ASSERT(gc::AllocKind::OBJECT_LAST ==
                      gc::AllocKind::OBJECT16_BACKGROUND);
   }
 
   struct Entry {
     /* Class of the constructed object. */
-    const Class* clasp;
+    const JSClass* clasp;
 
     /*
      * Key with one of three possible values:
      *
      * - Global for the object. The object must have a standard class for
      *   which the global's prototype can be determined, and the object's
      *   parent will be the global.
      *
@@ -137,69 +137,70 @@ class NewObjectCache {
 
   /* Remove any cached items keyed on moved objects. */
   void clearNurseryObjects(JSRuntime* rt);
 
   /*
    * Get the entry index for the given lookup, return whether there was a hit
    * on an existing entry.
    */
-  inline bool lookupProto(const Class* clasp, JSObject* proto,
+  inline bool lookupProto(const JSClass* clasp, JSObject* proto,
                           gc::AllocKind kind, EntryIndex* pentry);
-  inline bool lookupGlobal(const Class* clasp, js::GlobalObject* global,
+  inline bool lookupGlobal(const JSClass* clasp, js::GlobalObject* global,
                            gc::AllocKind kind, EntryIndex* pentry);
 
   bool lookupGroup(js::ObjectGroup* group, gc::AllocKind kind,
                    EntryIndex* pentry) {
     return lookup(group->clasp(), group, kind, pentry);
   }
 
   /*
    * Return a new object from a cache hit produced by a lookup method, or
    * nullptr if returning the object could possibly trigger GC (does not
    * indicate failure).
    */
   inline NativeObject* newObjectFromHit(JSContext* cx, EntryIndex entry,
                                         js::gc::InitialHeap heap);
 
   /* Fill an entry after a cache miss. */
-  void fillProto(EntryIndex entry, const Class* clasp, js::TaggedProto proto,
+  void fillProto(EntryIndex entry, const JSClass* clasp, js::TaggedProto proto,
                  gc::AllocKind kind, NativeObject* obj);
 
-  inline void fillGlobal(EntryIndex entry, const Class* clasp,
+  inline void fillGlobal(EntryIndex entry, const JSClass* clasp,
                          js::GlobalObject* global, gc::AllocKind kind,
                          NativeObject* obj);
 
   void fillGroup(EntryIndex entry, js::ObjectGroup* group, gc::AllocKind kind,
                  NativeObject* obj) {
     MOZ_ASSERT(obj->group() == group);
     return fill(entry, group->clasp(), group, kind, obj);
   }
 
   /* Invalidate any entries which might produce an object with shape/proto. */
   void invalidateEntriesForShape(JSContext* cx, HandleShape shape,
                                  HandleObject proto);
 
  private:
-  EntryIndex makeIndex(const Class* clasp, gc::Cell* key, gc::AllocKind kind) {
+  EntryIndex makeIndex(const JSClass* clasp, gc::Cell* key,
+                       gc::AllocKind kind) {
     uintptr_t hash = (uintptr_t(clasp) ^ uintptr_t(key)) + size_t(kind);
     return hash % mozilla::ArrayLength(entries);
   }
 
-  bool lookup(const Class* clasp, gc::Cell* key, gc::AllocKind kind,
+  bool lookup(const JSClass* clasp, gc::Cell* key, gc::AllocKind kind,
               EntryIndex* pentry) {
     *pentry = makeIndex(clasp, key, kind);
     Entry* entry = &entries[*pentry];
 
     // N.B. Lookups with the same clasp/key but different kinds map to
     // different entries.
     return entry->clasp == clasp && entry->key == key;
   }
 
-  void fill(EntryIndex entry_, const Class* clasp, gc::Cell* key,
+  void fill(EntryIndex entry_, const JSClass* clasp, gc::Cell* key,
             gc::AllocKind kind, NativeObject* obj) {
     MOZ_ASSERT(unsigned(entry_) < mozilla::ArrayLength(entries));
     MOZ_ASSERT(entry_ == makeIndex(clasp, key, kind));
     Entry* entry = &entries[entry_];
 
     MOZ_ASSERT(!obj->hasDynamicSlots());
     MOZ_ASSERT(obj->hasEmptyElements() || obj->is<ArrayObject>());
 
--- a/js/src/vm/DateObject.h
+++ b/js/src/vm/DateObject.h
@@ -40,18 +40,18 @@ class DateObject : public NativeObject {
    * division/modulus operations.
    */
   static const uint32_t LOCAL_SECONDS_INTO_YEAR_SLOT =
       COMPONENTS_START_SLOT + 5;
 
   static const uint32_t RESERVED_SLOTS = LOCAL_SECONDS_INTO_YEAR_SLOT + 1;
 
  public:
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   JS::ClippedTime clippedTime() const {
     double t = getFixedSlot(UTC_TIME_SLOT).toDouble();
     JS::ClippedTime clipped = JS::TimeClip(t);
     MOZ_ASSERT(mozilla::NumbersAreIdentical(clipped.toDouble(), t));
     return clipped;
   }
 
--- a/js/src/vm/EnvironmentObject.cpp
+++ b/js/src/vm/EnvironmentObject.cpp
@@ -231,17 +231,17 @@ CallObject* CallObject::createHollowForD
     if (!SetProperty(cx, callobj, id, optimizedOut)) {
       return nullptr;
     }
   }
 
   return callobj;
 }
 
-const Class CallObject::class_ = {
+const JSClass CallObject::class_ = {
     "Call", JSCLASS_HAS_RESERVED_SLOTS(CallObject::RESERVED_SLOTS)};
 
 /*****************************************************************************/
 
 /* static */
 VarEnvironmentObject* VarEnvironmentObject::create(JSContext* cx,
                                                    HandleShape shape,
                                                    HandleObject enclosing,
@@ -337,17 +337,17 @@ VarEnvironmentObject* VarEnvironmentObje
       return nullptr;
     }
   }
 
   env->initScope(scope);
   return env;
 }
 
-const Class VarEnvironmentObject::class_ = {
+const JSClass VarEnvironmentObject::class_ = {
     "Var", JSCLASS_HAS_RESERVED_SLOTS(VarEnvironmentObject::RESERVED_SLOTS)};
 
 /*****************************************************************************/
 
 const ObjectOps ModuleEnvironmentObject::objectOps_ = {
     ModuleEnvironmentObject::lookupProperty,
     nullptr, /* defineProperty */
     ModuleEnvironmentObject::hasProperty,
@@ -359,17 +359,17 @@ const ObjectOps ModuleEnvironmentObject:
     nullptr};
 
 const JSClassOps ModuleEnvironmentObject::classOps_ = {
     nullptr, /* addProperty */
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     ModuleEnvironmentObject::newEnumerate};
 
-const Class ModuleEnvironmentObject::class_ = {
+const JSClass ModuleEnvironmentObject::class_ = {
     "ModuleEnvironmentObject",
     JSCLASS_HAS_RESERVED_SLOTS(ModuleEnvironmentObject::RESERVED_SLOTS),
     &ModuleEnvironmentObject::classOps_,
     JS_NULL_CLASS_SPEC,
     JS_NULL_CLASS_EXT,
     &ModuleEnvironmentObject::objectOps_};
 
 /* static */
@@ -576,17 +576,17 @@ bool ModuleEnvironmentObject::newEnumera
   }
 
   MOZ_ASSERT(properties.length() == count);
   return true;
 }
 
 /*****************************************************************************/
 
-const Class WasmInstanceEnvironmentObject::class_ = {
+const JSClass WasmInstanceEnvironmentObject::class_ = {
     "WasmInstance",
     JSCLASS_HAS_RESERVED_SLOTS(WasmInstanceEnvironmentObject::RESERVED_SLOTS)};
 
 /* static */
 WasmInstanceEnvironmentObject*
 WasmInstanceEnvironmentObject::createHollowForDebug(
     JSContext* cx, Handle<WasmInstanceScope*> scope) {
   RootedObjectGroup group(
@@ -613,17 +613,17 @@ WasmInstanceEnvironmentObject::createHol
   callobj->initEnclosingEnvironment(&cx->global()->lexicalEnvironment());
   callobj->initReservedSlot(SCOPE_SLOT, PrivateGCThingValue(scope));
 
   return callobj;
 }
 
 /*****************************************************************************/
 
-const Class WasmFunctionCallObject::class_ = {
+const JSClass WasmFunctionCallObject::class_ = {
     "WasmCall",
     JSCLASS_HAS_RESERVED_SLOTS(WasmFunctionCallObject::RESERVED_SLOTS)};
 
 /* static */
 WasmFunctionCallObject* WasmFunctionCallObject::createHollowForDebug(
     JSContext* cx, HandleObject enclosing, Handle<WasmFunctionScope*> scope) {
   RootedObjectGroup group(
       cx, ObjectGroup::defaultNewGroup(cx, &class_, TaggedProto(nullptr)));
@@ -811,17 +811,17 @@ static const ObjectOps WithEnvironmentOb
     with_GetProperty,
     with_SetProperty,
     with_GetOwnPropertyDescriptor,
     with_DeleteProperty,
     nullptr, /* getElements */
     nullptr,
 };
 
-const Class WithEnvironmentObject::class_ = {
+const JSClass WithEnvironmentObject::class_ = {
     "With",
     JSCLASS_HAS_RESERVED_SLOTS(WithEnvironmentObject::RESERVED_SLOTS),
     JS_NULL_CLASS_OPS,
     JS_NULL_CLASS_SPEC,
     JS_NULL_CLASS_EXT,
     &WithEnvironmentObjectOps};
 
 /* static */
@@ -838,17 +838,17 @@ NonSyntacticVariablesObject* NonSyntacti
   if (!JSObject::setQualifiedVarObj(cx, obj)) {
     return nullptr;
   }
 
   obj->initEnclosingEnvironment(&cx->global()->lexicalEnvironment());
   return obj;
 }
 
-const Class NonSyntacticVariablesObject::class_ = {
+const JSClass NonSyntacticVariablesObject::class_ = {
     "NonSyntacticVariablesObject",
     JSCLASS_HAS_RESERVED_SLOTS(NonSyntacticVariablesObject::RESERVED_SLOTS)};
 
 bool js::CreateNonSyntacticEnvironmentChain(JSContext* cx,
                                             HandleObjectVector envChain,
                                             MutableHandleObject env,
                                             MutableHandleScope scope) {
   RootedObject globalLexical(cx, &cx->global()->lexicalEnvironment());
@@ -1095,17 +1095,17 @@ Value LexicalEnvironmentObject::thisValu
 }
 
 void LexicalEnvironmentObject::setWindowProxyThisValue(JSObject* obj) {
   MOZ_ASSERT(isGlobal());
   MOZ_ASSERT(IsWindowProxy(obj));
   setReservedSlot(THIS_VALUE_OR_SCOPE_SLOT, ObjectValue(*obj));
 }
 
-const Class LexicalEnvironmentObject::class_ = {
+const JSClass LexicalEnvironmentObject::class_ = {
     "LexicalEnvironment",
     JSCLASS_HAS_RESERVED_SLOTS(LexicalEnvironmentObject::RESERVED_SLOTS),
     JS_NULL_CLASS_OPS,
     JS_NULL_CLASS_SPEC,
     JS_NULL_CLASS_EXT,
     JS_NULL_OBJECT_OPS};
 
 /* static */
@@ -1236,17 +1236,17 @@ static const ObjectOps RuntimeLexicalErr
     lexicalError_GetProperty,
     lexicalError_SetProperty,
     lexicalError_GetOwnPropertyDescriptor,
     lexicalError_DeleteProperty,
     nullptr, /* getElements */
     nullptr, /* this */
 };
 
-const Class RuntimeLexicalErrorObject::class_ = {
+const JSClass RuntimeLexicalErrorObject::class_ = {
     "RuntimeLexicalError",
     JSCLASS_HAS_RESERVED_SLOTS(RuntimeLexicalErrorObject::RESERVED_SLOTS),
     JS_NULL_CLASS_OPS,
     JS_NULL_CLASS_SPEC,
     JS_NULL_CLASS_EXT,
     &RuntimeLexicalErrorObjectObjectOps};
 
 /*****************************************************************************/
--- a/js/src/vm/EnvironmentObject.h
+++ b/js/src/vm/EnvironmentObject.h
@@ -313,17 +313,17 @@ class CallObject : public EnvironmentObj
  protected:
   static const uint32_t CALLEE_SLOT = 1;
 
   static CallObject* create(JSContext* cx, HandleScript script,
                             HandleFunction callee, HandleObject enclosing);
 
  public:
   static const uint32_t RESERVED_SLOTS = 2;
-  static const Class class_;
+  static const JSClass class_;
 
   /* These functions are internal and are exposed only for JITs. */
 
   /*
    * Construct a bare-bones call object given a shape and a group.
    * The call object must be further initialized to be usable.
    */
   static CallObject* create(JSContext* cx, HandleShape shape,
@@ -372,17 +372,17 @@ class VarEnvironmentObject : public Envi
                                       gc::InitialHeap heap);
 
   void initScope(Scope* scope) {
     initReservedSlot(SCOPE_SLOT, PrivateGCThingValue(scope));
   }
 
  public:
   static const uint32_t RESERVED_SLOTS = 2;
-  static const Class class_;
+  static const JSClass class_;
 
   static VarEnvironmentObject* create(JSContext* cx, HandleScope scope,
                                       AbstractFramePtr frame);
   static VarEnvironmentObject* createHollowForDebug(JSContext* cx,
                                                     Handle<VarScope*> scope);
 
   Scope& scope() const {
     Value v = getReservedSlot(SCOPE_SLOT);
@@ -397,17 +397,17 @@ class VarEnvironmentObject : public Envi
 
 class ModuleEnvironmentObject : public EnvironmentObject {
   static const uint32_t MODULE_SLOT = 1;
 
   static const ObjectOps objectOps_;
   static const JSClassOps classOps_;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static const uint32_t RESERVED_SLOTS = 2;
 
   static ModuleEnvironmentObject* create(JSContext* cx,
                                          HandleModuleObject module);
   ModuleObject& module() const;
   IndirectBindingMap& importBindings() const;
 
@@ -450,17 +450,17 @@ typedef MutableHandle<ModuleEnvironmentO
 class WasmInstanceEnvironmentObject : public EnvironmentObject {
   // Currently WasmInstanceScopes do not use their scopes in a
   // meaningful way. However, it is an invariant of DebugEnvironments that
   // environments kept in those maps have live scopes, thus this strong
   // reference.
   static const uint32_t SCOPE_SLOT = 1;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static const uint32_t RESERVED_SLOTS = 2;
 
   static WasmInstanceEnvironmentObject* createHollowForDebug(
       JSContext* cx, Handle<WasmInstanceScope*> scope);
   WasmInstanceScope& scope() const {
     Value v = getReservedSlot(SCOPE_SLOT);
     MOZ_ASSERT(v.isPrivateGCThing());
@@ -471,17 +471,17 @@ class WasmInstanceEnvironmentObject : pu
 class WasmFunctionCallObject : public EnvironmentObject {
   // Currently WasmFunctionCallObjects do not use their scopes in a
   // meaningful way. However, it is an invariant of DebugEnvironments that
   // environments kept in those maps have live scopes, thus this strong
   // reference.
   static const uint32_t SCOPE_SLOT = 1;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static const uint32_t RESERVED_SLOTS = 2;
 
   static WasmFunctionCallObject* createHollowForDebug(
       JSContext* cx, HandleObject enclosing, Handle<WasmFunctionScope*> scope);
   WasmFunctionScope& scope() const {
     Value v = getReservedSlot(SCOPE_SLOT);
     MOZ_ASSERT(v.isPrivateGCThing());
@@ -494,17 +494,17 @@ class LexicalEnvironmentObject : public 
   // value and all other lexical environments have a fixed shape and store a
   // backpointer to the LexicalScope.
   //
   // Since the two sets are disjoint, we only use one slot to save space.
   static const unsigned THIS_VALUE_OR_SCOPE_SLOT = 1;
 
  public:
   static const unsigned RESERVED_SLOTS = 2;
-  static const Class class_;
+  static const JSClass class_;
 
  private:
   static LexicalEnvironmentObject* createTemplateObject(JSContext* cx,
                                                         HandleShape shape,
                                                         HandleObject enclosing,
                                                         gc::InitialHeap heap);
 
   void initThisValue(JSObject* obj) {
@@ -606,17 +606,17 @@ class NamedLambdaObject : public Lexical
 //
 // This is used in ExecuteInGlobalAndReturnScope and sits in front of the
 // global scope to store 'var' bindings, and to store fresh properties created
 // by assignments to undeclared variables that otherwise would have gone on
 // the global object.
 class NonSyntacticVariablesObject : public EnvironmentObject {
  public:
   static const unsigned RESERVED_SLOTS = 1;
-  static const Class class_;
+  static const JSClass class_;
 
   static NonSyntacticVariablesObject* create(JSContext* cx);
 };
 
 extern bool CreateNonSyntacticEnvironmentChain(JSContext* cx,
                                                JS::HandleObjectVector envChain,
                                                MutableHandleObject env,
                                                MutableHandleScope scope);
@@ -624,17 +624,17 @@ extern bool CreateNonSyntacticEnvironmen
 // With environment objects on the run-time environment chain.
 class WithEnvironmentObject : public EnvironmentObject {
   static const unsigned OBJECT_SLOT = 1;
   static const unsigned THIS_SLOT = 2;
   static const unsigned SCOPE_SLOT = 3;
 
  public:
   static const unsigned RESERVED_SLOTS = 4;
-  static const Class class_;
+  static const JSClass class_;
 
   static WithEnvironmentObject* create(JSContext* cx, HandleObject object,
                                        HandleObject enclosing,
                                        Handle<WithScope*> scope);
   static WithEnvironmentObject* createNonSyntactic(JSContext* cx,
                                                    HandleObject object,
                                                    HandleObject enclosing);
 
@@ -679,17 +679,17 @@ class WithEnvironmentObject : public Env
 //
 // ES6 'const' bindings induce a runtime error when assigned to outside
 // of initialization, regardless of strictness.
 class RuntimeLexicalErrorObject : public EnvironmentObject {
   static const unsigned ERROR_SLOT = 1;
 
  public:
   static const unsigned RESERVED_SLOTS = 2;
-  static const Class class_;
+  static const JSClass class_;
 
   static RuntimeLexicalErrorObject* create(JSContext* cx,
                                            HandleObject enclosing,
                                            unsigned errorNumber);
 
   unsigned errorNumber() { return getReservedSlot(ERROR_SLOT).toInt32(); }
 };
 
--- a/js/src/vm/ErrorObject.cpp
+++ b/js/src/vm/ErrorObject.cpp
@@ -129,17 +129,17 @@ ErrorObject* js::ErrorObject::create(JSC
                                                           errorType);
     if (!proto) {
       return nullptr;
     }
   }
 
   Rooted<ErrorObject*> errObject(cx);
   {
-    const Class* clasp = ErrorObject::classForType(errorType);
+    const JSClass* clasp = ErrorObject::classForType(errorType);
     JSObject* obj = NewObjectWithGivenProto(cx, clasp, proto);
     if (!obj) {
       return nullptr;
     }
     errObject = &obj->as<ErrorObject>();
   }
 
   if (!ErrorObject::init(cx, errObject, errorType, std::move(report), fileName,
--- a/js/src/vm/ErrorObject.h
+++ b/js/src/vm/ErrorObject.h
@@ -30,40 +30,40 @@ class ErrorObject : public NativeObject 
   friend JSObject* js::InitExceptionClasses(JSContext* cx, HandleObject global);
 
   static bool init(JSContext* cx, Handle<ErrorObject*> obj, JSExnType type,
                    UniquePtr<JSErrorReport> errorReport, HandleString fileName,
                    HandleObject stack, uint32_t sourceId, uint32_t lineNumber,
                    uint32_t columnNumber, HandleString message);
 
   static const ClassSpec classSpecs[JSEXN_ERROR_LIMIT];
-  static const Class protoClasses[JSEXN_ERROR_LIMIT];
+  static const JSClass protoClasses[JSEXN_ERROR_LIMIT];
 
  protected:
   static const uint32_t EXNTYPE_SLOT = 0;
   static const uint32_t STACK_SLOT = EXNTYPE_SLOT + 1;
   static const uint32_t ERROR_REPORT_SLOT = STACK_SLOT + 1;
   static const uint32_t FILENAME_SLOT = ERROR_REPORT_SLOT + 1;
   static const uint32_t LINENUMBER_SLOT = FILENAME_SLOT + 1;
   static const uint32_t COLUMNNUMBER_SLOT = LINENUMBER_SLOT + 1;
   static const uint32_t MESSAGE_SLOT = COLUMNNUMBER_SLOT + 1;
   static const uint32_t SOURCEID_SLOT = MESSAGE_SLOT + 1;
   static const uint32_t TIME_WARP_SLOT = SOURCEID_SLOT + 1;
 
   static const uint32_t RESERVED_SLOTS = TIME_WARP_SLOT + 1;
 
  public:
-  static const Class classes[JSEXN_ERROR_LIMIT];
+  static const JSClass classes[JSEXN_ERROR_LIMIT];
 
-  static const Class* classForType(JSExnType type) {
+  static const JSClass* classForType(JSExnType type) {
     MOZ_ASSERT(type < JSEXN_WARN);
     return &classes[type];
   }
 
-  static bool isErrorClass(const Class* clasp) {
+  static bool isErrorClass(const JSClass* clasp) {
     return &classes[0] <= clasp &&
            clasp < &classes[0] + mozilla::ArrayLength(classes);
   }
 
   // Create an error of the given type corresponding to the provided location
   // info.  If |message| is non-null, then the error will have a .message
   // property with that value; otherwise the error will have no .message
   // property.
--- a/js/src/vm/GeneratorObject.cpp
+++ b/js/src/vm/GeneratorObject.cpp
@@ -209,17 +209,17 @@ GeneratorObject* GeneratorObject::create
     proto = GlobalObject::getOrCreateGeneratorObjectPrototype(cx, cx->global());
     if (!proto) {
       return nullptr;
     }
   }
   return NewObjectWithGivenProto<GeneratorObject>(cx, proto);
 }
 
-const Class GeneratorObject::class_ = {
+const JSClass GeneratorObject::class_ = {
     "Generator", JSCLASS_HAS_RESERVED_SLOTS(GeneratorObject::RESERVED_SLOTS)};
 
 static const JSFunctionSpec generator_methods[] = {
     JS_SELF_HOSTED_FN("next", "GeneratorNext", 1, 0),
     JS_SELF_HOSTED_FN("throw", "GeneratorThrow", 1, 0),
     JS_SELF_HOSTED_FN("return", "GeneratorReturn", 1, 0), JS_FS_END};
 
 JSObject* js::NewSingletonObjectWithFunctionPrototype(
--- a/js/src/vm/GeneratorObject.h
+++ b/js/src/vm/GeneratorObject.h
@@ -190,17 +190,17 @@ class AbstractGeneratorObject : public N
     return getFixedSlotOffset(EXPRESSION_STACK_SLOT);
   }
 };
 
 class GeneratorObject : public AbstractGeneratorObject {
  public:
   enum { RESERVED_SLOTS = AbstractGeneratorObject::RESERVED_SLOTS };
 
-  static const Class class_;
+  static const JSClass class_;
 
   static GeneratorObject* create(JSContext* cx, HandleFunction fun);
 };
 
 bool GeneratorThrowOrReturn(JSContext* cx, AbstractFramePtr frame,
                             Handle<AbstractGeneratorObject*> obj,
                             HandleValue val, GeneratorResumeKind resumeKind);
 
--- a/js/src/vm/GlobalObject.cpp
+++ b/js/src/vm/GlobalObject.cpp
@@ -40,26 +40,26 @@
 #include "vm/JSObject-inl.h"
 #include "vm/JSScript-inl.h"
 #include "vm/NativeObject-inl.h"
 #include "vm/Realm-inl.h"
 
 using namespace js;
 
 struct ProtoTableEntry {
-  const Class* clasp;
+  const JSClass* clasp;
   ClassInitializerOp init;
 };
 
 namespace js {
 
-extern const Class IntlClass;
-extern const Class JSONClass;
-extern const Class MathClass;
-extern const Class WebAssemblyClass;
+extern const JSClass IntlClass;
+extern const JSClass JSONClass;
+extern const JSClass MathClass;
+extern const JSClass WebAssemblyClass;
 
 #define DECLARE_PROTOTYPE_CLASS_INIT(name, init, clasp) \
   extern JSObject* init(JSContext* cx, Handle<GlobalObject*> global);
 JS_FOR_EACH_PROTOTYPE(DECLARE_PROTOTYPE_CLASS_INIT)
 #undef DECLARE_PROTOTYPE_CLASS_INIT
 
 }  // namespace js
 
@@ -70,17 +70,17 @@ JSObject* js::InitViaClassSpec(JSContext
 static const ProtoTableEntry protoTable[JSProto_LIMIT] = {
 #define INIT_FUNC(name, init, clasp) {clasp, init},
 #define INIT_FUNC_DUMMY(name, init, clasp) {nullptr, nullptr},
     JS_FOR_PROTOTYPES(INIT_FUNC, INIT_FUNC_DUMMY)
 #undef INIT_FUNC_DUMMY
 #undef INIT_FUNC
 };
 
-JS_FRIEND_API const js::Class* js::ProtoKeyToClass(JSProtoKey key) {
+JS_FRIEND_API const JSClass* js::ProtoKeyToClass(JSProtoKey key) {
   MOZ_ASSERT(key < JSProto_LIMIT);
   return protoTable[key].clasp;
 }
 
 // This method is not in the header file to avoid having to include
 // TypedObject.h from GlobalObject.h. It is not generally perf
 // sensitive.
 TypedObjectModuleObject& js::GlobalObject::getTypedObjectModule() const {
@@ -148,17 +148,17 @@ bool GlobalObject::resolveConstructor(JS
   // define it. Classes may use one or the other, but not both.
   ClassInitializerOp init = protoTable[key].init;
   if (init == InitViaClassSpec) {
     init = nullptr;
   }
 
   // Some classes can be disabled at compile time, others at run time;
   // if a feature is compile-time disabled, init and clasp are both null.
-  const Class* clasp = ProtoKeyToClass(key);
+  const JSClass* clasp = ProtoKeyToClass(key);
   if ((!init && !clasp) || skipDeselectedConstructor(cx, key)) {
     if (mode == IfClassIsDisabled::Throw) {
       JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
                                 JSMSG_CONSTRUCTOR_DISABLED,
                                 clasp ? clasp->name : "constructor");
       return false;
     }
     return true;
@@ -344,17 +344,17 @@ JSObject* GlobalObject::createObject(JSC
   MOZ_ASSERT(!cx->isHelperThreadContext());
   if (!init(cx, global)) {
     return nullptr;
   }
 
   return &global->getSlot(slot).toObject();
 }
 
-const Class GlobalObject::OffThreadPlaceholderObject::class_ = {
+const JSClass GlobalObject::OffThreadPlaceholderObject::class_ = {
     "off-thread-prototype-placeholder", JSCLASS_HAS_RESERVED_SLOTS(1)};
 
 /* static */ GlobalObject::OffThreadPlaceholderObject*
 GlobalObject::OffThreadPlaceholderObject::New(JSContext* cx, unsigned slot) {
   Rooted<OffThreadPlaceholderObject*> placeholder(cx);
   placeholder = NewObjectWithGivenTaggedProto<OffThreadPlaceholderObject>(
       cx, AsTaggedProto(nullptr));
   if (!placeholder) {
@@ -511,17 +511,18 @@ JSObject* GlobalObject::getOrCreateThrow
     return nullptr;
   }
   MOZ_ASSERT(nameResult);
 
   global->setReservedSlot(THROWTYPEERROR, ObjectValue(*throwTypeError));
   return throwTypeError;
 }
 
-GlobalObject* GlobalObject::createInternal(JSContext* cx, const Class* clasp) {
+GlobalObject* GlobalObject::createInternal(JSContext* cx,
+                                           const JSClass* clasp) {
   MOZ_ASSERT(clasp->flags & JSCLASS_IS_GLOBAL);
   MOZ_ASSERT(clasp->isTrace(JS_GlobalObjectTraceHook));
 
   JSObject* obj = NewObjectWithGivenProto(cx, clasp, nullptr, SingletonObject);
   if (!obj) {
     return nullptr;
   }
 
@@ -556,17 +557,17 @@ GlobalObject* GlobalObject::createIntern
   if (!JSObject::setDelegate(cx, global)) {
     return nullptr;
   }
 
   return global;
 }
 
 /* static */
-GlobalObject* GlobalObject::new_(JSContext* cx, const Class* clasp,
+GlobalObject* GlobalObject::new_(JSContext* cx, const JSClass* clasp,
                                  JSPrincipals* principals,
                                  JS::OnNewGlobalHookOption hookOption,
                                  const JS::RealmOptions& options) {
   MOZ_ASSERT(!cx->isExceptionPending());
   MOZ_ASSERT_IF(cx->zone(), !cx->zone()->isAtomsZone());
 
   // If we are creating a new global in an existing compartment, make sure the
   // compartment has a live global at all times (by rooting it here).
@@ -660,17 +661,17 @@ bool GlobalObject::initStandardClasses(J
  * properties or functions on it.
  *
  * Used in self-hosting to install the few builtin constructors required by
  * self-hosted builtins.
  */
 static bool InitBareBuiltinCtor(JSContext* cx, Handle<GlobalObject*> global,
                                 JSProtoKey protoKey) {
   MOZ_ASSERT(cx->runtime()->isSelfHostingGlobal(global));
-  const Class* clasp = ProtoKeyToClass(protoKey);
+  const JSClass* clasp = ProtoKeyToClass(protoKey);
   RootedObject proto(cx);
   proto = clasp->specCreatePrototypeHook()(cx, protoKey);
   if (!proto) {
     return false;
   }
 
   RootedObject ctor(cx, clasp->specCreateConstructorHook()(cx, protoKey));
   if (!ctor) {
@@ -766,44 +767,44 @@ JSFunction* GlobalObject::createConstruc
 
   if (jitInfo) {
     fun->setJitInfo(jitInfo);
   }
 
   return fun;
 }
 
-static NativeObject* CreateBlankProto(JSContext* cx, const Class* clasp,
+static NativeObject* CreateBlankProto(JSContext* cx, const JSClass* clasp,
                                       HandleObject proto) {
   MOZ_ASSERT(clasp != &JSFunction::class_);
 
   RootedNativeObject blankProto(
       cx, NewNativeObjectWithGivenProto(cx, clasp, proto, SingletonObject));
   if (!blankProto || !JSObject::setDelegate(cx, blankProto)) {
     return nullptr;
   }
 
   return blankProto;
 }
 
 /* static */
 NativeObject* GlobalObject::createBlankPrototype(JSContext* cx,
                                                  Handle<GlobalObject*> global,
-                                                 const Class* clasp) {
+                                                 const JSClass* clasp) {
   RootedObject objectProto(cx, getOrCreateObjectPrototype(cx, global));
   if (!objectProto) {
     return nullptr;
   }
 
   return CreateBlankProto(cx, clasp, objectProto);
 }
 
 /* static */
 NativeObject* GlobalObject::createBlankPrototypeInheriting(JSContext* cx,
-                                                           const Class* clasp,
+                                                           const JSClass* clasp,
                                                            HandleObject proto) {
   return CreateBlankProto(cx, clasp, proto);
 }
 
 bool js::LinkConstructorAndPrototype(JSContext* cx, JSObject* ctor_,
                                      JSObject* proto_, unsigned prototypeAttrs,
                                      unsigned constructorAttrs) {
   RootedObject ctor(cx, ctor_), proto(cx, proto_);
--- a/js/src/vm/GlobalObject.h
+++ b/js/src/vm/GlobalObject.h
@@ -235,20 +235,20 @@ class GlobalObject : public NativeObject
     MOZ_ASSERT(inited == classIsInitialized(JSProto_Object));
     return inited;
   }
 
   // Disallow use of unqualified JSObject::create in GlobalObject.
   static GlobalObject* create(...) = delete;
 
   friend struct ::JSRuntime;
-  static GlobalObject* createInternal(JSContext* cx, const Class* clasp);
+  static GlobalObject* createInternal(JSContext* cx, const JSClass* clasp);
 
  public:
-  static GlobalObject* new_(JSContext* cx, const Class* clasp,
+  static GlobalObject* new_(JSContext* cx, const JSClass* clasp,
                             JSPrincipals* principals,
                             JS::OnNewGlobalHookOption hookOption,
                             const JS::RealmOptions& options);
 
   /*
    * For bootstrapping, whether to splice a prototype for the global object.
    */
   bool shouldSplicePrototype();
@@ -267,24 +267,24 @@ class GlobalObject : public NativeObject
    * class, using |Object.prototype| as its [[Prototype]].  Users creating
    * prototype objects with particular internal structure (e.g. reserved
    * slots guaranteed to contain values of particular types) must immediately
    * complete the minimal initialization to make the returned object safe to
    * touch.
    */
   static NativeObject* createBlankPrototype(JSContext* cx,
                                             Handle<GlobalObject*> global,
-                                            const js::Class* clasp);
+                                            const JSClass* clasp);
 
   /*
    * Identical to createBlankPrototype, but uses proto as the [[Prototype]]
    * of the returned blank prototype.
    */
   static NativeObject* createBlankPrototypeInheriting(JSContext* cx,
-                                                      const js::Class* clasp,
+                                                      const JSClass* clasp,
                                                       HandleObject proto);
 
   template <typename T>
   static T* createBlankPrototype(JSContext* cx, Handle<GlobalObject*> global) {
     NativeObject* res = createBlankPrototype(cx, global, &T::class_);
     return res ? &res->template as<T>() : nullptr;
   }
 
@@ -909,17 +909,17 @@ class GlobalObject : public NativeObject
   }
   void setInstrumentationHolder(JSObject* instrumentation) {
     setReservedSlot(INSTRUMENTATION, ObjectValue(*instrumentation));
   }
 
   // A class used in place of a prototype during off-thread parsing.
   struct OffThreadPlaceholderObject : public NativeObject {
     static const int32_t SlotIndexSlot = 0;
-    static const Class class_;
+    static const JSClass class_;
     static OffThreadPlaceholderObject* New(JSContext* cx, unsigned slot);
     inline int32_t getSlotIndex() const;
   };
 
   static bool isOffThreadPrototypePlaceholder(JSObject* obj) {
     return obj->is<OffThreadPlaceholderObject>();
   }
 
--- a/js/src/vm/Instrumentation.cpp
+++ b/js/src/vm/Instrumentation.cpp
@@ -55,17 +55,17 @@ static const JSClassOps InstrumentationH
     nullptr, /* mayResolve */
     RealmInstrumentation::holderFinalize,
     nullptr, /* call */
     nullptr, /* hasInstance */
     nullptr, /* construct */
     RealmInstrumentation::holderTrace,
 };
 
-static const Class InstrumentationHolderClass = {
+static const JSClass InstrumentationHolderClass = {
     "Instrumentation Holder",
     JSCLASS_HAS_RESERVED_SLOTS(ReservedSlotCount) | JSCLASS_FOREGROUND_FINALIZE,
     &InstrumentationHolderClassOps, JS_NULL_CLASS_SPEC, JS_NULL_CLASS_EXT};
 
 static const char* instrumentationNames[] = {
 #define DEFINE_INSTRUMENTATION_STRING(_1, String, _2) String,
     FOR_EACH_INSTRUMENTATION_KIND(DEFINE_INSTRUMENTATION_STRING)
 #undef DEFINE_INSTRUMENTATION_STRING
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -854,17 +854,17 @@ extern bool JS::InstanceofOperator(JSCon
     return ReportIsNotFunction(cx, val);
   }
 
   /* Step 5. */
   return OrdinaryHasInstance(cx, obj, v, bp);
 }
 
 bool js::HasInstance(JSContext* cx, HandleObject obj, HandleValue v, bool* bp) {
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   RootedValue local(cx, v);
   if (JSHasInstanceOp hasInstance = clasp->getHasInstance()) {
     return hasInstance(cx, obj, &local, bp);
   }
   return JS::InstanceofOperator(cx, obj, local, bp);
 }
 
 JSType js::TypeOfObject(JSObject* obj) {
--- a/js/src/vm/Iteration.cpp
+++ b/js/src/vm/Iteration.cpp
@@ -563,17 +563,17 @@ static inline void RegisterEnumerator(Ob
 static PropertyIteratorObject* NewPropertyIteratorObject(JSContext* cx) {
   RootedObjectGroup group(
       cx, ObjectGroup::defaultNewGroup(cx, &PropertyIteratorObject::class_,
                                        TaggedProto(nullptr)));
   if (!group) {
     return nullptr;
   }
 
-  const Class* clasp = &PropertyIteratorObject::class_;
+  const JSClass* clasp = &PropertyIteratorObject::class_;
   RootedShape shape(cx,
                     EmptyShape::getInitialShape(cx, clasp, TaggedProto(nullptr),
                                                 ITERATOR_FINALIZE_KIND));
   if (!shape) {
     return nullptr;
   }
 
   JSObject* obj;
@@ -843,17 +843,17 @@ static MOZ_ALWAYS_INLINE PropertyIterato
 static bool CanStoreInIteratorCache(JSObject* obj) {
   do {
     MOZ_ASSERT(obj->isNative());
 
     MOZ_ASSERT(obj->as<NativeObject>().getDenseInitializedLength() == 0);
 
     // Typed arrays have indexed properties not captured by the Shape guard.
     // Enumerate hooks may add extra properties.
-    const Class* clasp = obj->getClass();
+    const JSClass* clasp = obj->getClass();
     if (MOZ_UNLIKELY(IsTypedArrayClass(clasp))) {
       return false;
     }
     if (MOZ_UNLIKELY(clasp->getNewEnumerate() || clasp->getEnumerate())) {
       return false;
     }
 
     obj = obj->staticPrototype();
@@ -1092,72 +1092,72 @@ const JSClassOps PropertyIteratorObject:
     nullptr,           /* newEnumerate */
     nullptr,           /* resolve */
     nullptr,           /* mayResolve */
     finalize, nullptr, /* call        */
     nullptr,           /* hasInstance */
     nullptr,           /* construct   */
     trace};
 
-const Class PropertyIteratorObject::class_ = {
+const JSClass PropertyIteratorObject::class_ = {
     "Iterator", JSCLASS_HAS_PRIVATE | JSCLASS_BACKGROUND_FINALIZE,
     &PropertyIteratorObject::classOps_};
 
-static const Class ArrayIteratorPrototypeClass = {"Array Iterator", 0};
+static const JSClass ArrayIteratorPrototypeClass = {"Array Iterator", 0};
 
 enum {
   ArrayIteratorSlotIteratedObject,
   ArrayIteratorSlotNextIndex,
   ArrayIteratorSlotItemKind,
   ArrayIteratorSlotCount
 };
 
-const Class ArrayIteratorObject::class_ = {
+const JSClass ArrayIteratorObject::class_ = {
     "Array Iterator", JSCLASS_HAS_RESERVED_SLOTS(ArrayIteratorSlotCount)};
 
 ArrayIteratorObject* js::NewArrayIteratorObject(JSContext* cx,
                                                 NewObjectKind newKind) {
   RootedObject proto(
       cx, GlobalObject::getOrCreateArrayIteratorPrototype(cx, cx->global()));
   if (!proto) {
     return nullptr;
   }
 
   return NewObjectWithGivenProto<ArrayIteratorObject>(cx, proto, newKind);
 }
 
 static const JSFunctionSpec array_iterator_methods[] = {
     JS_SELF_HOSTED_FN("next", "ArrayIteratorNext", 0, 0), JS_FS_END};
 
-static const Class StringIteratorPrototypeClass = {"String Iterator", 0};
+static const JSClass StringIteratorPrototypeClass = {"String Iterator", 0};
 
 enum {
   StringIteratorSlotIteratedObject,
   StringIteratorSlotNextIndex,
   StringIteratorSlotCount
 };
 
-const Class StringIteratorObject::class_ = {
+const JSClass StringIteratorObject::class_ = {
     "String Iterator", JSCLASS_HAS_RESERVED_SLOTS(StringIteratorSlotCount)};
 
 static const JSFunctionSpec string_iterator_methods[] = {
     JS_SELF_HOSTED_FN("next", "StringIteratorNext", 0, 0), JS_FS_END};
 
 StringIteratorObject* js::NewStringIteratorObject(JSContext* cx,
                                                   NewObjectKind newKind) {
   RootedObject proto(
       cx, GlobalObject::getOrCreateStringIteratorPrototype(cx, cx->global()));
   if (!proto) {
     return nullptr;
   }
 
   return NewObjectWithGivenProto<StringIteratorObject>(cx, proto, newKind);
 }
 
-static const Class RegExpStringIteratorPrototypeClass = {
+static const JSClass RegExpStringIteratorPrototypeClass = {
     "RegExp String Iterator", 0};
 
 enum {
   // The regular expression used for iteration. May hold the original RegExp
   // object when it is reused instead of a new RegExp object.
   RegExpStringIteratorSlotRegExp,
 
   // The String value being iterated upon.
@@ -1196,17 +1196,17 @@ static_assert(RegExpStringIteratorSlotFl
                   REGEXP_STRING_ITERATOR_FLAGS_SLOT,
               "RegExpStringIteratorSlotFlags must match self-hosting define "
               "for flags slot.");
 static_assert(RegExpStringIteratorSlotLastIndex ==
                   REGEXP_STRING_ITERATOR_LASTINDEX_SLOT,
               "RegExpStringIteratorSlotLastIndex must match self-hosting "
               "define for lastIndex slot.");
 
-const Class RegExpStringIteratorObject::class_ = {
+const JSClass RegExpStringIteratorObject::class_ = {
     "RegExp String Iterator",
     JSCLASS_HAS_RESERVED_SLOTS(RegExpStringIteratorSlotCount)};
 
 static const JSFunctionSpec regexp_string_iterator_methods[] = {
     JS_SELF_HOSTED_FN("next", "RegExpStringIteratorNext", 0, 0),
 
     JS_FS_END};
 
@@ -1501,17 +1501,17 @@ bool GlobalObject::initArrayIteratorProt
   }
 
   RootedObject iteratorProto(
       cx, GlobalObject::getOrCreateIteratorPrototype(cx, global));
   if (!iteratorProto) {
     return false;
   }
 
-  const Class* cls = &ArrayIteratorPrototypeClass;
+  const JSClass* cls = &ArrayIteratorPrototypeClass;
   RootedObject proto(
       cx, GlobalObject::createBlankPrototypeInheriting(cx, cls, iteratorProto));
   if (!proto ||
       !DefinePropertiesAndFunctions(cx, proto, nullptr,
                                     array_iterator_methods) ||
       !DefineToStringTag(cx, proto, cx->names().ArrayIterator)) {
     return false;
   }
@@ -1528,17 +1528,17 @@ bool GlobalObject::initStringIteratorPro
   }
 
   RootedObject iteratorProto(
       cx, GlobalObject::getOrCreateIteratorPrototype(cx, global));
   if (!iteratorProto) {
     return false;
   }
 
-  const Class* cls = &StringIteratorPrototypeClass;
+  const JSClass* cls = &StringIteratorPrototypeClass;
   RootedObject proto(
       cx, GlobalObject::createBlankPrototypeInheriting(cx, cls, iteratorProto));
   if (!proto ||
       !DefinePropertiesAndFunctions(cx, proto, nullptr,
                                     string_iterator_methods) ||
       !DefineToStringTag(cx, proto, cx->names().StringIterator)) {
     return false;
   }
@@ -1555,17 +1555,17 @@ bool GlobalObject::initRegExpStringItera
   }
 
   RootedObject iteratorProto(
       cx, GlobalObject::getOrCreateIteratorPrototype(cx, global));
   if (!iteratorProto) {
     return false;
   }
 
-  const Class* cls = &RegExpStringIteratorPrototypeClass;
+  const JSClass* cls = &RegExpStringIteratorPrototypeClass;
   RootedObject proto(
       cx, GlobalObject::createBlankPrototypeInheriting(cx, cls, iteratorProto));
   if (!proto ||
       !DefinePropertiesAndFunctions(cx, proto, nullptr,
                                     regexp_string_iterator_methods) ||
       !DefineToStringTag(cx, proto, cx->names().RegExpStringIterator)) {
     return false;
   }
--- a/js/src/vm/Iteration.h
+++ b/js/src/vm/Iteration.h
@@ -347,17 +347,17 @@ struct NativeIterator {
     return offsetof(NativeIterator, prev_);
   }
 };
 
 class PropertyIteratorObject : public NativeObject {
   static const JSClassOps classOps_;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   // We don't use the fixed slot but the JITs use this constant to load the
   // private value (the NativeIterator*).
   static const uint32_t NUM_FIXED_SLOTS = 1;
 
   NativeIterator* getNativeIterator() const {
     return static_cast<js::NativeIterator*>(getPrivate());
   }
@@ -367,33 +367,33 @@ class PropertyIteratorObject : public Na
 
  private:
   static void trace(JSTracer* trc, JSObject* obj);
   static void finalize(JSFreeOp* fop, JSObject* obj);
 };
 
 class ArrayIteratorObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 };
 
 ArrayIteratorObject* NewArrayIteratorObject(
     JSContext* cx, NewObjectKind newKind = GenericObject);
 
 class StringIteratorObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 };
 
 StringIteratorObject* NewStringIteratorObject(
     JSContext* cx, NewObjectKind newKind = GenericObject);
 
 class RegExpStringIteratorObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 };
 
 RegExpStringIteratorObject* NewRegExpStringIteratorObject(
     JSContext* cx, NewObjectKind newKind = GenericObject);
 
 MOZ_MUST_USE bool EnumerateProperties(JSContext* cx, HandleObject obj,
                                       MutableHandleIdVector props);
 
--- a/js/src/vm/JSFunction-inl.h
+++ b/js/src/vm/JSFunction-inl.h
@@ -101,17 +101,17 @@ inline JSFunction* CloneFunctionObjectIf
 /* static */ inline JS::Result<JSFunction*, JS::OOM&> JSFunction::create(
     JSContext* cx, js::gc::AllocKind kind, js::gc::InitialHeap heap,
     js::HandleShape shape, js::HandleObjectGroup group) {
   MOZ_ASSERT(kind == js::gc::AllocKind::FUNCTION ||
              kind == js::gc::AllocKind::FUNCTION_EXTENDED);
 
   debugCheckNewObject(group, shape, kind, heap);
 
-  const js::Class* clasp = group->clasp();
+  const JSClass* clasp = group->clasp();
   MOZ_ASSERT(clasp->isJSFunction());
 
   static constexpr size_t NumDynamicSlots = 0;
   MOZ_ASSERT(dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(),
                                clasp) == NumDynamicSlots);
 
   JSObject* obj = js::AllocateObject(cx, kind, NumDynamicSlots, heap, clasp);
   if (!obj) {
--- a/js/src/vm/JSFunction.cpp
+++ b/js/src/vm/JSFunction.cpp
@@ -1203,21 +1203,21 @@ static const JSClassOps JSFunctionClassO
     nullptr,       nullptr,                 /* construct   */
     fun_trace,
 };
 
 static const ClassSpec JSFunctionClassSpec = {
     CreateFunctionConstructor, CreateFunctionPrototype, nullptr, nullptr,
     function_methods,          function_properties};
 
-const Class JSFunction::class_ = {js_Function_str,
-                                  JSCLASS_HAS_CACHED_PROTO(JSProto_Function),
-                                  &JSFunctionClassOps, &JSFunctionClassSpec};
-
-const Class* const js::FunctionClassPtr = &JSFunction::class_;
+const JSClass JSFunction::class_ = {js_Function_str,
+                                    JSCLASS_HAS_CACHED_PROTO(JSProto_Function),
+                                    &JSFunctionClassOps, &JSFunctionClassSpec};
+
+const JSClass* const js::FunctionClassPtr = &JSFunction::class_;
 
 bool JSFunction::isDerivedClassConstructor() {
   bool derived;
   if (isInterpretedLazy()) {
     // There is only one plausible lazy self-hosted derived
     // constructor.
     if (isSelfHostedBuiltin()) {
       JSAtom* name = GetClonedSelfHostedFunctionName(this);
@@ -2519,17 +2519,17 @@ JSFunction* js::DefineFunction(
   if (!DefineDataProperty(cx, obj, id, funVal, flags & ~JSFUN_FLAGS_MASK)) {
     return nullptr;
   }
 
   return fun;
 }
 
 void js::ReportIncompatibleMethod(JSContext* cx, const CallArgs& args,
-                                  const Class* clasp) {
+                                  const JSClass* clasp) {
   RootedValue thisv(cx, args.thisv());
 
 #ifdef DEBUG
   switch (thisv.type()) {
     case ValueType::Object:
       MOZ_ASSERT(thisv.toObject().getClass() != clasp ||
                  !thisv.toObject().isNative() ||
                  !thisv.toObject().staticPrototype() ||
--- a/js/src/vm/JSFunction.h
+++ b/js/src/vm/JSFunction.h
@@ -310,17 +310,17 @@ class FunctionFlags {
   bool isExtended() const { return hasFlags(EXTENDED); }
   void setIsExtended() { setFlags(EXTENDED); }
 
   bool isNativeConstructor() const { return hasFlags(NATIVE_CTOR); }
 };
 
 class JSFunction : public js::NativeObject {
  public:
-  static const js::Class class_;
+  static const JSClass class_;
 
  private:
   /*
    * number of formal arguments
    * (including defaults and the rest parameter unlike f.length)
    */
   uint16_t nargs_;
 
@@ -1228,17 +1228,17 @@ XDRResult XDRInterpretedFunction(XDRStat
                                  MutableHandleFunction objp);
 
 /*
  * Report an error that call.thisv is not compatible with the specified class,
  * assuming that the method (clasp->name).prototype.<name of callee function>
  * is what was called.
  */
 extern void ReportIncompatibleMethod(JSContext* cx, const CallArgs& args,
-                                     const Class* clasp);
+                                     const JSClass* clasp);
 
 /*
  * Report an error that call.thisv is not an acceptable this for the callee
  * function.
  */
 extern void ReportIncompatible(JSContext* cx, const CallArgs& args);
 
 extern bool fun_apply(JSContext* cx, unsigned argc, Value* vp);
--- a/js/src/vm/JSObject-inl.h
+++ b/js/src/vm/JSObject-inl.h
@@ -20,17 +20,17 @@
 #include "vm/ObjectOperations-inl.h"  // js::MaybeHasInterestingSymbolProperty
 #include "vm/Realm-inl.h"
 
 MOZ_ALWAYS_INLINE uint32_t js::NativeObject::numDynamicSlots() const {
   return dynamicSlotsCount(numFixedSlots(), slotSpan(), getClass());
 }
 
 /* static */ MOZ_ALWAYS_INLINE uint32_t js::NativeObject::dynamicSlotsCount(
-    uint32_t nfixed, uint32_t span, const Class* clasp) {
+    uint32_t nfixed, uint32_t span, const JSClass* clasp) {
   if (span <= nfixed) {
     return 0;
   }
   span -= nfixed;
 
   // Increase the slots to SLOT_CAPACITY_MIN to decrease the likelihood
   // the dynamic slots need to get increased again. ArrayObjects ignore
   // this because slots are uncommon in that case.
@@ -55,17 +55,17 @@ inline void JSObject::finalize(JSFreeOp*
 #ifdef DEBUG
   MOZ_ASSERT(isTenured());
   if (!IsBackgroundFinalized(asTenured().getAllocKind())) {
     /* Assert we're on the main thread. */
     MOZ_ASSERT(CurrentThreadCanAccessZone(zone()));
   }
 #endif
 
-  const js::Class* clasp = getClass();
+  const JSClass* clasp = getClass();
   js::NativeObject* nobj = nullptr;
   if (clasp->isNative()) {
     nobj = &as<js::NativeObject>();
   }
   if (clasp->hasFinalize()) {
     clasp->doFinalize(fop, this);
   }
 
@@ -173,17 +173,17 @@ inline bool JSObject::isUnqualifiedVarOb
   if (is<js::DebugEnvironmentProxy>()) {
     return as<js::DebugEnvironmentProxy>().environment().isUnqualifiedVarObj();
   }
   return is<js::GlobalObject>() || is<js::NonSyntacticVariablesObject>();
 }
 
 namespace js {
 
-inline bool ClassCanHaveFixedData(const Class* clasp) {
+inline bool ClassCanHaveFixedData(const JSClass* clasp) {
   // Normally, the number of fixed slots given an object is the maximum
   // permitted for its size class. For array buffers and non-shared typed
   // arrays we only use enough to cover the class reserved slots, so that
   // the remaining space in the object's allocation is available for the
   // buffer's data.
   return !clasp->isNative() || clasp == &js::ArrayBufferObject::class_ ||
          js::IsTypedArrayClass(clasp);
 }
@@ -372,17 +372,17 @@ MOZ_ALWAYS_INLINE bool ToPropertyKey(JSC
  * or embedding code.
  */
 inline bool IsInternalFunctionObject(JSObject& funobj) {
   JSFunction& fun = funobj.as<JSFunction>();
   return fun.isInterpreted() && !fun.environment();
 }
 
 inline gc::InitialHeap GetInitialHeap(NewObjectKind newKind,
-                                      const Class* clasp) {
+                                      const JSClass* clasp) {
   if (newKind == NurseryAllocatedProxy) {
     MOZ_ASSERT(clasp->isProxy());
     MOZ_ASSERT(clasp->hasFinalize());
     MOZ_ASSERT(!CanNurseryAllocateFinalizedClass(clasp));
     return gc::DefaultHeap;
   }
   if (newKind != GenericObject) {
     return gc::TenuredHeap;
@@ -402,24 +402,24 @@ inline gc::InitialHeap GetInitialHeap(Ne
 
   return GetInitialHeap(newKind, group->clasp());
 }
 
 /*
  * Make an object with the specified prototype. If parent is null, it will
  * default to the prototype's global if the prototype is non-null.
  */
-JSObject* NewObjectWithGivenTaggedProto(JSContext* cx, const Class* clasp,
+JSObject* NewObjectWithGivenTaggedProto(JSContext* cx, const JSClass* clasp,
                                         Handle<TaggedProto> proto,
                                         gc::AllocKind allocKind,
                                         NewObjectKind newKind,
                                         uint32_t initialShapeFlags = 0);
 
 inline JSObject* NewObjectWithGivenTaggedProto(
-    JSContext* cx, const Class* clasp, Handle<TaggedProto> proto,
+    JSContext* cx, const JSClass* clasp, Handle<TaggedProto> proto,
     NewObjectKind newKind = GenericObject, uint32_t initialShapeFlags = 0) {
   gc::AllocKind allocKind = gc::GetGCObjectKind(clasp);
   return NewObjectWithGivenTaggedProto(cx, clasp, proto, allocKind, newKind,
                                        initialShapeFlags);
 }
 
 template <typename T>
 inline T* NewObjectWithGivenTaggedProto(JSContext* cx,
@@ -447,24 +447,24 @@ inline T* NewObjectWithNullTaggedProto(J
                                        NewObjectKind newKind = GenericObject,
                                        uint32_t initialShapeFlags = 0) {
   Handle<TaggedProto> nullProto = AsTaggedProto(nullptr);
   return NewObjectWithGivenTaggedProto<T>(cx, nullProto, newKind,
                                           initialShapeFlags);
 }
 
 inline JSObject* NewObjectWithGivenProto(
-    JSContext* cx, const Class* clasp, HandleObject proto,
+    JSContext* cx, const JSClass* clasp, HandleObject proto,
     gc::AllocKind allocKind, NewObjectKind newKind = GenericObject) {
   return NewObjectWithGivenTaggedProto(cx, clasp, AsTaggedProto(proto),
                                        allocKind, newKind);
 }
 
 inline JSObject* NewObjectWithGivenProto(
-    JSContext* cx, const Class* clasp, HandleObject proto,
+    JSContext* cx, const JSClass* clasp, HandleObject proto,
     NewObjectKind newKind = GenericObject) {
   return NewObjectWithGivenTaggedProto(cx, clasp, AsTaggedProto(proto),
                                        newKind);
 }
 
 template <typename T>
 inline T* NewObjectWithGivenProto(JSContext* cx, HandleObject proto,
                                   NewObjectKind newKind = GenericObject) {
@@ -477,29 +477,29 @@ inline T* NewObjectWithGivenProto(JSCont
                                   NewObjectKind newKind = GenericObject) {
   JSObject* obj = NewObjectWithGivenTaggedProto(
       cx, &T::class_, AsTaggedProto(proto), allocKind, newKind);
   return obj ? &obj->as<T>() : nullptr;
 }
 
 // Make an object with the prototype set according to the cached prototype or
 // Object.prototype.
-JSObject* NewObjectWithClassProtoCommon(JSContext* cx, const Class* clasp,
+JSObject* NewObjectWithClassProtoCommon(JSContext* cx, const JSClass* clasp,
                                         HandleObject proto,
                                         gc::AllocKind allocKind,
                                         NewObjectKind newKind);
 
 inline JSObject* NewObjectWithClassProto(
-    JSContext* cx, const Class* clasp, HandleObject proto,
+    JSContext* cx, const JSClass* clasp, HandleObject proto,
     gc::AllocKind allocKind, NewObjectKind newKind = GenericObject) {
   return NewObjectWithClassProtoCommon(cx, clasp, proto, allocKind, newKind);
 }
 
 inline JSObject* NewObjectWithClassProto(
-    JSContext* cx, const Class* clasp, HandleObject proto,
+    JSContext* cx, const JSClass* clasp, HandleObject proto,
     NewObjectKind newKind = GenericObject) {
   gc::AllocKind allocKind = gc::GetGCObjectKind(clasp);
   return NewObjectWithClassProto(cx, clasp, proto, allocKind, newKind);
 }
 
 template <class T>
 inline T* NewObjectWithClassProto(JSContext* cx, HandleObject proto,
                                   NewObjectKind newKind = GenericObject) {
@@ -516,23 +516,24 @@ inline T* NewObjectWithClassProto(JSCont
   return obj ? &obj->as<T>() : nullptr;
 }
 
 /*
  * Create a native instance of the given class with parent and proto set
  * according to the context's active global.
  */
 inline JSObject* NewBuiltinClassInstance(
-    JSContext* cx, const Class* clasp, gc::AllocKind allocKind,
+    JSContext* cx, const JSClass* clasp, gc::AllocKind allocKind,
     NewObjectKind newKind = GenericObject) {
   return NewObjectWithClassProto(cx, clasp, nullptr, allocKind, newKind);
 }
 
 inline JSObject* NewBuiltinClassInstance(
-    JSContext* cx, const Class* clasp, NewObjectKind newKind = GenericObject) {
+    JSContext* cx, const JSClass* clasp,
+    NewObjectKind newKind = GenericObject) {
   gc::AllocKind allocKind = gc::GetGCObjectKind(clasp);
   return NewBuiltinClassInstance(cx, clasp, allocKind, newKind);
 }
 
 template <typename T>
 inline T* NewBuiltinClassInstance(JSContext* cx,
                                   NewObjectKind newKind = GenericObject) {
   JSObject* obj = NewBuiltinClassInstance(cx, &T::class_, newKind);
@@ -596,17 +597,17 @@ inline bool GetClassOfValue(JSContext* c
     return true;
   }
 
   RootedObject obj(cx, &v.toObject());
   return GetBuiltinClass(cx, obj, cls);
 }
 
 extern NativeObject* InitClass(JSContext* cx, HandleObject obj,
-                               HandleObject parent_proto, const Class* clasp,
+                               HandleObject parent_proto, const JSClass* clasp,
                                JSNative constructor, unsigned nargs,
                                const JSPropertySpec* ps,
                                const JSFunctionSpec* fs,
                                const JSPropertySpec* static_ps,
                                const JSFunctionSpec* static_fs,
                                NativeObject** ctorp = nullptr);
 
 MOZ_ALWAYS_INLINE const char* GetObjectClassName(JSContext* cx,
--- a/js/src/vm/JSObject.cpp
+++ b/js/src/vm/JSObject.cpp
@@ -616,17 +616,17 @@ bool js::SetIntegrityLevel(JSContext* cx
   if (obj->isNative()) {
     ObjectElements::FreezeOrSeal(cx, &obj->as<NativeObject>(), level);
   }
 
   return true;
 }
 
 static bool ResolveLazyProperties(JSContext* cx, HandleNativeObject obj) {
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   if (JSEnumerateOp enumerate = clasp->getEnumerate()) {
     if (!enumerate(cx, obj)) {
       return false;
     }
   }
   if (clasp->getNewEnumerate() && clasp->getResolve()) {
     RootedIdVector properties(cx);
     if (!clasp->getNewEnumerate()(cx, obj, &properties,
@@ -750,30 +750,30 @@ bool js::TestIntegrityLevel(JSContext* c
 }
 
 /* * */
 
 /*
  * Get the GC kind to use for scripted 'new' on the given class.
  * FIXME bug 547327: estimate the size from the allocation site.
  */
-static inline gc::AllocKind NewObjectGCKind(const js::Class* clasp) {
+static inline gc::AllocKind NewObjectGCKind(const JSClass* clasp) {
   if (clasp == &ArrayObject::class_) {
     return gc::AllocKind::OBJECT8;
   }
   if (clasp == &JSFunction::class_) {
     return gc::AllocKind::OBJECT2;
   }
   return gc::AllocKind::OBJECT4;
 }
 
 static inline JSObject* NewObject(JSContext* cx, HandleObjectGroup group,
                                   gc::AllocKind kind, NewObjectKind newKind,
                                   uint32_t initialShapeFlags = 0) {
-  const Class* clasp = group->clasp();
+  const JSClass* clasp = group->clasp();
 
   MOZ_ASSERT(clasp != &ArrayObject::class_);
   MOZ_ASSERT_IF(clasp == &JSFunction::class_,
                 kind == gc::AllocKind::FUNCTION ||
                     kind == gc::AllocKind::FUNCTION_EXTENDED);
 
   // For objects which can have fixed data following the object, only use
   // enough fixed slots to cover the number of reserved slots in the object,
@@ -810,34 +810,34 @@ static inline JSObject* NewObject(JSCont
     }
     obj = nobj;
   }
 
   probes::CreateObject(cx, obj);
   return obj;
 }
 
-void NewObjectCache::fillProto(EntryIndex entry, const Class* clasp,
+void NewObjectCache::fillProto(EntryIndex entry, const JSClass* clasp,
                                js::TaggedProto proto, gc::AllocKind kind,
                                NativeObject* obj) {
   MOZ_ASSERT_IF(proto.isObject(), !proto.toObject()->is<GlobalObject>());
   MOZ_ASSERT(obj->taggedProto() == proto);
   return fill(entry, clasp, proto.raw(), kind, obj);
 }
 
 bool js::NewObjectWithTaggedProtoIsCachable(JSContext* cx,
                                             Handle<TaggedProto> proto,
                                             NewObjectKind newKind,
-                                            const Class* clasp) {
+                                            const JSClass* clasp) {
   return !cx->isHelperThreadContext() && proto.isObject() &&
          newKind == GenericObject && clasp->isNative() &&
          !proto.toObject()->is<GlobalObject>();
 }
 
-JSObject* js::NewObjectWithGivenTaggedProto(JSContext* cx, const Class* clasp,
+JSObject* js::NewObjectWithGivenTaggedProto(JSContext* cx, const JSClass* clasp,
                                             Handle<TaggedProto> proto,
                                             gc::AllocKind allocKind,
                                             NewObjectKind newKind,
                                             uint32_t initialShapeFlags) {
   if (CanBeFinalizedInBackground(allocKind, clasp)) {
     allocKind = GetBackgroundAllocKind(allocKind);
   }
 
@@ -873,22 +873,22 @@ JSObject* js::NewObjectWithGivenTaggedPr
     cache.lookupProto(clasp, proto.toObject(), allocKind, &entry);
     cache.fillProto(entry, clasp, proto, allocKind, &obj->as<NativeObject>());
   }
 
   return obj;
 }
 
 static bool NewObjectIsCachable(JSContext* cx, NewObjectKind newKind,
-                                const Class* clasp) {
+                                const JSClass* clasp) {
   return !cx->isHelperThreadContext() && newKind == GenericObject &&
          clasp->isNative();
 }
 
-JSObject* js::NewObjectWithClassProtoCommon(JSContext* cx, const Class* clasp,
+JSObject* js::NewObjectWithClassProtoCommon(JSContext* cx, const JSClass* clasp,
                                             HandleObject protoArg,
                                             gc::AllocKind allocKind,
                                             NewObjectKind newKind) {
   if (protoArg) {
     return NewObjectWithGivenTaggedProto(cx, clasp, AsTaggedProto(protoArg),
                                          allocKind, newKind);
   }
 
@@ -1017,17 +1017,17 @@ bool js::NewObjectScriptedCall(JSContext
       return false;
     }
   }
 
   pobj.set(obj);
   return true;
 }
 
-JSObject* js::CreateThis(JSContext* cx, const Class* newclasp,
+JSObject* js::CreateThis(JSContext* cx, const JSClass* newclasp,
                          HandleObject callee) {
   RootedObject proto(cx);
   if (!GetPrototypeFromConstructor(
           cx, callee, JSCLASS_CACHED_PROTO_KEY(newclasp), &proto)) {
     return nullptr;
   }
   gc::AllocKind kind = NewObjectGCKind(newclasp);
   return NewObjectWithClassProto(cx, newclasp, proto, kind);
@@ -1752,17 +1752,17 @@ void JSObject::fixDictionaryShapeAfterSw
   // Dictionary shapes can point back to their containing objects, so after
   // swapping the guts of those objects fix the pointers up.
   if (isNative() && as<NativeObject>().inDictionaryMode()) {
     as<NativeObject>().shape()->listp = as<NativeObject>().shapePtr();
   }
 }
 
 bool js::ObjectMayBeSwapped(const JSObject* obj) {
-  const js::Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
 
   // We want to optimize Window/globals and Gecko doesn't require transplanting
   // them (only the WindowProxy around them). A Window may be a DOMClass, so we
   // explicitly check if this is a global.
   if (clasp->isGlobal()) {
     return false;
   }
 
@@ -2024,17 +2024,17 @@ void JSObject::swap(JSContext* cx, Handl
     b->traceChildren(zone->barrierTracer());
   }
 
   NotifyGCPostSwap(a, b, r);
 }
 
 static NativeObject* DefineConstructorAndPrototype(
     JSContext* cx, HandleObject obj, HandleAtom atom, HandleObject protoProto,
-    const Class* clasp, Native constructor, unsigned nargs,
+    const JSClass* clasp, Native constructor, unsigned nargs,
     const JSPropertySpec* ps, const JSFunctionSpec* fs,
     const JSPropertySpec* static_ps, const JSFunctionSpec* static_fs,
     NativeObject** ctorp) {
   // Create the prototype object.
   RootedNativeObject proto(
       cx, GlobalObject::createBlankPrototypeInheriting(cx, clasp, protoProto));
   if (!proto) {
     return nullptr;
@@ -2068,17 +2068,17 @@ static NativeObject* DefineConstructorAn
 
   if (ctorp) {
     *ctorp = ctor;
   }
   return proto;
 }
 
 NativeObject* js::InitClass(JSContext* cx, HandleObject obj,
-                            HandleObject protoProto_, const Class* clasp,
+                            HandleObject protoProto_, const JSClass* clasp,
                             Native constructor, unsigned nargs,
                             const JSPropertySpec* ps, const JSFunctionSpec* fs,
                             const JSPropertySpec* static_ps,
                             const JSFunctionSpec* static_fs,
                             NativeObject** ctorp) {
   RootedAtom atom(cx, Atomize(cx, clasp->name, strlen(clasp->name)));
   if (!atom) {
     return nullptr;
@@ -3117,17 +3117,17 @@ static bool MaybeCallMethod(JSContext* c
     return true;
   }
 
   return js::Call(cx, vp, obj, vp);
 }
 
 static bool ReportCantConvert(JSContext* cx, unsigned errorNumber,
                               HandleObject obj, JSType hint) {
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
 
   // Avoid recursive death when decompiling in ReportValueError.
   RootedString str(cx);
   if (hint == JSTYPE_STRING) {
     str = JS_AtomizeAndPinString(cx, clasp->name);
     if (!str) {
       return false;
     }
@@ -3145,17 +3145,17 @@ static bool ReportCantConvert(JSContext*
 
 bool JS::OrdinaryToPrimitive(JSContext* cx, HandleObject obj, JSType hint,
                              MutableHandleValue vp) {
   MOZ_ASSERT(hint == JSTYPE_NUMBER || hint == JSTYPE_STRING ||
              hint == JSTYPE_UNDEFINED);
 
   Rooted<jsid> id(cx);
 
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   if (hint == JSTYPE_STRING) {
     id = NameToId(cx->names().toString);
 
     /* Optimize (new String(...)).toString(). */
     if (clasp == &StringObject::class_) {
       StringObject* nobj = &obj->as<StringObject>();
       if (HasNativeMethodPure(nobj, cx->names().toString, str_toString, cx)) {
         vp.setString(nobj->unbox());
@@ -3498,17 +3498,17 @@ static void dumpValue(const Value& v, js
         if (fun->hasScript()) {
           JSScript* script = fun->nonLazyScript();
           out.printf(" (%s:%u)", script->filename() ? script->filename() : "",
                      script->lineno());
         }
         out.printf(" at %p>", (void*)fun);
       } else {
         JSObject* obj = &v.toObject();
-        const Class* clasp = obj->getClass();
+        const JSClass* clasp = obj->getClass();
         out.printf("<%s%s at %p>", clasp->name,
                    (clasp == &PlainObject::class_) ? "" : " object",
                    (void*)obj);
       }
       break;
     case ValueType::Boolean:
       if (v.toBoolean()) {
         out.put("true");
@@ -3628,17 +3628,17 @@ void JSObject::dump(js::GenericPrinter& 
 
   if (IsCrossCompartmentWrapper(this)) {
     out.printf("  compartment %p\n", compartment());
   } else {
     JSObject* globalObj = &nonCCWGlobal();
     out.printf("  global %p [%s]\n", globalObj, globalObj->getClass()->name);
   }
 
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   out.printf("  class %p %s\n", clasp, clasp->name);
 
   if (obj->hasLazyGroup()) {
     out.put("  lazy group\n");
   } else {
     const ObjectGroup* group = obj->group();
     out.printf("  group %p\n", group);
   }
@@ -4048,17 +4048,17 @@ JS::ubi::Node::Size JS::ubi::Concrete<JS
 
 const char16_t JS::ubi::Concrete<JSObject>::concreteTypeName[] = u"JSObject";
 
 void JSObject::traceChildren(JSTracer* trc) {
   TraceEdge(trc, &group_, "group");
 
   traceShape(trc);
 
-  const Class* clasp = group_->clasp();
+  const JSClass* clasp = group_->clasp();
   if (clasp->isNative()) {
     NativeObject* nobj = &as<NativeObject>();
 
     {
       GetObjectSlotNameFunctor func(nobj);
       JS::AutoTracingDetails ctx(trc, func);
       JS::AutoTracingIndex index(trc);
       // Tracing can mutate the target but cannot change the slot count,
@@ -4232,17 +4232,17 @@ bool js::Unbox(JSContext* cx, HandleObje
   return true;
 }
 
 #ifdef DEBUG
 /* static */
 void JSObject::debugCheckNewObject(ObjectGroup* group, Shape* shape,
                                    js::gc::AllocKind allocKind,
                                    js::gc::InitialHeap heap) {
-  const js::Class* clasp = group->clasp();
+  const JSClass* clasp = group->clasp();
   MOZ_ASSERT(clasp != &ArrayObject::class_);
 
   MOZ_ASSERT_IF(shape, clasp == shape->getObjectClass());
 
   if (!ClassCanHaveFixedData(clasp)) {
     MOZ_ASSERT(shape);
     MOZ_ASSERT(gc::GetGCKindSlots(allocKind, clasp) == shape->numFixedSlots());
   }
--- a/js/src/vm/JSObject.h
+++ b/js/src/vm/JSObject.h
@@ -388,17 +388,17 @@ class JSObject : public js::gc::Cell {
   }
 
   /*
    * Mark an object as requiring its default 'new' type to have unknown
    * properties.
    */
   inline bool isNewGroupUnknown() const;
   static bool setNewGroupUnknown(JSContext* cx, js::ObjectGroupRealm& realm,
-                                 const js::Class* clasp, JS::HandleObject obj);
+                                 const JSClass* clasp, JS::HandleObject obj);
 
   /* Set a new prototype for an object with a singleton type. */
   static bool splicePrototype(JSContext* cx, js::HandleObject obj,
                               js::Handle<js::TaggedProto> proto);
 
   /*
    * Environment chains.
    *
@@ -817,17 +817,17 @@ using ClassInitializerOp = JSObject* (*)
 
 } /* namespace js */
 
 namespace js {
 
 bool NewObjectWithTaggedProtoIsCachable(JSContext* cx,
                                         Handle<TaggedProto> proto,
                                         NewObjectKind newKind,
-                                        const Class* clasp);
+                                        const JSClass* clasp);
 
 // ES6 9.1.15 GetPrototypeFromConstructor.
 extern bool GetPrototypeFromConstructor(JSContext* cx,
                                         js::HandleObject newTarget,
                                         JSProtoKey intrinsicDefaultProto,
                                         js::MutableHandleObject proto);
 
 // https://tc39.github.io/ecma262/#sec-getprototypefromconstructor
@@ -874,17 +874,17 @@ extern JSObject* CreateThisForFunctionWi
     HandleObject proto, NewObjectKind newKind = GenericObject);
 
 // Specialized call for constructing |this| with a known function callee.
 extern JSObject* CreateThisForFunction(JSContext* cx, js::HandleFunction callee,
                                        js::HandleObject newTarget,
                                        NewObjectKind newKind);
 
 // Generic call for constructing |this|.
-extern JSObject* CreateThis(JSContext* cx, const js::Class* clasp,
+extern JSObject* CreateThis(JSContext* cx, const JSClass* clasp,
                             js::HandleObject callee);
 
 extern JSObject* CloneObject(JSContext* cx, HandleObject obj,
                              Handle<js::TaggedProto> proto);
 
 extern JSObject* DeepCloneObjectLiteral(JSContext* cx, HandleObject obj,
                                         NewObjectKind newKind = GenericObject);
 
--- a/js/src/vm/JSScript.cpp
+++ b/js/src/vm/JSScript.cpp
@@ -1677,17 +1677,17 @@ static const JSClassOps ScriptSourceObje
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     ScriptSourceObject::finalize,
     nullptr, /* call */
     nullptr, /* hasInstance */
     nullptr, /* construct */
     ScriptSourceObject::trace};
 
-const Class ScriptSourceObject::class_ = {
+const JSClass ScriptSourceObject::class_ = {
     "ScriptSource",
     JSCLASS_HAS_RESERVED_SLOTS(RESERVED_SLOTS) | JSCLASS_FOREGROUND_FINALIZE,
     &ScriptSourceObjectClassOps};
 
 ScriptSourceObject* ScriptSourceObject::createInternal(JSContext* cx,
                                                        ScriptSource* source,
                                                        HandleObject canonical) {
   ScriptSourceObject* obj =
--- a/js/src/vm/JSScript.h
+++ b/js/src/vm/JSScript.h
@@ -1271,17 +1271,17 @@ class ScriptSourceObject : public Native
                                             HandleObject canonical);
 
   bool isCanonical() const {
     return &getReservedSlot(CANONICAL_SLOT).toObject() == this;
   }
   ScriptSourceObject* unwrappedCanonical() const;
 
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   static void trace(JSTracer* trc, JSObject* obj);
   static void finalize(JSFreeOp* fop, JSObject* obj);
 
   static ScriptSourceObject* create(JSContext* cx, ScriptSource* source);
   static ScriptSourceObject* clone(JSContext* cx, HandleScriptSourceObject sso);
 
   // Initialize those properties of this ScriptSourceObject whose values
--- a/js/src/vm/List.cpp
+++ b/js/src/vm/List.cpp
@@ -3,9 +3,9 @@
 /* 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 "vm/List-inl.h"
 
 using namespace js;
 
-const Class ListObject::class_ = {"List"};
+const JSClass ListObject::class_ = {"List"};
--- a/js/src/vm/List.h
+++ b/js/src/vm/List.h
@@ -26,17 +26,17 @@ namespace js {
  * contains a completely unrelated List constructor that's used in self-hosted
  * code. And AsyncGeneratorObject optimizes away the ListObject in the common
  * case where its internal queue never holds more than one element.
  *
  * ListObjects must not be exposed to content scripts.
  */
 class ListObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   inline static MOZ_MUST_USE ListObject* create(JSContext* cx);
 
   uint32_t length() const { return getDenseInitializedLength(); }
 
   const Value& get(uint32_t index) const { return getDenseElement(index); }
 
   template <class T>
--- a/js/src/vm/MemoryMetrics.cpp
+++ b/js/src/vm/MemoryMetrics.cpp
@@ -367,17 +367,17 @@ static void StatsCellCallback(JSRuntime*
             rtStats->mallocSizeOf_, &closure->wasmSeenMetadata,
             &closure->wasmSeenBytes, &closure->wasmSeenCode,
             &closure->wasmSeenTables, &info.objectsNonHeapCodeWasm,
             &info.objectsMallocHeapMisc);
       }
 
       realmStats.classInfo.add(info);
 
-      const Class* clasp = obj->getClass();
+      const JSClass* clasp = obj->getClass();
       const char* className = clasp->name;
       AddClassInfo(granularity, realmStats, className, info);
 
       if (ObjectPrivateVisitor* opv = closure->opv) {
         nsISupports* iface;
         if (opv->getISupports_(obj, &iface) && iface) {
           realmStats.objectsPrivate += opv->sizeOfIncludingThis(iface);
         }
--- a/js/src/vm/NativeObject-inl.h
+++ b/js/src/vm/NativeObject-inl.h
@@ -474,17 +474,17 @@ inline bool NativeObject::isInWholeCellB
   return cells && cells->hasCell(cell);
 }
 
 /* static */ inline JS::Result<NativeObject*, JS::OOM&> NativeObject::create(
     JSContext* cx, js::gc::AllocKind kind, js::gc::InitialHeap heap,
     js::HandleShape shape, js::HandleObjectGroup group) {
   debugCheckNewObject(group, shape, kind, heap);
 
-  const js::Class* clasp = group->clasp();
+  const JSClass* clasp = group->clasp();
   MOZ_ASSERT(clasp->isNative());
   MOZ_ASSERT(!clasp->isJSFunction(), "should use JSFunction::create");
 
   size_t nDynamicSlots =
       dynamicSlotsCount(shape->numFixedSlots(), shape->slotSpan(), clasp);
 
   JSObject* obj = js::AllocateObject(cx, kind, nDynamicSlots, heap, clasp);
   if (!obj) {
@@ -629,53 +629,53 @@ static inline PlainObject* CopyInitializ
   if (!obj->setLastProperty(cx, baseobj->lastProperty())) {
     return nullptr;
   }
 
   return obj;
 }
 
 inline NativeObject* NewNativeObjectWithGivenTaggedProto(
-    JSContext* cx, const Class* clasp, Handle<TaggedProto> proto,
+    JSContext* cx, const JSClass* clasp, Handle<TaggedProto> proto,
     gc::AllocKind allocKind, NewObjectKind newKind) {
   return MaybeNativeObject(
       NewObjectWithGivenTaggedProto(cx, clasp, proto, allocKind, newKind));
 }
 
 inline NativeObject* NewNativeObjectWithGivenTaggedProto(
-    JSContext* cx, const Class* clasp, Handle<TaggedProto> proto,
+    JSContext* cx, const JSClass* clasp, Handle<TaggedProto> proto,
     NewObjectKind newKind = GenericObject) {
   return MaybeNativeObject(
       NewObjectWithGivenTaggedProto(cx, clasp, proto, newKind));
 }
 
 inline NativeObject* NewNativeObjectWithGivenProto(JSContext* cx,
-                                                   const Class* clasp,
+                                                   const JSClass* clasp,
                                                    HandleObject proto,
                                                    gc::AllocKind allocKind,
                                                    NewObjectKind newKind) {
   return MaybeNativeObject(
       NewObjectWithGivenProto(cx, clasp, proto, allocKind, newKind));
 }
 
 inline NativeObject* NewNativeObjectWithGivenProto(
-    JSContext* cx, const Class* clasp, HandleObject proto,
+    JSContext* cx, const JSClass* clasp, HandleObject proto,
     NewObjectKind newKind = GenericObject) {
   return MaybeNativeObject(NewObjectWithGivenProto(cx, clasp, proto, newKind));
 }
 
 inline NativeObject* NewNativeObjectWithClassProto(
-    JSContext* cx, const Class* clasp, HandleObject proto,
+    JSContext* cx, const JSClass* clasp, HandleObject proto,
     gc::AllocKind allocKind, NewObjectKind newKind = GenericObject) {
   return MaybeNativeObject(
       NewObjectWithClassProto(cx, clasp, proto, allocKind, newKind));
 }
 
 inline NativeObject* NewNativeObjectWithClassProto(
-    JSContext* cx, const Class* clasp, HandleObject proto,
+    JSContext* cx, const JSClass* clasp, HandleObject proto,
     NewObjectKind newKind = GenericObject) {
   return MaybeNativeObject(NewObjectWithClassProto(cx, clasp, proto, newKind));
 }
 
 /*
  * Call obj's resolve hook.
  *
  * cx and id are the parameters initially passed to the ongoing lookup;
--- a/js/src/vm/NativeObject.h
+++ b/js/src/vm/NativeObject.h
@@ -1109,17 +1109,17 @@ class NativeObject : public JSObject {
   /*
    * Get the number of dynamic slots to allocate to cover the properties in
    * an object with the given number of fixed slots and slot span. The slot
    * capacity is not stored explicitly, and the allocated size of the slot
    * array is kept in sync with this count.
    */
   static MOZ_ALWAYS_INLINE uint32_t dynamicSlotsCount(uint32_t nfixed,
                                                       uint32_t span,
-                                                      const Class* clasp);
+                                                      const JSClass* clasp);
   static MOZ_ALWAYS_INLINE uint32_t dynamicSlotsCount(Shape* shape);
 
   /* Elements accessors. */
 
   // The maximum size, in sizeof(Value), of the allocation used for an
   // object's dense elements.  (This includes space used to store an
   // ObjectElements instance.)
   // |MAX_DENSE_ELEMENTS_ALLOCATION * sizeof(JS::Value)| shouldn't overflow
@@ -1482,17 +1482,17 @@ class NativeObject : public JSObject {
   }
   static size_t offsetOfSlots() { return offsetof(NativeObject, slots_); }
 };
 
 // Object class for plain native objects created using '{}' object literals,
 // 'new Object()', 'Object.create', etc.
 class PlainObject : public NativeObject {
  public:
-  static const js::Class class_;
+  static const JSClass class_;
 
   /* Return the allocKind we would use if we were to tenure this object. */
   inline js::gc::AllocKind allocKindForTenure() const;
 };
 
 inline void NativeObject::privateWriteBarrierPre(void** oldval) {
   JS::shadow::Zone* shadowZone = this->shadowZoneFromAnyThread();
   if (shadowZone->needsIncrementalBarrier() && *oldval &&
--- a/js/src/vm/NumberObject.h
+++ b/js/src/vm/NumberObject.h
@@ -15,17 +15,17 @@ class GlobalObject;
 
 class NumberObject : public NativeObject {
   /* Stores this Number object's [[PrimitiveValue]]. */
   static const unsigned PRIMITIVE_VALUE_SLOT = 0;
 
  public:
   static const unsigned RESERVED_SLOTS = 1;
 
-  static const Class class_;
+  static const JSClass class_;
 
   /*
    * Creates a new Number object boxing the given number.
    * If proto is nullptr, then Number.prototype will be used instead.
    */
   static inline NumberObject* create(JSContext* cx, double d,
                                      HandleObject proto = nullptr);
 
--- a/js/src/vm/ObjectGroup.cpp
+++ b/js/src/vm/ObjectGroup.cpp
@@ -32,17 +32,17 @@
 #include "vm/TypeInference-inl.h"
 
 using namespace js;
 
 /////////////////////////////////////////////////////////////////////
 // ObjectGroup
 /////////////////////////////////////////////////////////////////////
 
-ObjectGroup::ObjectGroup(const Class* clasp, TaggedProto proto,
+ObjectGroup::ObjectGroup(const JSClass* clasp, TaggedProto proto,
                          JS::Realm* realm, ObjectGroupFlags initialFlags)
     : clasp_(clasp), proto_(proto), realm_(realm), flags_(initialFlags) {
   /* Windows may not appear on prototype chains. */
   MOZ_ASSERT_IF(proto.isObject(), !IsWindow(proto.toObject()));
   MOZ_ASSERT(JS::StringIsASCII(clasp->name));
 
   setGeneration(zone()->types.generation);
 }
@@ -277,17 +277,17 @@ bool JSObject::splicePrototype(JSContext
    * the old or new types.
    */
   MOZ_ASSERT(obj->isSingleton());
 
   // Windows may not appear on prototype chains.
   MOZ_ASSERT_IF(proto.isObject(), !IsWindow(proto.toObject()));
 
 #ifdef DEBUG
-  const Class* oldClass = obj->getClass();
+  const JSClass* oldClass = obj->getClass();
 #endif
 
   if (proto.isObject()) {
     RootedObject protoObj(cx, proto.toObject());
     if (!JSObject::setDelegate(cx, protoObj)) {
       return false;
     }
   }
@@ -351,18 +351,17 @@ ObjectGroup* JSObject::makeLazyGroup(JSC
 
   obj->group_ = group;
 
   return group;
 }
 
 /* static */
 bool JSObject::setNewGroupUnknown(JSContext* cx, ObjectGroupRealm& realm,
-                                  const js::Class* clasp,
-                                  JS::HandleObject obj) {
+                                  const JSClass* clasp, JS::HandleObject obj) {
   ObjectGroup::setDefaultNewGroupUnknown(cx, realm, clasp, obj);
   return JSObject::setFlags(cx, obj, BaseShape::NEW_GROUP_UNKNOWN);
 }
 
 /////////////////////////////////////////////////////////////////////
 // ObjectGroupRealm NewTable
 /////////////////////////////////////////////////////////////////////
 
@@ -381,21 +380,21 @@ struct ObjectGroupRealm::NewEntry {
   // Note: This pointer is only used for equality and does not need a read
   // barrier.
   JSObject* associated;
 
   NewEntry(ObjectGroup* group, JSObject* associated)
       : group(group), associated(associated) {}
 
   struct Lookup {
-    const Class* clasp;
+    const JSClass* clasp;
     TaggedProto proto;
     JSObject* associated;
 
-    Lookup(const Class* clasp, TaggedProto proto, JSObject* associated)
+    Lookup(const JSClass* clasp, TaggedProto proto, JSObject* associated)
         : clasp(clasp), proto(proto), associated(associated) {
       MOZ_ASSERT((associated && associated->is<JSFunction>()) == !clasp);
     }
 
     explicit Lookup(const NewEntry& entry)
         : clasp(entry.group.unbarrieredGet()->clasp()),
           proto(entry.group.unbarrieredGet()->proto()),
           associated(entry.associated) {
@@ -477,26 +476,26 @@ class ObjectGroupRealm::NewTable
   return group->realm()->objectGroups_;
 }
 
 /* static*/ ObjectGroupRealm& ObjectGroupRealm::getForNewObject(JSContext* cx) {
   return cx->realm()->objectGroups_;
 }
 
 MOZ_ALWAYS_INLINE ObjectGroup* ObjectGroupRealm::DefaultNewGroupCache::lookup(
-    const Class* clasp, TaggedProto proto, JSObject* associated) {
+    const JSClass* clasp, TaggedProto proto, JSObject* associated) {
   if (group_ && associated_ == associated && group_->proto() == proto &&
       (!clasp || group_->clasp() == clasp)) {
     return group_;
   }
   return nullptr;
 }
 
 /* static */
-ObjectGroup* ObjectGroup::defaultNewGroup(JSContext* cx, const Class* clasp,
+ObjectGroup* ObjectGroup::defaultNewGroup(JSContext* cx, const JSClass* clasp,
                                           TaggedProto proto,
                                           JSObject* associated) {
   MOZ_ASSERT_IF(associated, proto.isObject());
   MOZ_ASSERT_IF(proto.isObject(),
                 cx->isInsideCurrentCompartment(proto.toObject()));
 
   // A null lookup clasp is used for 'new' groups with an associated
   // function. The group starts out as a plain object but might mutate into an
@@ -643,17 +642,17 @@ ObjectGroup* ObjectGroup::defaultNewGrou
 
   groups.defaultNewGroupCache.put(group, associated);
   return group;
 }
 
 /* static */
 ObjectGroup* ObjectGroup::lazySingletonGroup(JSContext* cx,
                                              ObjectGroup* oldGroup,
-                                             const Class* clasp,
+                                             const JSClass* clasp,
                                              TaggedProto proto) {
   ObjectGroupRealm& realm = oldGroup ? ObjectGroupRealm::get(oldGroup)
                                      : ObjectGroupRealm::getForNewObject(cx);
 
   MOZ_ASSERT_IF(proto.isObject(),
                 cx->compartment() == proto.toObject()->compartment());
 
   ObjectGroupRealm::NewTable*& table = realm.lazyTable;
@@ -690,49 +689,49 @@ ObjectGroup* ObjectGroup::lazySingletonG
   }
 
   return group;
 }
 
 /* static */
 void ObjectGroup::setDefaultNewGroupUnknown(JSContext* cx,
                                             ObjectGroupRealm& realm,
-                                            const Class* clasp,
+                                            const JSClass* clasp,
                                             HandleObject obj) {
   // If the object already has a new group, mark that group as unknown.
   ObjectGroupRealm::NewTable* table = realm.defaultNewTable;
   if (table) {
     Rooted<TaggedProto> taggedProto(cx, TaggedProto(obj));
     auto lookup =
         ObjectGroupRealm::NewEntry::Lookup(clasp, taggedProto, nullptr);
     auto p = table->lookup(lookup);
     if (p) {
       MarkObjectGroupUnknownProperties(cx, p->group);
     }
   }
 }
 
 #ifdef DEBUG
 /* static */
-bool ObjectGroup::hasDefaultNewGroup(JSObject* proto, const Class* clasp,
+bool ObjectGroup::hasDefaultNewGroup(JSObject* proto, const JSClass* clasp,
                                      ObjectGroup* group) {
   ObjectGroupRealm::NewTable* table =
       ObjectGroupRealm::get(group).defaultNewTable;
 
   if (table) {
     auto lookup =
         ObjectGroupRealm::NewEntry::Lookup(clasp, TaggedProto(proto), nullptr);
     auto p = table->lookup(lookup);
     return p && p->group == group;
   }
   return false;
 }
 #endif /* DEBUG */
 
-inline const Class* GetClassForProtoKey(JSProtoKey key) {
+inline const JSClass* GetClassForProtoKey(JSProtoKey key) {
   switch (key) {
     case JSProto_Null:
     case JSProto_Object:
       return &PlainObject::class_;
     case JSProto_Array:
       return &ArrayObject::class_;
 
     case JSProto_Int8Array:
@@ -1633,27 +1632,27 @@ ObjectGroupRealm::~ObjectGroupRealm() {
   js_delete(defaultNewTable);
   js_delete(lazyTable);
   js_delete(arrayObjectTable);
   js_delete(plainObjectTable);
   js_delete(allocationSiteTable);
   stringSplitStringGroup = nullptr;
 }
 
-void ObjectGroupRealm::removeDefaultNewGroup(const Class* clasp,
+void ObjectGroupRealm::removeDefaultNewGroup(const JSClass* clasp,
                                              TaggedProto proto,
                                              JSObject* associated) {
   auto p = defaultNewTable->lookup(NewEntry::Lookup(clasp, proto, associated));
   MOZ_RELEASE_ASSERT(p);
 
   defaultNewTable->remove(p);
   defaultNewGroupCache.purge();
 }
 
-void ObjectGroupRealm::replaceDefaultNewGroup(const Class* clasp,
+void ObjectGroupRealm::replaceDefaultNewGroup(const JSClass* clasp,
                                               TaggedProto proto,
                                               JSObject* associated,
                                               ObjectGroup* group) {
   NewEntry::Lookup lookup(clasp, proto, associated);
 
   auto p = defaultNewTable->lookup(lookup);
   MOZ_RELEASE_ASSERT(p);
   defaultNewTable->remove(p);
@@ -1663,18 +1662,18 @@ void ObjectGroupRealm::replaceDefaultNew
     if (!defaultNewTable->putNew(lookup, NewEntry(group, associated))) {
       oomUnsafe.crash("Inconsistent object table");
     }
   }
 }
 
 /* static */
 ObjectGroup* ObjectGroupRealm::makeGroup(
-    JSContext* cx, Realm* realm, const Class* clasp, Handle<TaggedProto> proto,
-    ObjectGroupFlags initialFlags /* = 0 */) {
+    JSContext* cx, Realm* realm, const JSClass* clasp,
+    Handle<TaggedProto> proto, ObjectGroupFlags initialFlags /* = 0 */) {
   MOZ_ASSERT_IF(proto.isObject(),
                 cx->isInsideCurrentCompartment(proto.toObject()));
 
   ObjectGroup* group = Allocate<ObjectGroup>(cx);
   if (!group) {
     return nullptr;
   }
   new (group) ObjectGroup(clasp, proto, realm, initialFlags);
--- a/js/src/vm/ObjectGroup.h
+++ b/js/src/vm/ObjectGroup.h
@@ -85,17 +85,17 @@ enum NewObjectKind {
 
 /* Type information about an object accessed by a script. */
 class ObjectGroup : public gc::TenuredCell {
  public:
   class Property;
 
  private:
   /* Class shared by objects in this group. */
-  const Class* clasp_;  // set by constructor
+  const JSClass* clasp_;  // set by constructor
 
   /* Prototype shared by objects in this group. */
   GCPtr<TaggedProto> proto_;  // set by constructor
 
   /* Realm shared by objects in this group. */
   JS::Realm* realm_;
   ;  // set by constructor
 
@@ -174,17 +174,17 @@ class ObjectGroup : public gc::TenuredCe
 
   friend class gc::GCRuntime;
   friend class gc::GCTrace;
 
   // See JSObject::offsetOfGroup() comment.
   friend class js::jit::MacroAssembler;
 
  public:
-  const Class* clasp() const { return clasp_; }
+  const JSClass* clasp() const { return clasp_; }
 
   bool hasDynamicPrototype() const { return proto_.isDynamic(); }
 
   const GCPtr<TaggedProto>& proto() const { return proto_; }
 
   GCPtr<TaggedProto>& proto() { return proto_; }
 
   void setProto(TaggedProto proto);
@@ -334,17 +334,17 @@ class ObjectGroup : public gc::TenuredCe
 
     Property(const Property& o) : id(o.id.get()), types(o.types) {}
 
     static uint32_t keyBits(jsid id) { return uint32_t(JSID_BITS(id)); }
     static jsid getKey(Property* p) { return p->id; }
   };
 
  public:
-  inline ObjectGroup(const Class* clasp, TaggedProto proto, JS::Realm* realm,
+  inline ObjectGroup(const JSClass* clasp, TaggedProto proto, JS::Realm* realm,
                      ObjectGroupFlags initialFlags);
 
   inline bool hasAnyFlags(const AutoSweepObjectGroup& sweep,
                           ObjectGroupFlags flags);
   inline bool hasAllFlags(const AutoSweepObjectGroup& sweep,
                           ObjectGroupFlags flags);
 
   bool hasAnyFlagsDontCheckGeneration(ObjectGroupFlags flags) {
@@ -460,28 +460,29 @@ class ObjectGroup : public gc::TenuredCe
                                        jsbytecode* pc);
 
   // Whether to make a singleton object at an allocation site.
   static bool useSingletonForAllocationSite(JSScript* script, jsbytecode* pc,
                                             JSProtoKey key);
 
   // Static accessors for ObjectGroupRealm NewTable.
 
-  static ObjectGroup* defaultNewGroup(JSContext* cx, const Class* clasp,
+  static ObjectGroup* defaultNewGroup(JSContext* cx, const JSClass* clasp,
                                       TaggedProto proto,
                                       JSObject* associated = nullptr);
   static ObjectGroup* lazySingletonGroup(JSContext* cx, ObjectGroup* oldGroup,
-                                         const Class* clasp, TaggedProto proto);
+                                         const JSClass* clasp,
+                                         TaggedProto proto);
 
   static void setDefaultNewGroupUnknown(JSContext* cx, ObjectGroupRealm& realm,
-                                        const js::Class* clasp,
+                                        const JSClass* clasp,
                                         JS::HandleObject obj);
 
 #ifdef DEBUG
-  static bool hasDefaultNewGroup(JSObject* proto, const Class* clasp,
+  static bool hasDefaultNewGroup(JSObject* proto, const JSClass* clasp,
                                  ObjectGroup* group);
 #endif
 
   // Static accessors for ObjectGroupRealm ArrayObjectTable and
   // PlainObjectTable.
 
   enum class NewArrayKind {
     Normal,       // Specialize array group based on its element type.
@@ -566,17 +567,18 @@ class ObjectGroupRealm {
     DefaultNewGroupCache() : associated_(nullptr) { purge(); }
 
     void purge() { group_ = nullptr; }
     void put(ObjectGroup* group, JSObject* associated) {
       group_ = group;
       associated_ = associated;
     }
 
-    MOZ_ALWAYS_INLINE ObjectGroup* lookup(const Class* clasp, TaggedProto proto,
+    MOZ_ALWAYS_INLINE ObjectGroup* lookup(const JSClass* clasp,
+                                          TaggedProto proto,
                                           JSObject* associated);
   } defaultNewGroupCache = {};
 
   // Tables for managing groups common to the contents of large script
   // singleton objects and JSON objects. These are vanilla ArrayObjects and
   // PlainObjects, so we distinguish the groups of different ones by looking
   // at the types of their properties.
   //
@@ -615,23 +617,23 @@ class ObjectGroupRealm {
   void operator=(ObjectGroupRealm&) = delete;
 
   static ObjectGroupRealm& get(const ObjectGroup* group);
   static ObjectGroupRealm& getForNewObject(JSContext* cx);
 
   void replaceAllocationSiteGroup(JSScript* script, jsbytecode* pc,
                                   JSProtoKey kind, ObjectGroup* group);
 
-  void removeDefaultNewGroup(const Class* clasp, TaggedProto proto,
+  void removeDefaultNewGroup(const JSClass* clasp, TaggedProto proto,
                              JSObject* associated);
-  void replaceDefaultNewGroup(const Class* clasp, TaggedProto proto,
+  void replaceDefaultNewGroup(const JSClass* clasp, TaggedProto proto,
                               JSObject* associated, ObjectGroup* group);
 
   static ObjectGroup* makeGroup(JSContext* cx, JS::Realm* realm,
-                                const Class* clasp, Handle<TaggedProto> proto,
+                                const JSClass* clasp, Handle<TaggedProto> proto,
                                 ObjectGroupFlags initialFlags = 0);
 
   static ObjectGroup* getStringSplitStringGroup(JSContext* cx);
 
   void addSizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf,
                               size_t* allocationSiteTables,
                               size_t* arrayGroupTables,
                               size_t* plainObjectGroupTables,
--- a/js/src/vm/ObjectOperations-inl.h
+++ b/js/src/vm/ObjectOperations-inl.h
@@ -181,17 +181,17 @@ inline bool GetElementNoGC(JSContext* cx
   if (index > JSID_INT_MAX) {
     return false;
   }
 
   return GetPropertyNoGC(cx, obj, receiver, INT_TO_JSID(index), vp);
 }
 
 static MOZ_ALWAYS_INLINE bool ClassMayResolveId(const JSAtomState& names,
-                                                const Class* clasp, jsid id,
+                                                const JSClass* clasp, jsid id,
                                                 JSObject* maybeObj) {
   MOZ_ASSERT_IF(maybeObj, maybeObj->getClass() == clasp);
 
   if (!clasp->getResolve()) {
     // Sanity check: we should only have a mayResolve hook if we have a
     // resolve hook.
     MOZ_ASSERT(!clasp->getMayResolve(),
                "Class with mayResolve hook but no resolve hook");
--- a/js/src/vm/PIC.cpp
+++ b/js/src/vm/PIC.cpp
@@ -330,17 +330,17 @@ static const JSClassOps ForOfPICClassOps
                                             nullptr,
                                             nullptr,
                                             ForOfPIC_finalize,
                                             nullptr, /* call        */
                                             nullptr, /* hasInstance */
                                             nullptr, /* construct   */
                                             ForOfPIC_traceObject};
 
-const Class ForOfPIC::class_ = {
+const JSClass ForOfPIC::class_ = {
     "ForOfPIC", JSCLASS_HAS_PRIVATE | JSCLASS_BACKGROUND_FINALIZE,
     &ForOfPICClassOps};
 
 /* static */
 NativeObject* js::ForOfPIC::createForOfPICObject(JSContext* cx,
                                                  Handle<GlobalObject*> global) {
   cx->check(global);
   NativeObject* obj = NewNativeObjectWithGivenProto(cx, &ForOfPIC::class_,
--- a/js/src/vm/PIC.h
+++ b/js/src/vm/PIC.h
@@ -210,17 +210,17 @@ struct ForOfPIC {
 
     // Erase the stub chain.
     void eraseChain(JSContext* cx);
 
     void freeAllStubs(JSFreeOp* fop);
   };
 
   // Class for object that holds ForOfPIC chain.
-  static const Class class_;
+  static const JSClass class_;
 
   static NativeObject* createForOfPICObject(JSContext* cx,
                                             Handle<GlobalObject*> global);
 
   static inline Chain* fromJSObject(NativeObject* obj) {
     MOZ_ASSERT(obj->getClass() == &ForOfPIC::class_);
     return (ForOfPIC::Chain*)obj->getPrivate();
   }
--- a/js/src/vm/Probes.h
+++ b/js/src/vm/Probes.h
@@ -93,17 +93,17 @@ void DTraceExitJSFun(JSContext* cx, JSFu
 
 }  // namespace probes
 
 #ifdef INCLUDE_MOZILLA_DTRACE
 static const char* ObjectClassname(JSObject* obj) {
   if (!obj) {
     return "(null object)";
   }
-  const Class* clasp = obj->getClass();
+  const JSClass* clasp = obj->getClass();
   if (!clasp) {
     return "(null)";
   }
   const char* class_name = clasp->name;
   if (!class_name) {
     return "(null class name)";
   }
   return class_name;
@@ -122,17 +122,17 @@ inline bool probes::CreateObject(JSConte
   return ok;
 }
 
 inline bool probes::FinalizeObject(JSObject* obj) {
   bool ok = true;
 
 #ifdef INCLUDE_MOZILLA_DTRACE
   if (JAVASCRIPT_OBJECT_FINALIZE_ENABLED()) {
-    const Class* clasp = obj->getClass();
+    const JSClass* clasp = obj->getClass();
 
     /* the first arg is nullptr - reserved for future use (filename?) */
     JAVASCRIPT_OBJECT_FINALIZE(nullptr, (char*)clasp->name, (uintptr_t)obj);
   }
 #endif
 
   return ok;
 }
--- a/js/src/vm/ProxyObject.cpp
+++ b/js/src/vm/ProxyObject.cpp
@@ -12,17 +12,17 @@
 #include "vm/Realm.h"
 
 #include "gc/ObjectKind-inl.h"
 #include "vm/JSObject-inl.h"
 #include "vm/TypeInference-inl.h"
 
 using namespace js;
 
-static gc::AllocKind GetProxyGCObjectKind(const Class* clasp,
+static gc::AllocKind GetProxyGCObjectKind(const JSClass* clasp,
                                           const BaseProxyHandler* handler,
                                           const Value& priv) {
   MOZ_ASSERT(clasp->isProxy());
 
   uint32_t nreserved = JSCLASS_RESERVED_SLOTS(clasp);
 
   // For now assert each Proxy Class has at least 1 reserved slot. This is
   // not a hard requirement, but helps catch Classes that need an explicit
@@ -46,17 +46,17 @@ static gc::AllocKind GetProxyGCObjectKin
 }
 
 /* static */
 ProxyObject* ProxyObject::New(JSContext* cx, const BaseProxyHandler* handler,
                               HandleValue priv, TaggedProto proto_,
                               const ProxyOptions& options) {
   Rooted<TaggedProto> proto(cx, proto_);
 
-  const Class* clasp = options.clasp();
+  const JSClass* clasp = options.clasp();
 
 #ifdef DEBUG
   MOZ_ASSERT(isValidProxyClass(clasp));
   MOZ_ASSERT(clasp->shouldDelayMetadataBuilder());
   MOZ_ASSERT_IF(proto.isObject(),
                 cx->compartment() == proto.toObject()->compartment());
   MOZ_ASSERT(clasp->hasFinalize());
   if (priv.isGCThing()) {
@@ -162,17 +162,17 @@ void ProxyObject::nuke() {
   // traced. This avoids the possibility of triggering write barriers while
   // nuking proxies in dead compartments which could otherwise cause those
   // compartments to be kept alive. Note that these are slots cannot hold
   // cross compartment pointers, so this cannot cause the target compartment
   // to leak.
 }
 
 /* static */ JS::Result<ProxyObject*, JS::OOM&> ProxyObject::create(
-    JSContext* cx, const Class* clasp, Handle<TaggedProto> proto,
+    JSContext* cx, const JSClass* clasp, Handle<TaggedProto> proto,
     gc::AllocKind allocKind, NewObjectKind newKind) {
   MOZ_ASSERT(clasp->isProxy());
 
   Realm* realm = cx->realm();
   RootedObjectGroup group(cx);
   RootedShape shape(cx);
 
   // Try to look up the group and shape in the NewProxyCache.
--- a/js/src/vm/ProxyObject.h
+++ b/js/src/vm/ProxyObject.h
@@ -33,17 +33,17 @@ class ProxyObject : public JSObject {
     static_assert(offsetof(ProxyObject, data) == detail::ProxyDataOffset,
                   "proxy object layout must match shadow interface");
     static_assert(offsetof(ProxyObject, data.reservedSlots) ==
                       offsetof(shadow::Object, slots),
                   "Proxy reservedSlots must overlay native object slots field");
   }
 
   static JS::Result<ProxyObject*, JS::OOM&> create(JSContext* cx,
-                                                   const js::Class* clasp,
+                                                   const JSClass* clasp,
                                                    Handle<TaggedProto> proto,
                                                    js::gc::AllocKind allocKind,
                                                    js::NewObjectKind newKind);
 
  public:
   static ProxyObject* New(JSContext* cx, const BaseProxyHandler* handler,
                           HandleValue priv, TaggedProto proto_,
                           const ProxyOptions& options);
@@ -104,17 +104,17 @@ class ProxyObject : public JSObject {
 
   GCPtrValue* slotOfPrivate() {
     return reinterpret_cast<GCPtrValue*>(
         &detail::GetProxyDataLayout(this)->values()->privateSlot);
   }
 
   void setPrivate(const Value& priv);
 
-  static bool isValidProxyClass(const Class* clasp) {
+  static bool isValidProxyClass(const JSClass* clasp) {
     // Since we can take classes from the outside, make sure that they
     // are "sane". They have to quack enough like proxies for us to belive
     // they should be treated as such.
 
     // Proxy classes are not allowed to have call or construct hooks directly.
     // Their callability is instead decided by handler()->isCallable().
     return clasp->isProxy() && clasp->isTrace(ProxyObject::trace) &&
            !clasp->getCall() && !clasp->getConstruct();
@@ -127,17 +127,17 @@ class ProxyObject : public JSObject {
 
   static void trace(JSTracer* trc, JSObject* obj);
 
   static void traceEdgeToTarget(JSTracer* trc, ProxyObject* obj);
 
   void nuke();
 };
 
-inline bool IsProxyClass(const Class* clasp) { return clasp->isProxy(); }
+inline bool IsProxyClass(const JSClass* clasp) { return clasp->isProxy(); }
 
 bool IsDerivedProxyObject(const JSObject* obj,
                           const js::BaseProxyHandler* handler);
 
 }  // namespace js
 
 template <>
 inline bool JSObject::is<js::ProxyObject>() const {
--- a/js/src/vm/Realm.h
+++ b/js/src/vm/Realm.h
@@ -82,17 +82,17 @@ class NewProxyCache {
   struct Entry {
     ObjectGroup* group;
     Shape* shape;
   };
   static const size_t NumEntries = 4;
   mozilla::UniquePtr<Entry[], JS::FreePolicy> entries_;
 
  public:
-  MOZ_ALWAYS_INLINE bool lookup(const Class* clasp, TaggedProto proto,
+  MOZ_ALWAYS_INLINE bool lookup(const JSClass* clasp, TaggedProto proto,
                                 ObjectGroup** group, Shape** shape) const {
     if (!entries_) {
       return false;
     }
     for (size_t i = 0; i < NumEntries; i++) {
       const Entry& entry = entries_[i];
       if (entry.group && entry.group->clasp() == clasp &&
           entry.group->proto() == proto) {
--- a/js/src/vm/ReceiverGuard-inl.h
+++ b/js/src/vm/ReceiverGuard-inl.h
@@ -23,17 +23,17 @@ ReceiverGuard::ReceiverGuard(JSObject* o
   MOZ_ASSERT(obj->is<TypedObject>());
   group_ = obj->group();
 }
 
 MOZ_ALWAYS_INLINE
 ReceiverGuard::ReceiverGuard(ObjectGroup* group, Shape* shape)
     : group_(group), shape_(shape) {
   if (group_) {
-    const Class* clasp = group_->clasp();
+    const JSClass* clasp = group_->clasp();
     if (IsTypedObjectClass(clasp)) {
       this->shape_ = nullptr;
     } else {
       this->group_ = nullptr;
     }
   }
   // Only one of group_ or shape_ may be active at a time.
   MOZ_ASSERT_IF(group_ || shape_, !!group_ != !!shape_);
--- a/js/src/vm/RegExpObject.cpp
+++ b/js/src/vm/RegExpObject.cpp
@@ -183,24 +183,24 @@ static const JSClassOps RegExpObjectClas
 static const ClassSpec RegExpObjectClassSpec = {
     GenericCreateConstructor<js::regexp_construct, 2, gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<RegExpObject>,
     nullptr,
     js::regexp_static_props,
     js::regexp_methods,
     js::regexp_properties};
 
-const Class RegExpObject::class_ = {
+const JSClass RegExpObject::class_ = {
     js_RegExp_str,
     JSCLASS_HAS_PRIVATE |
         JSCLASS_HAS_RESERVED_SLOTS(RegExpObject::RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_RegExp),
     &RegExpObjectClassOps, &RegExpObjectClassSpec};
 
-const Class RegExpObject::protoClass_ = {
+const JSClass RegExpObject::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_RegExp), JS_NULL_CLASS_OPS,
     &RegExpObjectClassSpec};
 
 template <typename CharT>
 RegExpObject* RegExpObject::create(JSContext* cx, const CharT* chars,
                                    size_t length, RegExpFlags flags,
                                    frontend::TokenStreamAnyChars& tokenStream,
                                    NewObjectKind newKind) {
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -57,18 +57,18 @@ class RegExpObject : public NativeObject
 
   static_assert(RegExpObject::FLAGS_SLOT == REGEXP_FLAGS_SLOT,
                 "FLAGS_SLOT values should be in sync with self-hosted JS");
 
  public:
   static const unsigned RESERVED_SLOTS = 3;
   static const unsigned PRIVATE_SLOT = 3;
 
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   // The maximum number of pairs a MatchResult can have, without having to
   // allocate a bigger MatchResult.
   static const size_t MaxPairCount = 14;
 
   template <typename CharT>
   static RegExpObject* create(JSContext* cx, const CharT* chars, size_t length,
                               JS::RegExpFlags flags, NewObjectKind newKind);
--- a/js/src/vm/RegExpStatics.cpp
+++ b/js/src/vm/RegExpStatics.cpp
@@ -10,19 +10,19 @@
 #include "vm/RegExpStaticsObject.h"
 
 #include "vm/NativeObject-inl.h"
 
 using namespace js;
 
 /*
  * RegExpStatics allocates memory -- in order to keep the statics stored
- * per-global and not leak, we create a js::Class to wrap the C++ instance and
+ * per-global and not leak, we create a JSClass to wrap the C++ instance and
  * provide an appropriate finalizer. We lazily create and store an instance of
- * that js::Class in a global reserved slot.
+ * that JSClass in a global reserved slot.
  */
 
 static void resc_finalize(JSFreeOp* fop, JSObject* obj) {
   MOZ_ASSERT(fop->onMainThread());
   RegExpStatics* res =
       static_cast<RegExpStatics*>(obj->as<RegExpStaticsObject>().getPrivate());
   fop->delete_(obj, res, MemoryUse::RegExpStatics);
 }
@@ -41,17 +41,17 @@ static const JSClassOps RegExpStaticsObj
     nullptr,                /* newEnumerate */
     nullptr,                /* resolve */
     nullptr,                /* mayResolve */
     resc_finalize, nullptr, /* call */
     nullptr,                /* hasInstance */
     nullptr,                /* construct */
     resc_trace};
 
-const Class RegExpStaticsObject::class_ = {
+const JSClass RegExpStaticsObject::class_ = {
     "RegExpStatics", JSCLASS_HAS_PRIVATE | JSCLASS_FOREGROUND_FINALIZE,
     &RegExpStaticsObjectClassOps};
 
 RegExpStaticsObject* RegExpStatics::create(JSContext* cx) {
   RegExpStaticsObject* obj =
       NewObjectWithGivenProto<RegExpStaticsObject>(cx, nullptr);
   if (!obj) {
     return nullptr;
--- a/js/src/vm/RegExpStaticsObject.h
+++ b/js/src/vm/RegExpStaticsObject.h
@@ -8,17 +8,17 @@
 #define vm_RegExpStaticsObject_h
 
 #include "vm/JSObject.h"
 
 namespace js {
 
 class RegExpStaticsObject : public NativeObject {
  public:
-  static const Class class_;
+  static const JSClass class_;
 
   size_t sizeOfData(mozilla::MallocSizeOf mallocSizeOf) {
     // XXX: should really call RegExpStatics::sizeOfIncludingThis() here
     // instead, but the extra memory it would measure is insignificant.
     return mallocSizeOf(getPrivate());
   }
 };
 
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -434,23 +434,21 @@ struct JSRuntime {
   js::MainThreadData<const JSWrapObjectCallbacks*> wrapObjectCallbacks;
   js::MainThreadData<js::PreserveWrapperCallback> preserveWrapperCallback;
 
   js::MainThreadData<js::ScriptEnvironmentPreparer*> scriptEnvironmentPreparer;
 
   js::MainThreadData<js::CTypesActivityCallback> ctypesActivityCallback;
 
  private:
-  js::WriteOnceData<const js::Class*> windowProxyClass_;
+  js::WriteOnceData<const JSClass*> windowProxyClass_;
 
  public:
-  const js::Class* maybeWindowProxyClass() const { return windowProxyClass_; }
-  void setWindowProxyClass(const js::Class* clasp) {
-    windowProxyClass_ = clasp;
-  }
+  const JSClass* maybeWindowProxyClass() const { return windowProxyClass_; }
+  void setWindowProxyClass(const JSClass* clasp) { windowProxyClass_ = clasp; }
 
  private:
   // List of non-ephemeron weak containers to sweep during
   // beginSweepingSweepGroup.
   js::MainThreadData<mozilla::LinkedList<JS::detail::WeakCacheBase>>
       weakCaches_;
 
  public:
--- a/js/src/vm/SavedFrame.h
+++ b/js/src/vm/SavedFrame.h
@@ -17,18 +17,18 @@ namespace js {
 
 class SavedFrame : public NativeObject {
   friend class SavedStacks;
   friend struct ::JSStructuredCloneReader;
 
   static const ClassSpec classSpec_;
 
  public:
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
   static const JSPropertySpec protoAccessors[];
   static const JSFunctionSpec protoFunctions[];
   static const JSFunctionSpec staticFunctions[];
 
   // Prototype methods and properties to be exposed to JS.
   static bool construct(JSContext* cx, unsigned argc, Value* vp);
   static bool sourceProperty(JSContext* cx, unsigned argc, Value* vp);
   static bool sourceIdProperty(JSContext* cx, unsigned argc, Value* vp);
--- a/js/src/vm/SavedStacks.cpp
+++ b/js/src/vm/SavedStacks.cpp
@@ -366,24 +366,24 @@ const ClassSpec SavedFrame::classSpec_ =
     GenericCreatePrototype<SavedFrame>,
     SavedFrame::staticFunctions,
     nullptr,
     SavedFrame::protoFunctions,
     SavedFrame::protoAccessors,
     SavedFrame::finishSavedFrameInit,
     ClassSpec::DontDefineConstructor};
 
-/* static */ const Class SavedFrame::class_ = {
+/* static */ const JSClass SavedFrame::class_ = {
     "SavedFrame",
     JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(SavedFrame::JSSLOT_COUNT) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_SavedFrame) |
         JSCLASS_FOREGROUND_FINALIZE,
     &SavedFrameClassOps, &SavedFrame::classSpec_};
 
-const Class SavedFrame::protoClass_ = {
+const JSClass SavedFrame::protoClass_ = {
     js_Object_str, JSCLASS_HAS_CACHED_PROTO(JSProto_SavedFrame),
     JS_NULL_CLASS_OPS, &SavedFrame::classSpec_};
 
 /* static */ const JSFunctionSpec SavedFrame::staticFunctions[] = {JS_FS_END};
 
 /* static */ const JSFunctionSpec SavedFrame::protoFunctions[] = {
     JS_FN("constructor", SavedFrame::construct, 0, 0),
     JS_FN("toString", SavedFrame::toStringMethod, 0, 0), JS_FS_END};
--- a/js/src/vm/Scope.cpp
+++ b/js/src/vm/Scope.cpp
@@ -78,17 +78,17 @@ const char* js::ScopeKindString(ScopeKin
     case ScopeKind::WasmInstance:
       return "wasm instance";
     case ScopeKind::WasmFunction:
       return "wasm function";
   }
   MOZ_CRASH("Bad ScopeKind");
 }
 
-static Shape* EmptyEnvironmentShape(JSContext* cx, const Class* cls,
+static Shape* EmptyEnvironmentShape(JSContext* cx, const JSClass* cls,
                                     uint32_t numSlots,
                                     uint32_t baseShapeFlags) {
   // Put as many slots into the object header as possible.
   uint32_t numFixed = gc::GetGCKindSlots(gc::GetGCObjectKind(numSlots));
   return EmptyShape::getInitialShape(cx, cls, TaggedProto(nullptr), numFixed,
                                      baseShapeFlags);
 }
 
@@ -112,17 +112,17 @@ static Shape* NextEnvironmentShape(JSCon
   }
 
   jsid id = NameToId(name->asPropertyName());
   Rooted<StackShape> child(cx, StackShape(base, id, slot, attrs));
   return cx->zone()->propertyTree().getChild(cx, shape, child);
 }
 
 static Shape* CreateEnvironmentShape(JSContext* cx, BindingIter& bi,
-                                     const Class* cls, uint32_t numSlots,
+                                     const JSClass* cls, uint32_t numSlots,
                                      uint32_t baseShapeFlags) {
   RootedShape shape(cx,
                     EmptyEnvironmentShape(cx, cls, numSlots, baseShapeFlags));
   if (!shape) {
     return nullptr;
   }
 
   RootedAtom name(cx);
@@ -172,17 +172,17 @@ static UniquePtr<typename ConcreteScope:
   std::uninitialized_copy_n(names, length, dataCopy->trailingNames.start());
 
   return UniquePtr<typename ConcreteScope::Data>(dataCopy);
 }
 
 template <typename ConcreteScope>
 static bool PrepareScopeData(
     JSContext* cx, BindingIter& bi,
-    Handle<UniquePtr<typename ConcreteScope::Data>> data, const Class* cls,
+    Handle<UniquePtr<typename ConcreteScope::Data>> data, const JSClass* cls,
     uint32_t baseShapeFlags, MutableHandleShape envShape) {
   // Copy a fresh BindingIter for use below.
   BindingIter freshBi(bi);
 
   // Iterate through all bindings. This counts the number of environment
   // slots needed and computes the maximum frame slot.
   while (bi) {
     bi++;
@@ -589,17 +589,17 @@ LexicalScope* LexicalScope::createWithDa
   }
 
   MOZ_ASSERT(scope->firstFrameSlot() == firstFrameSlot);
   return scope;
 }
 
 /* static */
 Shape* LexicalScope::getEmptyExtensibleEnvironmentShape(JSContext* cx) {
-  const Class* cls = &LexicalEnvironmentObject::class_;
+  const JSClass* cls = &LexicalEnvironmentObject::class_;
   return EmptyEnvironmentShape(cx, cls, JSSLOT_FREE(cls), BaseShape::DELEGATE);
 }
 
 template <XDRMode mode>
 /* static */
 XDRResult LexicalScope::XDR(XDRState<mode>* xdr, ScopeKind kind,
                             HandleScope enclosing, MutableHandleScope scope) {
   JSContext* cx = xdr->cx();
@@ -729,17 +729,17 @@ JSScript* FunctionScope::script() const 
 bool FunctionScope::isSpecialName(JSContext* cx, JSAtom* name) {
   return name == cx->names().arguments || name == cx->names().dotThis ||
          name == cx->names().dotGenerator;
 }
 
 /* static */
 Shape* FunctionScope::getEmptyEnvironmentShape(JSContext* cx,
                                                bool hasParameterExprs) {
-  const Class* cls = &CallObject::class_;
+  const JSClass* cls = &CallObject::class_;
   uint32_t shapeFlags = FunctionScopeEnvShapeFlags(hasParameterExprs);
   return EmptyEnvironmentShape(cx, cls, JSSLOT_FREE(cls), shapeFlags);
 }
 
 /* static */
 FunctionScope* FunctionScope::clone(JSContext* cx, Handle<FunctionScope*> scope,
                                     HandleFunction fun, HandleScope enclosing) {
   MOZ_ASSERT(fun != scope->canonicalFunction());
@@ -893,17 +893,17 @@ VarScope* VarScope::createWithData(JSCon
     }
   }
 
   return Scope::create<VarScope>(cx, kind, enclosing, envShape, data);
 }
 
 /* static */
 Shape* VarScope::getEmptyEnvironmentShape(JSContext* cx) {
-  const Class* cls = &VarEnvironmentObject::class_;
+  const JSClass* cls = &VarEnvironmentObject::class_;
   return EmptyEnvironmentShape(cx, cls, JSSLOT_FREE(cls),
                                VarScopeEnvShapeFlags);
 }
 
 uint32_t VarScope::firstFrameSlot() const {
   if (enclosing()->is<FunctionScope>()) {
     return enclosing()->as<FunctionScope>().nextFrameSlot();
   }
@@ -1149,17 +1149,17 @@ Scope* EvalScope::nearestVarScopeForDire
         break;
     }
   }
   return nullptr;
 }
 
 /* static */
 Shape* EvalScope::getEmptyEnvironmentShape(JSContext* cx) {
-  const Class* cls = &VarEnvironmentObject::class_;
+  const JSClass* cls = &VarEnvironmentObject::class_;
   return EmptyEnvironmentShape(cx, cls, JSSLOT_FREE(cls),
                                EvalScopeEnvShapeFlags);
 }
 
 template <XDRMode mode>
 /* static */
 XDRResult EvalScope::XDR(XDRState<mode>* xdr, ScopeKind kind,
                          HandleScope enclosing, MutableHandleScope scope) {
@@ -1255,17 +1255,17 @@ ModuleScope* ModuleScope::createWithData
   data->module.init(module);
 
   return Scope::create<ModuleScope>(cx, ScopeKind::Module, enclosing, envShape,
                                     data);
 }
 
 /* static */
 Shape* ModuleScope::getEmptyEnvironmentShape(JSContext* cx) {
-  const Class* cls = &ModuleEnvironmentObject::class_;
+  const JSClass* cls = &ModuleEnvironmentObject::class_;
   return EmptyEnvironmentShape(cx, cls, JSSLOT_FREE(cls),
                                ModuleScopeEnvShapeFlags);
 }
 
 static const uint32_t WasmInstanceEnvShapeFlags =
     BaseShape::NOT_EXTENSIBLE | BaseShape::DELEGATE;
 
 template <size_t ArrayLength>
@@ -1344,17 +1344,17 @@ WasmInstanceScope* WasmInstanceScope::cr
 
   return Scope::create<WasmInstanceScope>(cx, ScopeKind::WasmInstance,
                                           enclosingScope,
                                           /* envShape = */ nullptr, &data);
 }
 
 /* static */
 Shape* WasmInstanceScope::getEmptyEnvironmentShape(JSContext* cx) {
-  const Class* cls = &WasmInstanceEnvironmentObject::class_;
+  const JSClass* cls = &WasmInstanceEnvironmentObject::class_;
   return EmptyEnvironmentShape(cx, cls, JSSLOT_FREE(cls),
                                WasmInstanceEnvShapeFlags);
 }
 
 // TODO Check what Debugger behavior should be when it evaluates a
 // var declaration.
 static const uint32_t WasmFunctionEnvShapeFlags =
     BaseShape::NOT_EXTENSIBLE | BaseShape::DELEGATE;
@@ -1399,17 +1399,17 @@ WasmFunctionScope* WasmFunctionScope::cr
 
   return Scope::create<WasmFunctionScope>(cx, ScopeKind::WasmFunction,
                                           enclosing,
                                           /* envShape = */ nullptr, &data);
 }
 
 /* static */
 Shape* WasmFunctionScope::getEmptyEnvironmentShape(JSContext* cx) {
-  const Class* cls = &WasmFunctionCallObject::class_;
+  const JSClass* cls = &WasmFunctionCallObject::class_;
   return EmptyEnvironmentShape(cx, cls, JSSLOT_FREE(cls),
                                WasmFunctionEnvShapeFlags);
 }
 
 ScopeIter::ScopeIter(JSScript* script) : scope_(script->bodyScope()) {}
 
 bool ScopeIter::hasSyntacticEnvironment() const {
   return scope()->hasEnvironment() &&
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -2646,18 +2646,18 @@ GlobalObject* JSRuntime::createSelfHosti
                                          nullptr,
                                          nullptr,
                                          nullptr,
                                          nullptr,
                                          nullptr,
                                          nullptr,
                                          JS_GlobalObjectTraceHook};
 
-  static const Class shgClass = {"self-hosting-global", JSCLASS_GLOBAL_FLAGS,
-                                 &shgClassOps};
+  static const JSClass shgClass = {"self-hosting-global", JSCLASS_GLOBAL_FLAGS,
+                                   &shgClassOps};
 
   AutoRealmUnchecked ar(cx, realm);
   Rooted<GlobalObject*> shg(cx, GlobalObject::createInternal(cx, &shgClass));
   if (!shg) {
     return nullptr;
   }
 
   cx->runtime()->selfHostingGlobal_ = shg;
--- a/js/src/vm/Shape-inl.h
+++ b/js/src/vm/Shape-inl.h
@@ -26,17 +26,18 @@ inline AutoKeepShapeCaches::AutoKeepShap
     : cx_(cx), prev_(cx->zone()->keepShapeCaches()) {
   cx->zone()->setKeepShapeCaches(true);
 }
 
 inline AutoKeepShapeCaches::~AutoKeepShapeCaches() {
   cx_->zone()->setKeepShapeCaches(prev_);
 }
 
-inline StackBaseShape::StackBaseShape(const Class* clasp, uint32_t objectFlags)
+inline StackBaseShape::StackBaseShape(const JSClass* clasp,
+                                      uint32_t objectFlags)
     : flags(objectFlags), clasp(clasp) {}
 
 MOZ_ALWAYS_INLINE Shape* Shape::search(JSContext* cx, jsid id) {
   return search(cx, this, id);
 }
 
 MOZ_ALWAYS_INLINE bool Shape::maybeCreateCacheForLookup(JSContext* cx) {
   if (hasTable() || hasIC()) {
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -2148,17 +2148,17 @@ void Shape::dumpSubtree(int level, js::G
       }
     }
   }
 }
 
 #endif
 
 /* static */
-Shape* EmptyShape::getInitialShape(JSContext* cx, const Class* clasp,
+Shape* EmptyShape::getInitialShape(JSContext* cx, const JSClass* clasp,
                                    TaggedProto proto, size_t nfixed,
                                    uint32_t objectFlags) {
   MOZ_ASSERT_IF(proto.isObject(),
                 cx->isInsideCurrentCompartment(proto.toObject()));
 
   auto& table = cx->zone()->initialShapes();
 
   using Lookup = InitialShapeEntry::Lookup;
@@ -2185,26 +2185,26 @@ Shape* EmptyShape::getInitialShape(JSCon
                         InitialShapeEntry(shape, protoRoot))) {
     return nullptr;
   }
 
   return shape;
 }
 
 /* static */
-Shape* EmptyShape::getInitialShape(JSContext* cx, const Class* clasp,
+Shape* EmptyShape::getInitialShape(JSContext* cx, const JSClass* clasp,
                                    TaggedProto proto, gc::AllocKind kind,
                                    uint32_t objectFlags) {
   return getInitialShape(cx, clasp, proto, GetGCKindSlots(kind, clasp),
                          objectFlags);
 }
 
 void NewObjectCache::invalidateEntriesForShape(JSContext* cx, HandleShape shape,
                                                HandleObject proto) {
-  const Class* clasp = shape->getObjectClass();
+  const JSClass* clasp = shape->getObjectClass();
 
   gc::AllocKind kind = gc::GetGCObjectKind(shape->numFixedSlots());
   if (CanBeFinalizedInBackground(kind, clasp)) {
     kind = GetBackgroundAllocKind(kind);
   }
 
   RootedObjectGroup group(
       cx, ObjectGroup::defaultNewGroup(cx, clasp, TaggedProto(proto)));
--- a/js/src/vm/Shape.h
+++ b/js/src/vm/Shape.h
@@ -105,17 +105,17 @@
  * For getters/setters, an AccessorShape is allocated. This is a slightly fatter
  * type with extra fields for the getter/setter data.
  *
  * Because many Shapes have similar data, there is actually a secondary type
  * called a BaseShape that holds some of a Shape's data.  Many shapes can share
  * a single BaseShape.
  */
 
-MOZ_ALWAYS_INLINE size_t JSSLOT_FREE(const js::Class* clasp) {
+MOZ_ALWAYS_INLINE size_t JSSLOT_FREE(const JSClass* clasp) {
   // Proxy classes have reserved slots, but proxies manage their own slot
   // layout.
   MOZ_ASSERT(!clasp->isProxy());
   return JSCLASS_RESERVED_SLOTS(clasp);
 }
 
 namespace js {
 
@@ -649,17 +649,17 @@ class BaseShape : public gc::TenuredCell
 
     // 0x4000 is unused.
     // 0x8000 is unused.
 
     OBJECT_FLAG_MASK = 0xfff8
   };
 
  private:
-  const Class* clasp_; /* Class of referring object. */
+  const JSClass* clasp_; /* Class of referring object. */
   uint32_t flags;      /* Vector of above flags. */
   uint32_t slotSpan_;  /* Object slot span for BaseShapes at
                         * dictionary last properties. */
 
   /* For owned BaseShapes, the canonical unowned BaseShape. */
   GCPtrUnownedBaseShape unowned_;
 
   /* For owned BaseShapes, the shape's shape table. */
@@ -671,17 +671,17 @@ class BaseShape : public gc::TenuredCell
  public:
   void finalize(JSFreeOp* fop);
 
   explicit inline BaseShape(const StackBaseShape& base);
 
   /* Not defined: BaseShapes must not be stack allocated. */
   ~BaseShape();
 
-  const Class* clasp() const { return clasp_; }
+  const JSClass* clasp() const { return clasp_; }
 
   bool isOwned() const { return !!(flags & OWNED_SHAPE); }
 
   static void copyFromUnowned(BaseShape& dest, UnownedBaseShape& src);
   inline void adoptUnowned(UnownedBaseShape* other);
 
   void setOwned(UnownedBaseShape* unowned) {
     flags |= OWNED_SHAPE;
@@ -807,27 +807,27 @@ UnownedBaseShape* BaseShape::toUnowned()
 UnownedBaseShape* BaseShape::baseUnowned() {
   MOZ_ASSERT(isOwned() && unowned_);
   return unowned_;
 }
 
 /* Entries for the per-zone baseShapes set of unowned base shapes. */
 struct StackBaseShape : public DefaultHasher<WeakHeapPtr<UnownedBaseShape*>> {
   uint32_t flags;
-  const Class* clasp;
+  const JSClass* clasp;
 
   explicit StackBaseShape(BaseShape* base)
       : flags(base->flags & BaseShape::OBJECT_FLAG_MASK), clasp(base->clasp_) {}
 
-  inline StackBaseShape(const Class* clasp, uint32_t objectFlags);
+  inline StackBaseShape(const JSClass* clasp, uint32_t objectFlags);
   explicit inline StackBaseShape(Shape* shape);
 
   struct Lookup {
     uint32_t flags;
-    const Class* clasp;
+    const JSClass* clasp;
 
     MOZ_IMPLICIT Lookup(const StackBaseShape& base)
         : flags(base.flags), clasp(base.clasp) {}
 
     MOZ_IMPLICIT Lookup(UnownedBaseShape* base)
         : flags(base->getObjectFlags()), clasp(base->clasp()) {
       MOZ_ASSERT(!base->isOwned());
     }
@@ -1105,17 +1105,17 @@ class Shape : public gc::TenuredCell {
     }
 
     void popFront() {
       MOZ_ASSERT(!empty());
       cursor = cursor->parent;
     }
   };
 
-  const Class* getObjectClass() const { return base()->clasp_; }
+  const JSClass* getObjectClass() const { return base()->clasp_; }
 
   static Shape* setObjectFlags(JSContext* cx, BaseShape::Flag flag,
                                TaggedProto proto, Shape* last);
 
   uint32_t getObjectFlags() const { return base()->getObjectFlags(); }
   bool hasAllObjectFlags(BaseShape::Flag flags) const {
     MOZ_ASSERT(flags);
     MOZ_ASSERT(!(flags & ~BaseShape::OBJECT_FLAG_MASK));
@@ -1227,17 +1227,17 @@ class Shape : public gc::TenuredCell {
   }
   uint32_t maybeSlot() const { return immutableFlags & SLOT_MASK; }
 
   bool isEmptyShape() const {
     MOZ_ASSERT_IF(JSID_IS_EMPTY(propid_), hasMissingSlot());
     return JSID_IS_EMPTY(propid_);
   }
 
-  uint32_t slotSpan(const Class* clasp) const {
+  uint32_t slotSpan(const JSClass* clasp) const {
     MOZ_ASSERT(!inDictionary());
     // Proxy classes have reserved slots, but proxies manage their own slot
     // layout. This means all non-native object shapes have nfixed == 0 and
     // slotSpan == 0.
     uint32_t free = clasp->isProxy() ? 0 : JSSLOT_FREE(clasp);
     return hasMissingSlot() ? free : Max(free, maybeSlot() + 1);
   }
 
@@ -1449,20 +1449,20 @@ struct EmptyShape : public js::Shape {
 
   static Shape* new_(JSContext* cx, Handle<UnownedBaseShape*> base,
                      uint32_t nfixed);
 
   /*
    * Lookup an initial shape matching the given parameters, creating an empty
    * shape if none was found.
    */
-  static Shape* getInitialShape(JSContext* cx, const Class* clasp,
+  static Shape* getInitialShape(JSContext* cx, const JSClass* clasp,
                                 TaggedProto proto, size_t nfixed,
                                 uint32_t objectFlags = 0);
-  static Shape* getInitialShape(JSContext* cx, const Class* clasp,
+  static Shape* getInitialShape(JSContext* cx, const JSClass* clasp,
                                 TaggedProto proto, gc::AllocKind kind,
                                 uint32_t objectFlags = 0);
 
   /*
    * Reinsert an alternate initial shape, to be returned by future
    * getInitialShape calls, until the new shape becomes unreachable in a GC
    * and the table entry is purged.
    */
@@ -1498,22 +1498,22 @@ struct InitialShapeEntry {
   /*
    * Matching prototype for the entry. The shape of an object determines its
    * prototype, but the prototype cannot be determined from the shape itself.
    */
   WeakHeapPtr<TaggedProto> proto;
 
   /* State used to determine a match on an initial shape. */
   struct Lookup {
-    const Class* clasp;
+    const JSClass* clasp;
     TaggedProto proto;
     uint32_t nfixed;
     uint32_t baseFlags;
 
-    Lookup(const Class* clasp, const TaggedProto& proto, uint32_t nfixed,
+    Lookup(const JSClass* clasp, const TaggedProto& proto, uint32_t nfixed,
            uint32_t baseFlags)
         : clasp(clasp), proto(proto), nfixed(nfixed), baseFlags(baseFlags) {}
 
     explicit Lookup(const InitialShapeEntry& entry)
         : proto(entry.proto.unbarrieredGet()) {
       const Shape* shape = entry.shape.unbarrieredGet();
       clasp = shape->getObjectClass();
       nfixed = shape->numFixedSlots();
--- a/js/src/vm/SharedArrayObject.cpp
+++ b/js/src/vm/SharedArrayObject.cpp
@@ -374,26 +374,26 @@ static const ClassSpec SharedArrayBuffer
     GenericCreateConstructor<SharedArrayBufferObject::class_constructor, 1,
                              gc::AllocKind::FUNCTION>,
     GenericCreatePrototype<SharedArrayBufferObject>,
     sharedarrray_functions,
     sharedarrray_properties,
     sharedarray_proto_functions,
     sharedarray_proto_properties};
 
-const Class SharedArrayBufferObject::class_ = {
+const JSClass SharedArrayBufferObject::class_ = {
     "SharedArrayBuffer",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(SharedArrayBufferObject::RESERVED_SLOTS) |
         JSCLASS_HAS_CACHED_PROTO(JSProto_SharedArrayBuffer) |
         JSCLASS_BACKGROUND_FINALIZE,
     &SharedArrayBufferObjectClassOps, &SharedArrayBufferObjectClassSpec,
     JS_NULL_CLASS_EXT};
 
-const Class SharedArrayBufferObject::protoClass_ = {
+const JSClass SharedArrayBufferObject::protoClass_ = {
     "SharedArrayBufferPrototype",
     JSCLASS_HAS_CACHED_PROTO(JSProto_SharedArrayBuffer), JS_NULL_CLASS_OPS,
     &SharedArrayBufferObjectClassSpec};
 
 bool js::IsSharedArrayBuffer(HandleValue v) {
   return v.isObject() && v.toObject().is<SharedArrayBufferObject>();
 }
 
--- a/js/src/vm/SharedArrayObject.h
+++ b/js/src/vm/SharedArrayObject.h
@@ -164,18 +164,18 @@ class SharedArrayBufferObject : public A
   // LENGTH_SLOT holds the length of the underlying buffer as it was when this
   // object was created.  For JS use cases this is the same length as the
   // buffer, but for Wasm the buffer can grow, and the buffer's length may be
   // greater than the object's length.
   static const uint8_t LENGTH_SLOT = 1;
 
   static const uint8_t RESERVED_SLOTS = 2;
 
-  static const Class class_;
-  static const Class protoClass_;
+  static const JSClass class_;
+  static const JSClass protoClass_;
 
   static bool byteLengthGetter(JSContext* cx, unsigned argc, Value* vp);
 
   static bool class_constructor(JSContext* cx, unsigned argc, Value* vp);
 
   // Create a SharedArrayBufferObject with a new SharedArrayRawBuffer.
   static SharedArrayBufferObject* New(JSContext* cx, uint32_t length,
                                       HandleObject proto = nullptr);
--- a/js/src/vm/StringObject.h
+++ b/js/src/vm/StringObject.h
@@ -18,17 +18,17 @@ JSObject* InitStringClass(JSContext* cx,
 
 class StringObject : public NativeObject {
   static const unsigned PRIMITIVE_VALUE_SLOT = 0;
   static const unsigned LENGTH_SLOT = 1;
 
  public:
   static const unsigned RESERVED_SLOTS = 2;
 
-  static const Class class_;
+  static const JSClass class_;
 
   /*
    * Creates a new String object boxing the given string.  The object's
    * [[Prototype]] is determined from context.
    */
   static inline StringObject* create(JSContext* cx, HandleString str,
                                      HandleObject proto = nullptr,
                                      NewObjectKind newKind = GenericObject);
--- a/js/src/vm/TypeInference-inl.h
+++ b/js/src/vm/TypeInference-inl.h
@@ -1162,17 +1162,17 @@ inline ObjectGroup* TypeSet::getGroupNoB
 }
 
 inline bool TypeSet::hasGroup(unsigned i) const { return getGroupNoBarrier(i); }
 
 inline bool TypeSet::hasSingleton(unsigned i) const {
   return getSingletonNoBarrier(i);
 }
 
-inline const Class* TypeSet::getObjectClass(unsigned i) const {
+inline const JSClass* TypeSet::getObjectClass(unsigned i) const {
   if (JSObject* object = getSingleton(i)) {
     return object->getClass();
   }
   if (ObjectGroup* group = getGroup(i)) {
     return group->clasp();
   }
   return nullptr;
 }
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -645,17 +645,17 @@ void TypeSet::addType(Type type, LifoAll
     // by IonMonkey.
     if (objectCount >= TYPE_FLAG_OBJECT_COUNT_LIMIT) {
       JS_STATIC_ASSERT(TYPE_FLAG_DOMOBJECT_COUNT_LIMIT >=
                        TYPE_FLAG_OBJECT_COUNT_LIMIT);
       // Examining the entire type set is only required when we first hit
       // the normal object limit.
       if (objectCount == TYPE_FLAG_OBJECT_COUNT_LIMIT) {
         for (unsigned i = 0; i < objectCount; i++) {
-          const Class* clasp = getObjectClass(i);
+          const JSClass* clasp = getObjectClass(i);
           if (clasp && !clasp->isDOMClass()) {
             goto unknownObject;
           }
         }
       }
 
       // Make sure the newly added object is also a DOM object.
       if (!key->clasp()->isDOMClass()) {
@@ -1314,17 +1314,17 @@ bool CompilerConstraintInstance<T>::gene
   return property.maybeTypes()->addConstraint(
       cx,
       cx->typeLifoAlloc().new_<TypeCompilerConstraint<T> >(recompileInfo, data),
       /* callExisting = */ false);
 }
 
 } /* anonymous namespace */
 
-const Class* TypeSet::ObjectKey::clasp() {
+const JSClass* TypeSet::ObjectKey::clasp() {
   return isGroup() ? group()->clasp() : singleton()->getClass();
 }
 
 TaggedProto TypeSet::ObjectKey::proto() {
   return isGroup() ? group()->proto() : singleton()->taggedProto();
 }
 
 TypeNewScript* TypeSet::ObjectKey::newScript() {
@@ -2338,27 +2338,27 @@ TemporaryTypeSet::DoubleConversion Tempo
     return AlwaysConvertToDoubles;
   }
   if (maybeConvert) {
     return MaybeConvertToDoubles;
   }
   return DontConvertToDoubles;
 }
 
-const Class* TemporaryTypeSet::getKnownClass(
+const JSClass* TemporaryTypeSet::getKnownClass(
     CompilerConstraintList* constraints) {
   if (unknownObject()) {
     return nullptr;
   }
 
-  const Class* clasp = nullptr;
+  const JSClass* clasp = nullptr;
   unsigned count = getObjectCount();
 
   for (unsigned i = 0; i < count; i++) {
-    const Class* nclasp = getObjectClass(i);
+    const JSClass* nclasp = getObjectClass(i);
     if (!nclasp) {
       continue;
     }
 
     if (getObject(i)->unknownProperties()) {
       return nullptr;
     }
 
@@ -2384,17 +2384,17 @@ Realm* TemporaryTypeSet::getKnownRealm(C
   if (unknownObject()) {
     return nullptr;
   }
 
   Realm* realm = nullptr;
   unsigned count = getObjectCount();
 
   for (unsigned i = 0; i < count; i++) {
-    const Class* clasp = getObjectClass(i);
+    const JSClass* clasp = getObjectClass(i);
     if (!clasp) {
       continue;
     }
 
     // If clasp->isProxy(), this might be a cross-compartment wrapper and
     // CCWs don't have a (single) realm, so we give up. If the object has
     // unknownProperties(), hasStableClassAndProto (called below) will
     // return |false| so fail now before attaching any constraints.
@@ -2430,30 +2430,30 @@ Realm* TemporaryTypeSet::getKnownRealm(C
 
 void TemporaryTypeSet::getTypedArraySharedness(
     CompilerConstraintList* constraints, TypedArraySharedness* sharedness) {
   // In the future this will inspect the object set.
   *sharedness = UnknownSharedness;
 }
 
 TemporaryTypeSet::ForAllResult TemporaryTypeSet::forAllClasses(
-    CompilerConstraintList* constraints, bool (*func)(const Class* clasp)) {
+    CompilerConstraintList* constraints, bool (*func)(const JSClass* clasp)) {
   if (unknownObject()) {
     return ForAllResult::MIXED;
   }
 
   unsigned count = getObjectCount();
   if (count == 0) {
     return ForAllResult::EMPTY;
   }
 
   bool true_results = false;
   bool false_results = false;
   for (unsigned i = 0; i < count; i++) {
-    const Class* clasp = getObjectClass(i);
+    const JSClass* clasp = getObjectClass(i);
     if (!clasp) {
       continue;
     }
     if (!getObject(i)->hasStableClassAndProto(constraints)) {
       return ForAllResult::MIXED;
     }
     if (func(clasp)) {
       true_results = true;
@@ -2470,17 +2470,17 @@ TemporaryTypeSet::ForAllResult Temporary
 
   MOZ_ASSERT(true_results != false_results);
 
   return true_results ? ForAllResult::ALL_TRUE : ForAllResult::ALL_FALSE;
 }
 
 Scalar::Type TemporaryTypeSet::getTypedArrayType(
     CompilerConstraintList* constraints, TypedArraySharedness* sharedness) {
-  const Class* clasp = getKnownClass(constraints);
+  const JSClass* clasp = getKnownClass(constraints);
 
   if (clasp && IsTypedArrayClass(clasp)) {
     if (sharedness) {
       getTypedArraySharedness(constraints, sharedness);
     }
     return GetTypedArrayClassType(clasp);
   }
   return Scalar::MaxTypedArrayViewType;
@@ -2492,17 +2492,17 @@ bool TemporaryTypeSet::isDOMClass(Compil
     return false;
   }
 
   *kind = DOMObjectKind::Unknown;
   bool isFirst = true;
 
   unsigned count = getObjectCount();
   for (unsigned i = 0; i < count; i++) {
-    const Class* clasp = getObjectClass(i);
+    const JSClass* clasp = getObjectClass(i);
     if (!clasp) {
       continue;
     }
     if (!clasp->isDOMClass() ||
         !getObject(i)->hasStableClassAndProto(constraints)) {
       return false;
     }
 
@@ -2527,17 +2527,17 @@ bool TemporaryTypeSet::maybeCallable(Com
   }
 
   if (unknownObject()) {
     return true;
   }
 
   unsigned count = getObjectCount();
   for (unsigned i = 0; i < count; i++) {
-    const Class* clasp = getObjectClass(i);
+    const JSClass* clasp = getObjectClass(i);
     if (!clasp) {
       continue;
     }
     if (clasp->isProxy() || clasp->nonProxyCallable()) {
       return true;
     }
     if (!getObject(i)->hasStableClassAndProto(constraints)) {
       return true;
@@ -2557,17 +2557,17 @@ bool TemporaryTypeSet::maybeEmulatesUnde
     return true;
   }
 
   unsigned count = getObjectCount();
   for (unsigned i = 0; i < count; i++) {
     // The object emulates undefined if clasp->emulatesUndefined() or if
     // it's a WrapperObject, see EmulatesUndefined. Since all wrappers are
     // proxies, we can just check for that.
-    const Class* clasp = getObjectClass(i);
+    const JSClass* clasp = getObjectClass(i);
     if (!clasp) {
       continue;
     }
     if (clasp->emulatesUndefined() || clasp->isProxy()) {
       return true;
     }
     if (!getObject(i)->hasStableClassAndProto(constraints)) {
       return true;
@@ -2641,17 +2641,17 @@ bool TemporaryTypeSet::propertyNeedsBarr
     if (property.needsBarrier(constraints)) {
       return true;
     }
   }
 
   return false;
 }
 
-bool js::ClassCanHaveExtraProperties(const Class* clasp) {
+bool js::ClassCanHaveExtraProperties(const JSClass* clasp) {
   return clasp->getResolve() || clasp->getOpsLookupProperty() ||
          clasp->getOpsGetProperty() || IsTypedArrayClass(clasp);
 }
 
 void TypeZone::processPendingRecompiles(JSFreeOp* fop,
                                         RecompileInfoVector& recompiles) {
   MOZ_ASSERT(!recompiles.empty());
 
--- a/js/src/vm/TypeInference.h
+++ b/js/src/vm/TypeInference.h
@@ -219,17 +219,17 @@ class TypeNewScriptInitializer {
 
   TypeNewScriptInitializer(Kind kind, uint32_t offset)
       : kind(kind), offset(offset) {}
 };
 
 /* Is this a reasonable PC to be doing inlining on? */
 inline bool isInlinableCall(jsbytecode* pc);
 
-bool ClassCanHaveExtraProperties(const Class* clasp);
+bool ClassCanHaveExtraProperties(const JSClass* clasp);
 
 class RecompileInfo {
   JSScript* script_;
   IonCompilationId id_;
 
  public:
   RecompileInfo(JSScript* script, IonCompilationId id)
       : script_(script), id_(id) {}
--- a/js/src/vm/TypeSet.h
+++ b/js/src/vm/TypeSet.h
@@ -285,17 +285,17 @@ class TypeSet {
     static constexpr uintptr_t TypeHashSetMarkBit = 1 << 1;
 
     inline ObjectGroup* group();
     inline JSObject* singleton();
 
     inline ObjectGroup* groupNoBarrier();
     inline JSObject* singletonNoBarrier();
 
-    const Class* clasp();
+    const JSClass* clasp();
     TaggedProto proto();
     TypeNewScript* newScript();
 
     bool unknownProperties();
     bool hasFlags(CompilerConstraintList* constraints, ObjectGroupFlags flags);
     bool hasStableClassAndProto(CompilerConstraintList* constraints);
     void watchStateChangeForTypedArrayData(CompilerConstraintList* constraints);
     HeapTypeSetKey property(jsid id);
@@ -478,17 +478,17 @@ class TypeSet {
    * instead:
    *  - MacroAssembler::getSingletonAndDelayBarrier()
    *  - MacroAssembler::getGroupAndDelayBarrier()
    */
   inline JSObject* getSingletonNoBarrier(unsigned i) const;
   inline ObjectGroup* getGroupNoBarrier(unsigned i) const;
 
   /* The Class of an object in this set. */
-  inline const Class* getObjectClass(unsigned i) const;
+  inline const JSClass* getObjectClass(unsigned i) const;
 
   bool canSetDefinite(unsigned slot) {
     // Note: the cast is required to work around an MSVC issue.
     return (slot + 1) <=
            (unsigned(TYPE_FLAG_DEFINITE_MASK) >> TYPE_FLAG_DEFINITE_SHIFT);
   }
   void setDefinite(unsigned slot) {
     MOZ_ASSERT(canSetDefinite(slot));
@@ -784,17 +784,17 @@ class TemporaryTypeSet : public TypeSet 
     return hasAnyFlag(TYPE_FLAG_ANYOBJECT) || baseObjectCount() > 0;
   }
 
   /* Whether the type set contains objects with any of a set of flags. */
   bool hasObjectFlags(CompilerConstraintList* constraints,
                       ObjectGroupFlags flags);
 
   /* Get the class shared by all objects in this set, or nullptr. */
-  const Class* getKnownClass(CompilerConstraintList* constraints);
+  const JSClass* getKnownClass(CompilerConstraintList* constraints);
 
   /*
    * Get the realm shared by all objects in this set, or nullptr. Returns
    * nullptr if the set contains proxies (because cross-compartment wrappers
    * don't have a single realm associated with them).
    */
   JS::Realm* getKnownRealm(CompilerConstraintList* constraints);
 
@@ -807,17 +807,17 @@ class TemporaryTypeSet : public TypeSet 
                 // and true for others, or set contains an unknown or non-object
                 // type
   };
 
   /* Apply func to the members of the set and return an appropriate result.
    * The iteration may end early if the result becomes known early.
    */
   ForAllResult forAllClasses(CompilerConstraintList* constraints,
-                             bool (*func)(const Class* clasp));
+                             bool (*func)(const JSClass* clasp));
 
   /*
    * Returns true if all objects in this set have the same prototype, and
    * assigns this object to *proto. The proto can be nullptr.
    */
   bool getCommonPrototype(CompilerConstraintList* constraints,
                           JSObject** proto);
 
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -335,17 +335,17 @@ class TypedArrayObjectTemplate : public 
   static JSObject* createPrototype(JSContext* cx, JSProtoKey key) {
     Handle<GlobalObject*> global = cx->global();
     RootedObject typedArrayProto(
         cx, GlobalObject::getOrCreateTypedArrayPrototype(cx, global));
     if (!typedArrayProto) {
       return nullptr;
     }
 
-    const Class* clasp = TypedArrayObject::protoClassForType(ArrayTypeID());
+    const JSClass* clasp = TypedArrayObject::protoClassForType(ArrayTypeID());
     return GlobalObject::createBlankPrototypeInheriting(cx, clasp,
                                                         typedArrayProto);
   }
 
   static JSObject* createConstructor(JSContext* cx, JSProtoKey key) {
     Handle<GlobalObject*> global = cx->global();
     RootedFunction ctorProto(
         cx, GlobalObject::getOrCreateTypedArrayConstructor(cx, global));
@@ -360,17 +360,17 @@ class TypedArrayObjectTemplate : public 
 
     if (fun) {
       fun->setJitInfo(&jit::JitInfo_TypedArrayConstructor);
     }
 
     return fun;
   }
 
-  static inline const Class* instanceClass() {
+  static inline const JSClass* instanceClass() {
     return TypedArrayObject::classForType(ArrayTypeID());
   }
 
   static bool is(HandleValue v) {
     return v.isObject() && v.toObject().hasClass(instanceClass());
   }
 
   static bool convertValue(JSContext* cx, HandleValue v, NativeType* result);
@@ -1919,17 +1919,17 @@ static const ClassSpec TypedArrayObjectS
     CreateSharedTypedArrayPrototype,
     TypedArrayObject::staticFunctions,
     TypedArrayObject::staticProperties,
     TypedArrayObject::protoFunctions,
     TypedArrayObject::protoAccessors,
     nullptr,
     ClassSpec::DontDefineConstructor};
 
-/* static */ const Class TypedArrayObject::sharedTypedArrayPrototypeClass = {
+/* static */ const JSClass TypedArrayObject::sharedTypedArrayPrototypeClass = {
     "TypedArrayPrototype", JSCLASS_HAS_CACHED_PROTO(JSProto_TypedArray),
     JS_NULL_CLASS_OPS, &TypedArrayObjectSharedTypedArrayPrototypeClassSpec};
 
 namespace {
 
 // This default implementation is only valid for integer types less
 // than 32-bits in size.
 template <typename NativeType>
@@ -2170,17 +2170,17 @@ static const ClassSpec
    static_prototype_properties[Scalar::Type::Name],   \
    nullptr,                                           \
    JSProto_TypedArray},
 
         JS_FOR_EACH_TYPED_ARRAY(IMPL_TYPED_ARRAY_CLASS_SPEC)
 #undef IMPL_TYPED_ARRAY_CLASS_SPEC
 };
 
-const Class TypedArrayObject::classes[Scalar::MaxTypedArrayViewType] = {
+const JSClass TypedArrayObject::classes[Scalar::MaxTypedArrayViewType] = {
 #define IMPL_TYPED_ARRAY_CLASS(NativeType, Name)                               \
   {#Name "Array",                                                              \
    JSCLASS_HAS_RESERVED_SLOTS(TypedArrayObject::RESERVED_SLOTS) |              \
        JSCLASS_HAS_PRIVATE | JSCLASS_HAS_CACHED_PROTO(JSProto_##Name##Array) | \
        JSCLASS_DELAY_METADATA_BUILDER | JSCLASS_SKIP_NURSERY_FINALIZE |        \
        JSCLASS_BACKGROUND_FINALIZE,                                            \
    &TypedArrayClassOps, &TypedArrayObjectClassSpecs[Scalar::Type::Name],       \
    &TypedArrayClassExtension},
@@ -2197,17 +2197,17 @@ const Class TypedArrayObject::classes[Sc
 // Thus we need one class with cached prototype per kind of typed array, with a
 // delegated ClassSpec.
 //
 // Actually ({}).toString.call(Uint8Array.prototype) should throw, because
 // Uint8Array.prototype lacks the the typed array internal slots.  (Same as
 // with %TypedArray%.prototype.)  It's not clear this is desirable (see
 // above), but it's what we've always done, so keep doing it till we
 // implement @@toStringTag or ES6 changes.
-const Class TypedArrayObject::protoClasses[Scalar::MaxTypedArrayViewType] = {
+const JSClass TypedArrayObject::protoClasses[Scalar::MaxTypedArrayViewType] = {
 #define IMPL_TYPED_ARRAY_PROTO_CLASS(NativeType, Name)                      \
   {#Name "ArrayPrototype", JSCLASS_HAS_CACHED_PROTO(JSProto_##Name##Array), \
    JS_NULL_CLASS_OPS, &TypedArrayObjectClassSpecs[Scalar::Type::Name]},
 
     JS_FOR_EACH_TYPED_ARRAY(IMPL_TYPED_ARRAY_PROTO_CLASS)
 #undef IMPL_TYPED_ARRAY_PROTO_CLASS
 };
 
@@ -2466,28 +2466,28 @@ struct ExternalTypeOf<uint8_clamped> {
         cx, arrayBuffer, byteOffset, length);                                \
   }                                                                          \
                                                                              \
   JS_FRIEND_API JSObject* js::Unwrap##Name##Array(JSObject* obj) {           \
     obj = obj->maybeUnwrapIf<TypedArrayObject>();                            \
     if (!obj) {                                                              \
       return nullptr;                                                        \
     }                                                                        \
-    const Class* clasp = obj->getClass();                                    \
+    const JSClass* clasp = obj->getClass();                                  \
     if (clasp != TypedArrayObjectTemplate<NativeType>::instanceClass()) {    \
       return nullptr;                                                        \
     }                                                                        \
     return obj;                                                              \
   }                                                                          \
                                                                              \
   JS_FRIEND_API bool JS_Is##Name##Array(JSObject* obj) {                     \
     return js::Unwrap##Name##Array(obj) != nullptr;                          \
   }                                                                          \
                                                                              \
-  const js::Class* const js::detail::Name##ArrayClassPtr =                   \
+  const JSClass* const js::detail::Name##ArrayClassPtr =                     \
       &js::TypedArrayObject::classes                                         \
           [TypedArrayObjectTemplate<NativeType>::ArrayTypeID()];             \
                                                                              \
   JS_FRIEND_API JSObject* JS_GetObjectAs##Name##Array(                       \
       JSObject* obj, uint32_t* length, bool* isShared,                       \
       ExternalTypeOf<NativeType>::Type** data) {                             \
     obj = js::Unwrap##Name##Array(obj);                                      \
     if (!obj) {                                                              \
--- a/js/src/vm/TypedArrayObject.h
+++ b/js/src/vm/TypedArrayObject.h
@@ -65,26 +65,26 @@ class TypedArrayObject : public ArrayBuf
     // Shared buffers.
     if (a->isSharedMemory() && b->isSharedMemory()) {
       return a->bufferShared()->globalID() == b->bufferShared()->globalID();
     }
 
     return a->bufferEither() == b->bufferEither();
   }
 
-  static const Class classes[Scalar::MaxTypedArrayViewType];
-  static const Class protoClasses[Scalar::MaxTypedArrayViewType];
-  static const Class sharedTypedArrayPrototypeClass;
+  static const JSClass classes[Scalar::MaxTypedArrayViewType];
+  static const JSClass protoClasses[Scalar::MaxTypedArrayViewType];
+  static const JSClass sharedTypedArrayPrototypeClass;
 
-  static const Class* classForType(Scalar::Type type) {
+  static const JSClass* classForType(Scalar::Type type) {
     MOZ_ASSERT(type < Scalar::MaxTypedArrayViewType);
     return &classes[type];
   }
 
-  static const Class* protoClassForType(Scalar::Type type) {
+  static const JSClass* protoClassForType(Scalar::Type type) {
     MOZ_ASSERT(type < Scalar::MaxTypedArrayViewType);
     return &protoClasses[type];
   }
 
   static constexpr size_t FIXED_DATA_START = DATA_SLOT + 1;
 
   // For typed arrays which can store their data inline, the array buffer
   // object is created lazily.
@@ -205,22 +205,22 @@ extern TypedArrayObject* NewTypedArrayWi
 
 extern TypedArrayObject* NewTypedArrayWithTemplateAndArray(
     JSContext* cx, HandleObject templateObj, HandleObject array);
 
 extern TypedArrayObject* NewTypedArrayWithTemplateAndBuffer(
     JSContext* cx, HandleObject templateObj, HandleObject arrayBuffer,
     HandleValue byteOffset, HandleValue length);
 
-inline bool IsTypedArrayClass(const Class* clasp) {
+inline bool IsTypedArrayClass(const JSClass* clasp) {
   return &TypedArrayObject::classes[0] <= clasp &&
          clasp < &TypedArrayObject::classes[Scalar::MaxTypedArrayViewType];
 }
 
-inline Scalar::Type GetTypedArrayClassType(const Class* clasp) {
+inline Scalar::Type GetTypedArrayClassType(const JSClass* clasp) {
   MOZ_ASSERT(IsTypedArrayClass(clasp));
   return static_cast<Scalar::Type>(clasp - &TypedArrayObject::classes[0]);
 }
 
 bool IsTypedArrayConstructor(const JSObject* obj);
 
 bool IsTypedArrayConstructor(HandleValue v, uint32_t type);
 
--- a/js/src/wasm/WasmJS.cpp
+++ b/js/src/wasm/WasmJS.cpp
@@ -660,17 +660,17 @@ static bool GetLimits(JSContext* cx, Han
 const JSClassOps WasmModuleObject::classOps_ = {nullptr, /* addProperty */
                                                 nullptr, /* delProperty */
                                                 nullptr, /* enumerate */
                                                 nullptr, /* newEnumerate */
                                                 nullptr, /* resolve */
                                                 nullptr, /* mayResolve */
                                                 WasmModuleObject::finalize};
 
-const Class WasmModuleObject::class_ = {
+const JSClass WasmModuleObject::class_ = {
     "WebAssembly.Module",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(WasmModuleObject::RESERVED_SLOTS) |
         JSCLASS_FOREGROUND_FINALIZE,
     &WasmModuleObject::classOps_,
 };
 
 const JSPropertySpec WasmModuleObject::properties[] = {JS_PS_END};
@@ -1183,17 +1183,17 @@ const JSClassOps WasmInstanceObject::cla
                                                   nullptr, /* resolve */
                                                   nullptr, /* mayResolve */
                                                   WasmInstanceObject::finalize,
                                                   nullptr, /* call */
                                                   nullptr, /* hasInstance */
                                                   nullptr, /* construct */
                                                   WasmInstanceObject::trace};
 
-const Class WasmInstanceObject::class_ = {
+const JSClass WasmInstanceObject::class_ = {
     "WebAssembly.Instance",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(WasmInstanceObject::RESERVED_SLOTS) |
         JSCLASS_FOREGROUND_FINALIZE,
     &WasmInstanceObject::classOps_,
 };
 
 static bool IsInstance(HandleValue v) {
@@ -1606,17 +1606,17 @@ uint32_t wasm::ExportedFunctionToFuncInd
 const JSClassOps WasmMemoryObject::classOps_ = {nullptr, /* addProperty */
                                                 nullptr, /* delProperty */
                                                 nullptr, /* enumerate */
                                                 nullptr, /* newEnumerate */
                                                 nullptr, /* resolve */
                                                 nullptr, /* mayResolve */
                                                 WasmMemoryObject::finalize};
 
-const Class WasmMemoryObject::class_ = {
+const JSClass WasmMemoryObject::class_ = {
     "WebAssembly.Memory",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(WasmMemoryObject::RESERVED_SLOTS) |
         JSCLASS_FOREGROUND_FINALIZE,
     &WasmMemoryObject::classOps_};
 
 /* static */
 void WasmMemoryObject::finalize(JSFreeOp* fop, JSObject* obj) {
@@ -1950,17 +1950,17 @@ const JSClassOps WasmTableObject::classO
                                                nullptr, /* resolve */
                                                nullptr, /* mayResolve */
                                                WasmTableObject::finalize,
                                                nullptr, /* call */
                                                nullptr, /* hasInstance */
                                                nullptr, /* construct */
                                                WasmTableObject::trace};
 
-const Class WasmTableObject::class_ = {
+const JSClass WasmTableObject::class_ = {
     "WebAssembly.Table",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(WasmTableObject::RESERVED_SLOTS) |
         JSCLASS_FOREGROUND_FINALIZE,
     &WasmTableObject::classOps_};
 
 bool WasmTableObject::isNewborn() const {
   MOZ_ASSERT(is<WasmTableObject>());
@@ -2325,17 +2325,17 @@ const JSClassOps WasmGlobalObject::class
                                                 nullptr, /* resolve */
                                                 nullptr, /* mayResolve */
                                                 WasmGlobalObject::finalize,
                                                 nullptr, /* call */
                                                 nullptr, /* hasInstance */
                                                 nullptr, /* construct */
                                                 WasmGlobalObject::trace};
 
-const Class WasmGlobalObject::class_ = {
+const JSClass WasmGlobalObject::class_ = {
     "WebAssembly.Global",
     JSCLASS_HAS_RESERVED_SLOTS(WasmGlobalObject::RESERVED_SLOTS) |
         JSCLASS_BACKGROUND_FINALIZE,
     &WasmGlobalObject::classOps_};
 
 /* static */
 void WasmGlobalObject::trace(JSTracer* trc, JSObject* obj) {
   WasmGlobalObject* global = reinterpret_cast<WasmGlobalObject*>(obj);
@@ -3427,17 +3427,17 @@ class ResolveResponseClosure : public Na
   static void finalize(JSFreeOp* fop, JSObject* obj) {
     auto& closure = obj->as<ResolveResponseClosure>();
     fop->release(obj, &closure.compileArgs(),
                  MemoryUse::WasmResolveResponseClosure);
   }
 
  public:
   static const unsigned RESERVED_SLOTS = 4;
-  static const Class class_;
+  static const JSClass class_;
 
   static ResolveResponseClosure* create(JSContext* cx, const CompileArgs& args,
                                         HandleObject promise, bool instantiate,
                                         HandleObject importObj) {
     MOZ_ASSERT_IF(importObj, instantiate);
 
     AutoSetNewObjectMetadata metadata(cx);
     auto* obj = NewObjectWithGivenProto<ResolveResponseClosure>(cx, nullptr);
@@ -3472,17 +3472,17 @@ const JSClassOps ResolveResponseClosure:
     nullptr, /* addProperty */
     nullptr, /* delProperty */
     nullptr, /* enumerate */
     nullptr, /* newEnumerate */
     nullptr, /* resolve */
     nullptr, /* mayResolve */
     ResolveResponseClosure::finalize};
 
-const Class ResolveResponseClosure::class_ = {
+const JSClass ResolveResponseClosure::class_ = {
     "WebAssembly ResolveResponseClosure",
     JSCLASS_DELAY_METADATA_BUILDER |
         JSCLASS_HAS_RESERVED_SLOTS(ResolveResponseClosure::RESERVED_SLOTS) |
         JSCLASS_FOREGROUND_FINALIZE,
     &ResolveResponseClosure::classOps_,
 };
 
 static ResolveResponseClosure* ToResolveResponseClosure(CallArgs args) {
@@ -3652,17 +3652,17 @@ static const JSFunctionSpec WebAssembly_
     JS_FN("instantiate", WebAssembly_instantiate, 1, JSPROP_ENUMERATE),
     JS_FN("validate", WebAssembly_validate, 1, JSPROP_ENUMERATE),
     JS_FN("compileStreaming", WebAssembly_compileStreaming, 1,
           JSPROP_ENUMERATE),
     JS_FN("instantiateStreaming", WebAssembly_instantiateStreaming, 1,
           JSPROP_ENUMERATE),
     JS_FS_END};
 
-const Class js::WebAssemblyClass = {
+const JSClass js::WebAssemblyClass = {
     js_WebAssembly_str, JSCLASS_HAS_CACHED_PROTO(JSProto_WebAssembly)};
 
 template <class Class>
 static bool InitConstructor(JSContext* cx, HandleObject wasm, const char* name,
                             MutableHandleObject proto) {
   proto.set(NewBuiltinClassInstance<PlainObject>(cx, SingletonObject));
   if (!proto) {
     return false;
--- a/js/src/wasm/WasmJS.h
+++ b/js/src/wasm/WasmJS.h
@@ -111,17 +111,17 @@ WasmInstanceObject* ExportedFunctionToIn
 uint32_t ExportedFunctionToFuncIndex(JSFunction* fun);
 
 bool IsSharedWasmMemoryObject(JSObject* obj);
 
 }  // namespace wasm
 
 // The class of the WebAssembly global namespace object.
 
-extern const Class WebAssemblyClass;
+extern const JSClass WebAssemblyClass;
 
 JSObject* InitWebAssemblyClass(JSContext* cx, Handle<GlobalObject*> global);
 
 // The class of WebAssembly.Module. Each WasmModuleObject owns a
 // wasm::Module. These objects are used both as content-facing JS objects and as
 // internal implementation details of asm.js.
 
 class WasmModuleObject : public NativeObject {
@@ -129,17 +129,17 @@ class WasmModuleObject : public NativeOb
   static const JSClassOps classOps_;
   static void finalize(JSFreeOp* fop, JSObject* obj);
   static bool imports(JSContext* cx, unsigned argc, Value* vp);
   static bool exports(JSContext* cx, unsigned argc, Value* vp);
   static bool customSections(JSContext* cx, unsigned argc, Value* vp);
 
  public:
   static const unsigned RESERVED_SLOTS = 1;
-  static const Class class_;
+  static const JSClass class_;
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
   static const JSFunctionSpec static_methods[];
   static bool construct(JSContext*, unsigned, Value*);
 
   static WasmModuleObject* create(JSContext* cx, const wasm::Module& module,
                                   HandleObject proto = nullptr);
   const wasm::Module& module() const;
@@ -179,17 +179,17 @@ class WasmGlobalObject : public NativeOb
     float f32;
     double f64;
     wasm::AnyRef ref;
     Cell() : i64(0) {}
     ~Cell() {}
   };
 
   static const unsigned RESERVED_SLOTS = 3;
-  static const Class class_;
+  static const JSClass class_;
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
   static const JSFunctionSpec static_methods[];
   static bool construct(JSContext*, unsigned, Value*);
 
   static WasmGlobalObject* create(JSContext* cx, wasm::HandleVal value,
                                   bool isMutable);
   bool isNewborn() { return getReservedSlot(CELL_SLOT).isUndefined(); }
@@ -234,17 +234,17 @@ class WasmInstanceObject : public Native
   // during debugging.
   using ScopeMap =
       JS::WeakCache<GCHashMap<uint32_t, WeakHeapPtr<WasmFunctionScope*>,
                               DefaultHasher<uint32_t>, ZoneAllocPolicy>>;
   ScopeMap& scopes() const;
 
  public:
   static const unsigned RESERVED_SLOTS = 6;
-  static const Class class_;
+  static const JSClass class_;
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
   static const JSFunctionSpec static_methods[];
   static bool construct(JSContext*, unsigned, Value*);
 
   static WasmInstanceObject* create(
       JSContext* cx, RefPtr<const wasm::Code> code,
       const wasm::DataSegmentVector& dataSegments,
@@ -299,17 +299,17 @@ class WasmMemoryObject : public NativeOb
                               MovableCellHasher<WeakHeapPtrWasmInstanceObject>,
                               ZoneAllocPolicy>>;
   bool hasObservers() const;
   InstanceSet& observers() const;
   InstanceSet* getOrCreateObservers(JSContext* cx);
 
  public:
   static const unsigned RESERVED_SLOTS = 2;
-  static const Class class_;
+  static const JSClass class_;
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
   static const JSFunctionSpec static_methods[];
   static bool construct(JSContext*, unsigned, Value*);
 
   static WasmMemoryObject* create(JSContext* cx,
                                   Handle<ArrayBufferObjectMaybeShared*> buffer,
                                   HandleObject proto);
@@ -355,17 +355,17 @@ class WasmTableObject : public NativeObj
   static bool get(JSContext* cx, unsigned argc, Value* vp);
   static bool setImpl(JSContext* cx, const CallArgs& args);
   static bool set(JSContext* cx, unsigned argc, Value* vp);
   static bool growImpl(JSContext* cx, const CallArgs& args);
   static bool grow(JSContext* cx, unsigned argc, Value* vp);
 
  public:
   static const unsigned RESERVED_SLOTS = 1;
-  static const Class class_;
+  static const JSClass class_;
   static const JSPropertySpec properties[];
   static const JSFunctionSpec methods[];
   static const JSFunctionSpec static_methods[];
   static bool construct(JSContext*, unsigned, Value*);
 
   // Note that, after creation, a WasmTableObject's table() is not initialized
   // and must be initialized before use.
 
--- a/js/src/wasm/WasmTypes.cpp
+++ b/js/src/wasm/WasmTypes.cpp
@@ -104,24 +104,24 @@ void AnyRef::trace(JSTracer* trc) {
   }
 }
 
 class WasmValueBox : public NativeObject {
   static const unsigned VALUE_SLOT = 0;
 
  public:
   static const unsigned RESERVED_SLOTS = 1;
-  static const Class class_;
+  static const JSClass class_;
 
   static WasmValueBox* create(JSContext* cx, HandleValue val);
   Value value() const { return getFixedSlot(VALUE_SLOT); }
 };
 
-const Class WasmValueBox::class_ = {"WasmValueBox",
-                                    JSCLASS_HAS_RESERVE