Bug 1261723 (part 1) - Rename js::Class::ops as oOps. r=efaust.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 01 Apr 2016 10:59:59 +1100
changeset 330814 8246956e2368cc19f4b731ca3a2daca57bcb27f1
parent 330813 862f44c0c10c2828616af4856871c1772dfc4975
child 330815 aa88b0d0cd4adf9e2fde0288a0347b91af32c69a
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust
bugs1261723
milestone48.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 1261723 (part 1) - Rename js::Class::ops as oOps. r=efaust. |oOps| is short for "objectOps", which will contrast with the |cOps| "classOps" field that the next patch will introduce.
js/public/Class.h
js/xpconnect/src/XPCWrappedNativeJSOps.cpp
--- a/js/public/Class.h
+++ b/js/public/Class.h
@@ -751,17 +751,17 @@ struct JSClass {
 
 namespace js {
 
 struct Class
 {
     JS_CLASS_MEMBERS(FinalizeOp);
     const ClassSpec* spec;
     const ClassExtension* ext;
-    const ObjectOps* ops;
+    const ObjectOps* oOps;
 
     /*
      * Objects of this class aren't native objects. They don't have Shapes that
      * describe their properties and layout. Classes using this flag must
      * provide their own property behavior, either by being proxy classes (do
      * this) or by overriding all the ObjectOps except getElements, watch and
      * unwatch (don't do this).
      */
@@ -826,30 +826,30 @@ struct Class
     FinishClassInitOp specFinishInitHook()
                                const { return spec ? spec->finishInitHook()          : nullptr; }
 
     JSWeakmapKeyDelegateOp extWeakmapKeyDelegateOp()
                                const { return ext ? ext->weakmapKeyDelegateOp        : nullptr; }
     JSObjectMovedOp extObjectMovedOp()
                                const { return ext ? ext->objectMovedOp               : nullptr; }
 
-    LookupPropertyOp getOpsLookupProperty() const { return ops ? ops->lookupProperty : nullptr; }
-    DefinePropertyOp getOpsDefineProperty() const { return ops ? ops->defineProperty : nullptr; }
-    HasPropertyOp    getOpsHasProperty()    const { return ops ? ops->hasProperty    : nullptr; }
-    GetPropertyOp    getOpsGetProperty()    const { return ops ? ops->getProperty    : nullptr; }
-    SetPropertyOp    getOpsSetProperty()    const { return ops ? ops->setProperty    : nullptr; }
+    LookupPropertyOp getOpsLookupProperty() const { return oOps ? oOps->lookupProperty : nullptr; }
+    DefinePropertyOp getOpsDefineProperty() const { return oOps ? oOps->defineProperty : nullptr; }
+    HasPropertyOp    getOpsHasProperty()    const { return oOps ? oOps->hasProperty    : nullptr; }
+    GetPropertyOp    getOpsGetProperty()    const { return oOps ? oOps->getProperty    : nullptr; }
+    SetPropertyOp    getOpsSetProperty()    const { return oOps ? oOps->setProperty    : nullptr; }
     GetOwnPropertyOp getOpsGetOwnPropertyDescriptor()
-                                            const { return ops ? ops->getOwnPropertyDescriptor
+                                            const { return oOps ? oOps->getOwnPropertyDescriptor
                                                                                      : nullptr; }
-    DeletePropertyOp getOpsDeleteProperty() const { return ops ? ops->deleteProperty : nullptr; }
-    WatchOp          getOpsWatch()          const { return ops ? ops->watch          : nullptr; }
-    UnwatchOp        getOpsUnwatch()        const { return ops ? ops->unwatch        : nullptr; }
-    GetElementsOp    getOpsGetElements()    const { return ops ? ops->getElements    : nullptr; }
-    JSNewEnumerateOp getOpsEnumerate()      const { return ops ? ops->enumerate      : nullptr; }
-    JSFunToStringOp  getOpsFunToString()    const { return ops ? ops->funToString    : nullptr; }
+    DeletePropertyOp getOpsDeleteProperty() const { return oOps ? oOps->deleteProperty : nullptr; }
+    WatchOp          getOpsWatch()          const { return oOps ? oOps->watch          : nullptr; }
+    UnwatchOp        getOpsUnwatch()        const { return oOps ? oOps->unwatch        : nullptr; }
+    GetElementsOp    getOpsGetElements()    const { return oOps ? oOps->getElements    : nullptr; }
+    JSNewEnumerateOp getOpsEnumerate()      const { return oOps ? oOps->enumerate      : nullptr; }
+    JSFunToStringOp  getOpsFunToString()    const { return oOps ? oOps->funToString    : nullptr; }
 };
 
 static_assert(offsetof(JSClass, name) == offsetof(Class, name),
               "Class and JSClass must be consistent");
 static_assert(offsetof(JSClass, flags) == offsetof(Class, flags),
               "Class and JSClass must be consistent");
 static_assert(offsetof(JSClass, addProperty) == offsetof(Class, addProperty),
               "Class and JSClass must be consistent");
--- a/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
+++ b/js/xpconnect/src/XPCWrappedNativeJSOps.cpp
@@ -1054,17 +1054,17 @@ XPCNativeScriptableShared::XPCNativeScri
 
     // Initialize the js::ClassExtension.
 
     mJSClass.ext = &XPC_WN_JSClassExtension;
 
     // Initialize the js::ObjectOps.
 
     if (mFlags.WantNewEnumerate())
-        mJSClass.ops = &XPC_WN_ObjectOpsWithEnumerate;
+        mJSClass.oOps = &XPC_WN_ObjectOpsWithEnumerate;
 }
 
 /***************************************************************************/
 /***************************************************************************/
 
 // Compatibility hack.
 //
 // XPConnect used to do all sorts of funny tricks to find the "correct"