Bug 1041626 - Make NativeProperties naming more consistent. r=bz, a=sledru
authorBobby Holley <bobbyholley@gmail.com>
Wed, 23 Jul 2014 12:36:21 -0700
changeset 217272 3ff21bc2a66941426e847915ecf0ac767bb1f96e
parent 217271 16c21a465eadcfdfa0890dd127364ade8945e7eb
child 217273 4bee07e2ba798d2f311965d73391ef63de0108ff
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, sledru
bugs1041626
milestone33.0a2
Bug 1041626 - Make NativeProperties naming more consistent. r=bz, a=sledru
dom/bindings/BindingUtils.cpp
dom/bindings/DOMJSClass.h
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -1065,28 +1065,28 @@ XrayResolveAttribute(JSContext* cx, JS::
   return true;
 }
 
 static bool
 XrayResolveMethod(JSContext* cx, JS::Handle<JSObject*> wrapper,
                   JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
                   const Prefable<const JSFunctionSpec>* methods,
                   jsid* methodIds,
-                  const JSFunctionSpec* methodsSpecs,
+                  const JSFunctionSpec* methodSpecs,
                   JS::MutableHandle<JSPropertyDescriptor> desc)
 {
   const Prefable<const JSFunctionSpec>* method;
   for (method = methods; method->specs; ++method) {
     if (method->isEnabled(cx, obj)) {
       // Set i to be the index into our full list of ids/specs that we're
       // looking at now.
-      size_t i = method->specs - methodsSpecs;
+      size_t i = method->specs - methodSpecs;
       for ( ; methodIds[i] != JSID_VOID; ++i) {
         if (id == methodIds[i]) {
-          const JSFunctionSpec& methodSpec = methodsSpecs[i];
+          const JSFunctionSpec& methodSpec = methodSpecs[i];
           JSFunction *fun;
           if (methodSpec.selfHostedName) {
             fun = JS::GetSelfHostedFunction(cx, methodSpec.selfHostedName, id, methodSpec.nargs);
             if (!fun) {
               return false;
             }
             MOZ_ASSERT(!methodSpec.call.op, "Bad FunctionSpec declaration: non-null native");
             MOZ_ASSERT(!methodSpec.call.info, "Bad FunctionSpec declaration: non-null jitinfo");
@@ -1155,29 +1155,29 @@ XrayResolveUnforgeableProperty(JSContext
 static bool
 XrayResolveProperty(JSContext* cx, JS::Handle<JSObject*> wrapper,
                     JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
                     JS::MutableHandle<JSPropertyDescriptor> desc, DOMObjectType type,
                     const NativeProperties* nativeProperties)
 {
   const Prefable<const JSFunctionSpec>* methods;
   jsid* methodIds;
-  const JSFunctionSpec* methodsSpecs;
+  const JSFunctionSpec* methodSpecs;
   if (type == eInterface) {
     methods = nativeProperties->staticMethods;
     methodIds = nativeProperties->staticMethodIds;
-    methodsSpecs = nativeProperties->staticMethodsSpecs;
+    methodSpecs = nativeProperties->staticMethodSpecs;
   } else {
     methods = nativeProperties->methods;
     methodIds = nativeProperties->methodIds;
-    methodsSpecs = nativeProperties->methodsSpecs;
+    methodSpecs = nativeProperties->methodSpecs;
   }
   if (methods) {
     if (!XrayResolveMethod(cx, wrapper, obj, id, methods, methodIds,
-                           methodsSpecs, desc)) {
+                           methodSpecs, desc)) {
       return false;
     }
     if (desc.object()) {
       return true;
     }
   }
 
   if (type == eInterface) {
@@ -1372,26 +1372,26 @@ XrayEnumerateProperties(JSContext* cx, J
                         DOMObjectType type,
                         const NativeProperties* nativeProperties)
 {
   if (type == eInterface) {
     if (nativeProperties->staticMethods &&
         !XrayEnumerateAttributesOrMethods(cx, wrapper, obj,
                                           nativeProperties->staticMethods,
                                           nativeProperties->staticMethodIds,
-                                          nativeProperties->staticMethodsSpecs,
+                                          nativeProperties->staticMethodSpecs,
                                           flags, props)) {
       return false;
     }
   } else {
     if (nativeProperties->methods &&
         !XrayEnumerateAttributesOrMethods(cx, wrapper, obj,
                                           nativeProperties->methods,
                                           nativeProperties->methodIds,
-                                          nativeProperties->methodsSpecs,
+                                          nativeProperties->methodSpecs,
                                           flags, props)) {
       return false;
     }
     if (nativeProperties->unforgeableMethods &&
         !XrayEnumerateAttributesOrMethods(cx, wrapper, obj,
                                           nativeProperties->unforgeableMethods,
                                           nativeProperties->unforgeableMethodIds,
                                           nativeProperties->unforgeableMethodSpecs,
--- a/dom/bindings/DOMJSClass.h
+++ b/dom/bindings/DOMJSClass.h
@@ -93,25 +93,25 @@ struct Prefable {
   // indicator is needed.
   const T* specs;
 };
 
 struct NativeProperties
 {
   const Prefable<const JSFunctionSpec>* staticMethods;
   jsid* staticMethodIds;
-  const JSFunctionSpec* staticMethodsSpecs;
+  const JSFunctionSpec* staticMethodSpecs;
 
   const Prefable<const JSPropertySpec>* staticAttributes;
   jsid* staticAttributeIds;
   const JSPropertySpec* staticAttributeSpecs;
 
   const Prefable<const JSFunctionSpec>* methods;
   jsid* methodIds;
-  const JSFunctionSpec* methodsSpecs;
+  const JSFunctionSpec* methodSpecs;
 
   const Prefable<const JSPropertySpec>* attributes;
   jsid* attributeIds;
   const JSPropertySpec* attributeSpecs;
 
   const Prefable<const JSFunctionSpec>* unforgeableMethods;
   jsid* unforgeableMethodIds;
   const JSFunctionSpec* unforgeableMethodSpecs;