Bug 1573508 - Replace external references to js::ClassOps with JSClassOps r=mccr8
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 14 Aug 2019 09:45:31 +0000
changeset 487873 3c98bbcd1d700ec681347758b4ee32007477282a
parent 487872 7d82341d122dce7610e8e550f43380e773550f9e
child 487874 6e20195a06ad413429983196cc240506a4a12175
push id36433
push userbtara@mozilla.com
push dateWed, 14 Aug 2019 21:57:52 +0000
treeherdermozilla-central@7d9a2196d313 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1573508
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 1573508 - Replace external references to js::ClassOps with JSClassOps r=mccr8 Depends on D41759 Differential Revision: https://phabricator.services.mozilla.com/D41760
dom/bindings/BindingUtils.cpp
dom/bindings/BindingUtils.h
dom/bindings/Codegen.py
dom/bindings/SimpleGlobalObject.cpp
js/xpconnect/public/xpc_map_end.h
js/xpconnect/src/Sandbox.cpp
js/xpconnect/src/XPCWrappedNativeJSOps.cpp
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -2041,17 +2041,17 @@ DEFINE_XRAY_EXPANDO_CLASS(, DefaultXrayE
 NativePropertyHooks sEmptyNativePropertyHooks = {nullptr,
                                                  nullptr,
                                                  nullptr,
                                                  {nullptr, nullptr},
                                                  prototypes::id::_ID_Count,
                                                  constructors::id::_ID_Count,
                                                  nullptr};
 
-const js::ClassOps sBoringInterfaceObjectClassClassOps = {
+const JSClassOps sBoringInterfaceObjectClassClassOps = {
     nullptr,             /* addProperty */
     nullptr,             /* delProperty */
     nullptr,             /* enumerate */
     nullptr,             /* newEnumerate */
     nullptr,             /* resolve */
     nullptr,             /* mayResolve */
     nullptr,             /* finalize */
     ThrowingConstructor, /* call */
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -2338,17 +2338,17 @@ inline JSObject* GetCachedSlotStorageObj
     return obj;
   }
 
   return GetCachedSlotStorageObjectSlow(cx, obj, isXray);
 }
 
 extern NativePropertyHooks sEmptyNativePropertyHooks;
 
-extern const js::ClassOps sBoringInterfaceObjectClassClassOps;
+extern const JSClassOps sBoringInterfaceObjectClassClassOps;
 
 extern const js::ObjectOps sInterfaceObjectClassObjectOps;
 
 inline bool UseDOMXray(JSObject* obj) {
   const js::Class* clasp = js::GetObjectClass(obj);
   return IsDOMClass(clasp) || JS_IsNativeFunction(obj, Constructor) ||
          IsDOMIfaceAndProtoClass(clasp);
 }
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -504,17 +504,17 @@ class CGDOMJSClass(CGThing):
             newEnumerateHook = "mozilla::dom::EnumerateGlobal"
         else:
             resolveHook = "nullptr"
             mayResolveHook = "nullptr"
             newEnumerateHook = "nullptr"
 
         return fill(
             """
-            static const js::ClassOps sClassOps = {
+            static const JSClassOps sClassOps = {
               ${addProperty}, /* addProperty */
               nullptr,               /* delProperty */
               nullptr,               /* enumerate */
               ${newEnumerate}, /* newEnumerate */
               ${resolve}, /* resolve */
               ${mayResolve}, /* mayResolve */
               ${finalize}, /* finalize */
               ${call}, /* call */
@@ -776,17 +776,17 @@ class CGInterfaceObjectJSClass(CGThing):
             ret = ""
             classOpsPtr = "&sBoringInterfaceObjectClassClassOps"
         elif ctorname == "nullptr":
             ret = ""
             classOpsPtr = "JS_NULL_CLASS_OPS"
         else:
             ret = fill(
                 """
-                static const js::ClassOps sInterfaceObjectClassOps = {
+                static const JSClassOps sInterfaceObjectClassOps = {
                     nullptr,               /* addProperty */
                     nullptr,               /* delProperty */
                     nullptr,               /* enumerate */
                     nullptr,               /* newEnumerate */
                     nullptr,               /* resolve */
                     nullptr,               /* mayResolve */
                     nullptr,               /* finalize */
                     ${ctorname}, /* call */
--- a/dom/bindings/SimpleGlobalObject.cpp
+++ b/dom/bindings/SimpleGlobalObject.cpp
@@ -54,17 +54,17 @@ static size_t SimpleGlobal_moved(JSObjec
   SimpleGlobalObject* globalObject =
       static_cast<SimpleGlobalObject*>(JS_GetPrivate(obj));
   if (globalObject) {
     globalObject->UpdateWrapper(obj, old);
   }
   return 0;
 }
 
-static const js::ClassOps SimpleGlobalClassOps = {
+static const JSClassOps SimpleGlobalClassOps = {
     nullptr,
     nullptr,
     nullptr,
     JS_NewEnumerateStandardClasses,
     JS_ResolveStandardClass,
     JS_MayResolveStandardClass,
     SimpleGlobal_finalize,
     nullptr,
--- a/js/xpconnect/public/xpc_map_end.h
+++ b/js/xpconnect/public/xpc_map_end.h
@@ -30,17 +30,17 @@ NS_IMETHODIMP XPC_MAP_CLASSNAME::GetClas
 
 /**************************************************************/
 
 // virtual
 uint32_t XPC_MAP_CLASSNAME::GetScriptableFlags() { return (XPC_MAP_FLAGS); }
 
 // virtual
 const js::Class* XPC_MAP_CLASSNAME::GetClass() {
-  static const js::ClassOps classOps = XPC_MAKE_CLASS_OPS(GetScriptableFlags());
+  static const JSClassOps classOps = XPC_MAKE_CLASS_OPS(GetScriptableFlags());
   static const js::Class klass =
       XPC_MAKE_CLASS(XPC_MAP_QUOTED_CLASSNAME, GetScriptableFlags(), &classOps);
   return &klass;
 }
 
 // virtual
 const JSClass* XPC_MAP_CLASSNAME::GetJSClass() { return Jsvalify(GetClass()); }
 
--- a/js/xpconnect/src/Sandbox.cpp
+++ b/js/xpconnect/src/Sandbox.cpp
@@ -435,17 +435,17 @@ static size_t sandbox_moved(JSObject* ob
   }
 
   return static_cast<SandboxPrivate*>(sop)->ObjectMoved(obj, old);
 }
 
 #define XPCONNECT_SANDBOX_CLASS_METADATA_SLOT \
   (XPCONNECT_GLOBAL_EXTRA_SLOT_OFFSET)
 
-static const js::ClassOps SandboxClassOps = {
+static const JSClassOps SandboxClassOps = {
     nullptr,
     nullptr,
     nullptr,
     JS_NewEnumerateStandardClasses,
     JS_ResolveStandardClass,
     JS_MayResolveStandardClass,
     sandbox_finalize,
     nullptr,
--- a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
@@ -639,17 +639,17 @@ static bool XPC_WN_NoHelper_Resolve(JSCo
   }
 
   return DefinePropertyIfFound(
       ccx, obj, id, set, nullptr, nullptr, wrapper->GetScope(), true, wrapper,
       wrapper, nullptr, JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT,
       resolvedp);
 }
 
-static const js::ClassOps XPC_WN_NoHelper_JSClassOps = {
+static const JSClassOps XPC_WN_NoHelper_JSClassOps = {
     XPC_WN_OnlyIWrite_AddPropertyStub,  // addProperty
     XPC_WN_CannotDeletePropertyStub,    // delProperty
     XPC_WN_Shared_Enumerate,            // enumerate
     nullptr,                            // newEnumerate
     XPC_WN_NoHelper_Resolve,            // resolve
     nullptr,                            // mayResolve
     XPC_WN_NoHelper_Finalize,           // finalize
     nullptr,                            // call
@@ -1081,17 +1081,17 @@ static bool XPC_WN_Proto_Resolve(JSConte
   nsCOMPtr<nsIXPCScriptable> scr = self->GetScriptable();
 
   return DefinePropertyIfFound(
       ccx, obj, id, self->GetSet(), nullptr, nullptr, self->GetScope(), true,
       nullptr, nullptr, scr,
       JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE, resolvedp);
 }
 
-static const js::ClassOps XPC_WN_Proto_JSClassOps = {
+static const JSClassOps XPC_WN_Proto_JSClassOps = {
     XPC_WN_OnlyIWrite_Proto_AddPropertyStub,  // addProperty
     XPC_WN_CannotDeletePropertyStub,          // delProperty
     XPC_WN_Proto_Enumerate,                   // enumerate
     nullptr,                                  // newEnumerate
     XPC_WN_Proto_Resolve,                     // resolve
     nullptr,                                  // mayResolve
     XPC_WN_Proto_Finalize,                    // finalize
     nullptr,                                  // call
@@ -1170,17 +1170,17 @@ static size_t XPC_WN_TearOff_ObjectMoved
 
 // Make sure XPC_WRAPPER_FLAGS has no reserved slots, so our
 // XPC_WN_TEAROFF_RESERVED_SLOTS value is OK.
 
 static_assert(((XPC_WRAPPER_FLAGS >> JSCLASS_RESERVED_SLOTS_SHIFT) &
                JSCLASS_RESERVED_SLOTS_MASK) == 0,
               "XPC_WRAPPER_FLAGS should not include any reserved slots");
 
-static const js::ClassOps XPC_WN_Tearoff_JSClassOps = {
+static const JSClassOps XPC_WN_Tearoff_JSClassOps = {
     XPC_WN_OnlyIWrite_AddPropertyStub,  // addProperty
     XPC_WN_CannotDeletePropertyStub,    // delProperty
     XPC_WN_TearOff_Enumerate,           // enumerate
     nullptr,                            // newEnumerate
     XPC_WN_TearOff_Resolve,             // resolve
     nullptr,                            // mayResolve
     XPC_WN_TearOff_Finalize,            // finalize
     nullptr,                            // call