Bug 1026918, part 2 - Rename js::GetPropertyNames -> GetPropertyKeys. r=efaust.
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 26 Sep 2014 19:39:35 -0500
changeset 232594 d646fdb79bf6018d1aeeed355a8e51e5f2289f63
parent 232593 90eec7edf8c0e4cfaf0fe15bf3f887f63a24eba0
child 232595 38a7ffcc3507cf99a70e934bc2e930b0b0caf4dd
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust
bugs1026918
milestone35.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 1026918, part 2 - Rename js::GetPropertyNames -> GetPropertyKeys. r=efaust.
dom/bindings/Codegen.py
dom/bindings/DOMJSProxyHandler.cpp
js/ipc/WrapperAnswer.cpp
js/src/builtin/Object.cpp
js/src/builtin/TypedObject.cpp
js/src/jsapi.cpp
js/src/jsarray.cpp
js/src/jsfriendapi.cpp
js/src/jsfriendapi.h
js/src/jsiter.cpp
js/src/jsobj.cpp
js/src/json.cpp
js/src/proxy/DirectProxyHandler.cpp
js/src/proxy/Proxy.cpp
js/src/proxy/ScriptedDirectProxyHandler.cpp
js/src/vm/Debugger.cpp
js/src/vm/ScopeObject.cpp
js/src/vm/Shape.cpp
js/src/vm/StructuredClone.cpp
js/xpconnect/wrappers/ChromeObjectWrapper.h
js/xpconnect/wrappers/XrayWrapper.cpp
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -10405,17 +10405,17 @@ class CGDOMJSProxyHandler_ownPropNames(C
                   }
                 }
                 """)
         else:
             addIndices = ""
 
         if UseHolderForUnforgeable(self.descriptor):
             addUnforgeable = dedent("""
-                if (!js::GetPropertyNames(cx, ${holder}, flags, &props)) {
+                if (!js::GetPropertyKeys(cx, ${holder}, flags, &props)) {
                   return false;
                 }
                 """)
             addUnforgeable = CallOnUnforgeableHolder(self.descriptor,
                                                      addUnforgeable,
                                                      "isXray")
         else:
             addUnforgeable = ""
@@ -10442,17 +10442,17 @@ class CGDOMJSProxyHandler_ownPropNames(C
             """
             bool isXray = xpc::WrapperFactory::IsXrayWrapper(proxy);
             $*{addIndices}
             $*{addUnforgeable}
             $*{addNames}
 
             JS::Rooted<JSObject*> expando(cx);
             if (!isXray && (expando = DOMProxyHandler::GetExpandoObject(proxy)) &&
-                !js::GetPropertyNames(cx, expando, flags, &props)) {
+                !js::GetPropertyKeys(cx, expando, flags, &props)) {
               return false;
             }
 
             return true;
             """,
             addIndices=addIndices,
             addUnforgeable=addUnforgeable,
             addNames=addNames)
--- a/dom/bindings/DOMJSProxyHandler.cpp
+++ b/dom/bindings/DOMJSProxyHandler.cpp
@@ -273,17 +273,17 @@ bool
 BaseDOMProxyHandler::enumerate(JSContext* cx, JS::Handle<JSObject*> proxy,
                                AutoIdVector& props) const
 {
   JS::Rooted<JSObject*> proto(cx);
   if (!JS_GetPrototype(cx, proxy, &proto))  {
     return false;
   }
   return keys(cx, proxy, props) &&
-         (!proto || js::GetPropertyNames(cx, proto, 0, &props));
+         (!proto || js::GetPropertyKeys(cx, proto, 0, &props));
 }
 
 bool
 BaseDOMProxyHandler::watch(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
                            JS::Handle<JSObject*> callable) const
 {
   return js::WatchGuts(cx, proxy, id, callable);
 }
--- a/js/ipc/WrapperAnswer.cpp
+++ b/js/ipc/WrapperAnswer.cpp
@@ -589,17 +589,17 @@ WrapperAnswer::RecvGetPropertyNames(cons
     if (!obj)
         return fail(cx, rs);
 
     JSAutoCompartment comp(cx, obj);
 
     LOG("%s.getPropertyNames()", ReceiverObj(objId));
 
     AutoIdVector props(cx);
-    if (!js::GetPropertyNames(cx, obj, flags, &props))
+    if (!js::GetPropertyKeys(cx, obj, flags, &props))
         return fail(cx, rs);
 
     for (size_t i = 0; i < props.length(); i++) {
         nsString name;
         if (!convertIdToGeckoString(cx, props[i], &name))
             return fail(cx, rs);
 
         names->AppendElement(name);
--- a/js/src/builtin/Object.cpp
+++ b/js/src/builtin/Object.cpp
@@ -165,17 +165,17 @@ js::ObjectToSource(JSContext *cx, Handle
 
     RootedValue v0(cx), v1(cx);
     MutableHandleValue val[2] = {&v0, &v1};
 
     RootedString str0(cx), str1(cx);
     MutableHandleString gsop[2] = {&str0, &str1};
 
     AutoIdVector idv(cx);
-    if (!GetPropertyNames(cx, obj, JSITER_OWNONLY | JSITER_SYMBOLS, &idv))
+    if (!GetPropertyKeys(cx, obj, JSITER_OWNONLY | JSITER_SYMBOLS, &idv))
         return nullptr;
 
     bool comma = false;
     for (size_t i = 0; i < idv.length(); ++i) {
         RootedId id(cx, idv[i]);
         RootedObject obj2(cx);
         RootedShape shape(cx);
         if (!JSObject::lookupGeneric(cx, obj, id, &obj2, &shape))
@@ -879,17 +879,17 @@ GetOwnPropertyKeys(JSContext *cx, const 
 {
     // Steps 1-2.
     RootedObject obj(cx, ToObject(cx, args.get(0)));
     if (!obj)
         return false;
 
     // Steps 3-10.
     AutoIdVector keys(cx);
-    if (!GetPropertyNames(cx, obj, flags, &keys))
+    if (!GetPropertyKeys(cx, obj, flags, &keys))
         return false;
 
     // Step 11.
     AutoValueVector vals(cx);
     if (!vals.resize(keys.length()))
         return false;
 
     for (size_t i = 0, len = keys.length(); i < len; i++) {
--- a/js/src/builtin/TypedObject.cpp
+++ b/js/src/builtin/TypedObject.cpp
@@ -857,17 +857,17 @@ const JSFunctionSpec StructMetaTypeDescr
 
 JSObject *
 StructMetaTypeDescr::create(JSContext *cx,
                             HandleObject metaTypeDescr,
                             HandleObject fields)
 {
     // Obtain names of fields, which are the own properties of `fields`
     AutoIdVector ids(cx);
-    if (!GetPropertyNames(cx, fields, JSITER_OWNONLY | JSITER_SYMBOLS, &ids))
+    if (!GetPropertyKeys(cx, fields, JSITER_OWNONLY | JSITER_SYMBOLS, &ids))
         return nullptr;
 
     // Iterate through each field. Collect values for the various
     // vectors below and also track total size and alignment. Be wary
     // of overflow!
     StringBuffer stringBuffer(cx);     // Canonical string repr
     AutoValueVector fieldNames(cx);    // Name of each field.
     AutoValueVector fieldTypeObjs(cx); // Type descriptor of each field.
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -3611,17 +3611,17 @@ JS_PUBLIC_API(JSIdArray *)
 JS_Enumerate(JSContext *cx, HandleObject obj)
 {
     AssertHeapIsIdle(cx);
     CHECK_REQUEST(cx);
     assertSameCompartment(cx, obj);
 
     AutoIdVector props(cx);
     JSIdArray *ida;
-    if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, &props) || !VectorToIdArray(cx, props, &ida))
+    if (!GetPropertyKeys(cx, obj, JSITER_OWNONLY, &props) || !VectorToIdArray(cx, props, &ida))
         return nullptr;
     return ida;
 }
 
 /*
  * XXX reverse iterator for properties, unreverse and meld with jsinterp.c's
  *     prop_iterator_class somehow...
  * + preserve the obj->enumerate API while optimizing the native object case
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -636,17 +636,17 @@ js::ArraySetLength(typename ExecutionMod
             // elements" and "probably sparse" are completely unprincipled
             // predictions.  In the long run, bug 586842 will support the right
             // fix: store sparse elements in a sorted data structure that
             // permits fast in-reverse-order traversal and concurrent removals.
 
             Vector<uint32_t> indexes(cx);
             {
                 AutoIdVector props(cx);
-                if (!GetPropertyNames(cx, arr, JSITER_OWNONLY | JSITER_HIDDEN, &props))
+                if (!GetPropertyKeys(cx, arr, JSITER_OWNONLY | JSITER_HIDDEN, &props))
                     return false;
 
                 for (size_t i = 0; i < props.length(); i++) {
                     if (!CheckForInterrupt(cx))
                         return false;
 
                     uint32_t index;
                     if (!js_IdIsIndex(props[i], &index))
--- a/js/src/jsfriendapi.cpp
+++ b/js/src/jsfriendapi.cpp
@@ -871,17 +871,17 @@ FormatFrame(JSContext *cx, const NonBuil
             }
         }
     }
 
     if (showThisProps && thisVal.isObject()) {
         RootedObject obj(cx, &thisVal.toObject());
 
         AutoIdVector keys(cx);
-        if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, &keys)) {
+        if (!GetPropertyKeys(cx, obj, JSITER_OWNONLY, &keys)) {
             cx->clearPendingException();
             return buf;
         }
 
         RootedId id(cx);
         for (size_t i = 0; i < keys.length(); i++) {
             RootedId id(cx, keys[i]);
             RootedValue key(cx, IdToValue(id));
--- a/js/src/jsfriendapi.h
+++ b/js/src/jsfriendapi.h
@@ -966,17 +966,17 @@ CopyStringChars(JSContext *cx, char16_t 
 
 inline void
 CopyFlatStringChars(char16_t *dest, JSFlatString *s, size_t len)
 {
     CopyLinearStringChars(dest, FlatStringToLinearString(s), len);
 }
 
 JS_FRIEND_API(bool)
-GetPropertyNames(JSContext *cx, JSObject *obj, unsigned flags, JS::AutoIdVector *props);
+GetPropertyKeys(JSContext *cx, JSObject *obj, unsigned flags, JS::AutoIdVector *props);
 
 JS_FRIEND_API(bool)
 AppendUnique(JSContext *cx, JS::AutoIdVector &base, JS::AutoIdVector &others);
 
 JS_FRIEND_API(bool)
 GetGeneric(JSContext *cx, JSObject *obj, JSObject *receiver, jsid id, JS::Value *vp);
 
 JS_FRIEND_API(bool)
--- a/js/src/jsiter.cpp
+++ b/js/src/jsiter.cpp
@@ -391,17 +391,17 @@ js::VectorToIdArray(JSContext *cx, AutoI
     jsid *v = props.begin();
     for (int i = 0; i < ida->length; i++)
         ida->vector[i].init(v[i]);
     *idap = ida;
     return true;
 }
 
 JS_FRIEND_API(bool)
-js::GetPropertyNames(JSContext *cx, JSObject *obj, unsigned flags, AutoIdVector *props)
+js::GetPropertyKeys(JSContext *cx, JSObject *obj, unsigned flags, AutoIdVector *props)
 {
     return Snapshot(cx, obj,
                     flags & (JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS | JSITER_SYMBOLSONLY),
                     props);
 }
 
 size_t sCustomIteratorCount = 0;
 
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -1126,17 +1126,17 @@ js::DefineOwnProperty(JSContext *cx, Han
     return true;
 }
 
 
 bool
 js::ReadPropertyDescriptors(JSContext *cx, HandleObject props, bool checkAccessors,
                             AutoIdVector *ids, AutoPropDescVector *descs)
 {
-    if (!GetPropertyNames(cx, props, JSITER_OWNONLY | JSITER_SYMBOLS, ids))
+    if (!GetPropertyKeys(cx, props, JSITER_OWNONLY | JSITER_SYMBOLS, ids))
         return false;
 
     RootedId id(cx);
     for (size_t i = 0, len = ids->length(); i < len; i++) {
         id = (*ids)[i];
         Rooted<PropDesc> desc(cx);
         RootedValue v(cx);
         if (!JSObject::getGeneric(cx, props, props, id, &v) ||
@@ -1222,17 +1222,17 @@ JSObject::sealOrFreeze(JSContext *cx, Ha
 {
     assertSameCompartment(cx, obj);
     MOZ_ASSERT(it == SEAL || it == FREEZE);
 
     if (!JSObject::preventExtensions(cx, obj))
         return false;
 
     AutoIdVector props(cx);
-    if (!GetPropertyNames(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY | JSITER_SYMBOLS, &props))
+    if (!GetPropertyKeys(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY | JSITER_SYMBOLS, &props))
         return false;
 
     /* preventExtensions must sparsify dense objects, so we can assign to holes without checks. */
     MOZ_ASSERT_IF(obj->isNative(), obj->as<NativeObject>().getDenseCapacity() == 0);
 
     if (obj->isNative() && !obj->as<NativeObject>().inDictionaryMode() && !IsAnyTypedArray(obj)) {
         HandleNativeObject nobj = obj.as<NativeObject>();
 
@@ -1333,17 +1333,17 @@ JSObject::isSealedOrFrozen(JSContext *cx
             // Typed arrays cannot be frozen, but an empty typed array is
             // trivially frozen.
             *resultp = (AnyTypedArrayLength(obj) == 0);
         }
         return true;
     }
 
     AutoIdVector props(cx);
-    if (!GetPropertyNames(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY | JSITER_SYMBOLS, &props))
+    if (!GetPropertyKeys(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY | JSITER_SYMBOLS, &props))
         return false;
 
     RootedId id(cx);
     for (size_t i = 0, len = props.length(); i < len; i++) {
         id = props[i];
 
         unsigned attrs;
         if (!getGenericAttributes(cx, obj, id, &attrs))
@@ -1874,17 +1874,17 @@ JS_CopyPropertyFrom(JSContext *cx, Handl
 }
 
 JS_FRIEND_API(bool)
 JS_CopyPropertiesFrom(JSContext *cx, HandleObject target, HandleObject obj)
 {
     JSAutoCompartment ac(cx, obj);
 
     AutoIdVector props(cx);
-    if (!GetPropertyNames(cx, obj, JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, &props))
+    if (!GetPropertyKeys(cx, obj, JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, &props))
         return false;
 
     for (size_t i = 0; i < props.length(); ++i) {
         if (!JS_CopyPropertyFrom(cx, props[i], target, obj))
             return false;
     }
 
     return true;
--- a/js/src/json.cpp
+++ b/js/src/json.cpp
@@ -326,17 +326,17 @@ JO(JSContext *cx, HandleObject obj, Stri
     Maybe<AutoIdVector> ids;
     const AutoIdVector *props;
     if (scx->replacer && !scx->replacer->isCallable()) {
         MOZ_ASSERT(JS_IsArrayObject(cx, scx->replacer));
         props = &scx->propertyList;
     } else {
         MOZ_ASSERT_IF(scx->replacer, scx->propertyList.length() == 0);
         ids.emplace(cx);
-        if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, ids.ptr()))
+        if (!GetPropertyKeys(cx, obj, JSITER_OWNONLY, ids.ptr()))
             return false;
         props = ids.ptr();
     }
 
     /* My kingdom for not-quite-initialized-from-the-start references. */
     const AutoIdVector &propertyList = *props;
 
     /* Steps 8-10, 13. */
@@ -728,17 +728,17 @@ Walk(JSContext *cx, HandleObject holder,
                     //     our property-definition APIs indicate that.
                     if (!JSObject::defineGeneric(cx, obj, id, newElement))
                         return false;
                 }
             }
         } else {
             /* Step 2b(i). */
             AutoIdVector keys(cx);
-            if (!GetPropertyNames(cx, obj, JSITER_OWNONLY, &keys))
+            if (!GetPropertyKeys(cx, obj, JSITER_OWNONLY, &keys))
                 return false;
 
             /* Step 2b(ii). */
             RootedId id(cx);
             RootedValue newElement(cx);
             for (size_t i = 0, len = keys.length(); i < len; i++) {
                 /* Step 2b(ii)(1). */
                 id = keys[i];
--- a/js/src/proxy/DirectProxyHandler.cpp
+++ b/js/src/proxy/DirectProxyHandler.cpp
@@ -44,17 +44,17 @@ DirectProxyHandler::defineProperty(JSCon
 }
 
 bool
 DirectProxyHandler::ownPropertyKeys(JSContext *cx, HandleObject proxy,
                                     AutoIdVector &props) const
 {
     assertEnteredPolicy(cx, proxy, JSID_VOID, ENUMERATE);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
-    return GetPropertyNames(cx, target, JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, &props);
+    return GetPropertyKeys(cx, target, JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS, &props);
 }
 
 bool
 DirectProxyHandler::delete_(JSContext *cx, HandleObject proxy, HandleId id, bool *bp) const
 {
     assertEnteredPolicy(cx, proxy, id, SET);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
     return JSObject::deleteGeneric(cx, target, id, bp);
@@ -62,17 +62,17 @@ DirectProxyHandler::delete_(JSContext *c
 
 bool
 DirectProxyHandler::enumerate(JSContext *cx, HandleObject proxy,
                               AutoIdVector &props) const
 {
     assertEnteredPolicy(cx, proxy, JSID_VOID, ENUMERATE);
     MOZ_ASSERT(!hasPrototype()); // Should never be called if there's a prototype.
     RootedObject target(cx, proxy->as<ProxyObject>().target());
-    return GetPropertyNames(cx, target, 0, &props);
+    return GetPropertyKeys(cx, target, 0, &props);
 }
 
 bool
 DirectProxyHandler::call(JSContext *cx, HandleObject proxy, const CallArgs &args) const
 {
     assertEnteredPolicy(cx, proxy, JSID_VOID, CALL);
     RootedValue target(cx, proxy->as<ProxyObject>().private_());
     return Invoke(cx, args.thisv(), target, args.length(), args.array(), args.rval());
@@ -217,17 +217,17 @@ DirectProxyHandler::set(JSContext *cx, H
     return JSObject::setGeneric(cx, target, receiver, id, vp, strict);
 }
 
 bool
 DirectProxyHandler::keys(JSContext *cx, HandleObject proxy, AutoIdVector &props) const
 {
     assertEnteredPolicy(cx, proxy, JSID_VOID, ENUMERATE);
     RootedObject target(cx, proxy->as<ProxyObject>().target());
-    return GetPropertyNames(cx, target, JSITER_OWNONLY, &props);
+    return GetPropertyKeys(cx, target, JSITER_OWNONLY, &props);
 }
 
 bool
 DirectProxyHandler::iterate(JSContext *cx, HandleObject proxy, unsigned flags,
                             MutableHandleValue vp) const
 {
     assertEnteredPolicy(cx, proxy, JSID_VOID, ENUMERATE);
     MOZ_ASSERT(!hasPrototype()); // Should never be called if there's a prototype.
--- a/js/src/proxy/Proxy.cpp
+++ b/js/src/proxy/Proxy.cpp
@@ -215,17 +215,17 @@ Proxy::enumerate(JSContext *cx, HandleOb
     if (!policy.allowed())
         return policy.returnValue();
     if (!handler->hasPrototype())
         return proxy->as<ProxyObject>().handler()->enumerate(cx, proxy, props);
     if (!handler->keys(cx, proxy, props))
         return false;
     AutoIdVector protoProps(cx);
     INVOKE_ON_PROTOTYPE(cx, handler, proxy,
-                        GetPropertyNames(cx, proto, 0, &protoProps) &&
+                        GetPropertyKeys(cx, proto, 0, &protoProps) &&
                         AppendUnique(cx, props, protoProps));
 }
 
 bool
 Proxy::has(JSContext *cx, HandleObject proxy, HandleId id, bool *bp)
 {
     JS_CHECK_RECURSION(cx, return false);
     const BaseProxyHandler *handler = proxy->as<ProxyObject>().handler();
--- a/js/src/proxy/ScriptedDirectProxyHandler.cpp
+++ b/js/src/proxy/ScriptedDirectProxyHandler.cpp
@@ -222,17 +222,17 @@ ArrayToIdVector(JSContext *cx, HandleObj
 
         // step vi
         if (!props.append(id))
             return false;
     }
 
     // step l
     AutoIdVector ownProps(cx);
-    if (!GetPropertyNames(cx, target, flags, &ownProps))
+    if (!GetPropertyKeys(cx, target, flags, &ownProps))
         return false;
 
     // step m
     for (size_t i = 0; i < ownProps.length(); ++i) {
         RootedId id(cx, ownProps[i]);
 
         bool found = false;
         for (size_t j = 0; j < props.length(); ++j) {
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -4900,17 +4900,17 @@ DebuggerGenericEval(JSContext *cx, const
      * debugger compartment, since that is where any exceptions must be
      * thrown.
      */
     AutoIdVector keys(cx);
     AutoValueVector values(cx);
     if (evalWithBindings) {
         RootedObject bindingsobj(cx, NonNullObject(cx, bindings));
         if (!bindingsobj ||
-            !GetPropertyNames(cx, bindingsobj, JSITER_OWNONLY, &keys) ||
+            !GetPropertyKeys(cx, bindingsobj, JSITER_OWNONLY, &keys) ||
             !values.growBy(keys.length()))
         {
             return false;
         }
         for (size_t i = 0; i < keys.length(); i++) {
             MutableHandleValue valp = values[i];
             if (!JSObject::getGeneric(cx, bindingsobj, bindingsobj, keys[i], valp) ||
                 !dbg->unwrapDebuggeeValue(cx, valp))
@@ -5494,17 +5494,17 @@ DebuggerObject_getOwnPropertyNames(JSCon
 {
     THIS_DEBUGOBJECT_REFERENT(cx, argc, vp, "getOwnPropertyNames", args, obj);
 
     AutoIdVector keys(cx);
     {
         Maybe<AutoCompartment> ac;
         ac.emplace(cx, obj);
         ErrorCopier ec(ac);
-        if (!GetPropertyNames(cx, obj, JSITER_OWNONLY | JSITER_HIDDEN, &keys))
+        if (!GetPropertyKeys(cx, obj, JSITER_OWNONLY | JSITER_HIDDEN, &keys))
             return false;
     }
 
     AutoValueVector vals(cx);
     if (!vals.resize(keys.length()))
         return false;
 
     for (size_t i = 0, len = keys.length(); i < len; i++) {
@@ -5512,17 +5512,17 @@ DebuggerObject_getOwnPropertyNames(JSCon
          if (JSID_IS_INT(id)) {
              JSString *str = Int32ToString<CanGC>(cx, JSID_TO_INT(id));
              if (!str)
                  return false;
              vals[i].setString(str);
          } else if (JSID_IS_ATOM(id)) {
              vals[i].setString(JSID_TO_STRING(id));
          } else {
-             MOZ_ASSERT_UNREACHABLE("GetPropertyNames must return only string and int jsids");
+             MOZ_ASSERT_UNREACHABLE("GetPropertyKeys must return only string and int jsids");
          }
     }
 
     JSObject *aobj = NewDenseCopiedArray(cx, vals.length(), vals.begin());
     if (!aobj)
         return false;
     args.rval().setObject(*aobj);
     return true;
@@ -6181,17 +6181,17 @@ DebuggerEnv_names(JSContext *cx, unsigne
 {
     THIS_DEBUGENV(cx, argc, vp, "names", args, envobj, env);
 
     AutoIdVector keys(cx);
     {
         Maybe<AutoCompartment> ac;
         ac.emplace(cx, env);
         ErrorCopier ec(ac);
-        if (!GetPropertyNames(cx, env, JSITER_HIDDEN, &keys))
+        if (!GetPropertyKeys(cx, env, JSITER_HIDDEN, &keys))
             return false;
     }
 
     RootedObject arr(cx, NewDenseEmptyArray(cx));
     if (!arr)
         return false;
     RootedId id(cx);
     for (size_t i = 0, len = keys.length(); i < len; i++) {
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -1693,17 +1693,17 @@ class DebugScopeProxy : public BaseProxy
         // DynamicWithObject isn't a very good proxy.  It doesn't have a
         // JSNewEnumerateOp implementation, because if it just delegated to the
         // target object, the object would indicate that native enumeration is
         // the thing to do, but native enumeration over the DynamicWithObject
         // wrapper yields no properties.  So instead here we hack around the
         // issue, and punch a hole through to the with object target.
         Rooted<JSObject*> target(cx, (scope->is<DynamicWithObject>()
                                       ? &scope->as<DynamicWithObject>().object() : scope));
-        if (!GetPropertyNames(cx, target, flags, &props))
+        if (!GetPropertyKeys(cx, target, flags, &props))
             return false;
 
         /*
          * Function scopes are optimized to not contain unaliased variables so
          * they must be manually appended here.
          */
         if (scope->is<CallObject>() && !scope->as<CallObject>().isForEval()) {
             RootedScript script(cx, scope->as<CallObject>().callee().nonLazyScript());
--- a/js/src/vm/Shape.cpp
+++ b/js/src/vm/Shape.cpp
@@ -1339,17 +1339,17 @@ JSObject::preventExtensions(JSContext *c
     if (!obj->nonProxyIsExtensible())
         return true;
 
     /*
      * Force lazy properties to be resolved by iterating over the objects' own
      * properties.
      */
     AutoIdVector props(cx);
-    if (!js::GetPropertyNames(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY, &props))
+    if (!js::GetPropertyKeys(cx, obj, JSITER_HIDDEN | JSITER_OWNONLY, &props))
         return false;
 
     /*
      * Convert all dense elements to sparse properties. This will shrink the
      * initialized length and capacity of the object to zero and ensure that no
      * new dense elements can be added without calling growElements(), which
      * checks isExtensible().
      */
--- a/js/src/vm/StructuredClone.cpp
+++ b/js/src/vm/StructuredClone.cpp
@@ -942,17 +942,17 @@ JSStructuredCloneWriter::startObject(Han
 bool
 JSStructuredCloneWriter::traverseObject(HandleObject obj)
 {
     /*
      * Get enumerable property ids and put them in reverse order so that they
      * will come off the stack in forward order.
      */
     AutoIdVector properties(context());
-    if (!GetPropertyNames(context(), obj, JSITER_OWNONLY, &properties))
+    if (!GetPropertyKeys(context(), obj, JSITER_OWNONLY, &properties))
         return false;
 
     for (size_t i = properties.length(); i > 0; --i) {
         MOZ_ASSERT(JSID_IS_STRING(properties[i - 1]) || JSID_IS_INT(properties[i - 1]));
         RootedValue val(context(), IdToValue(properties[i - 1]));
         if (!entries.append(val))
             return false;
     }
--- a/js/xpconnect/wrappers/ChromeObjectWrapper.h
+++ b/js/xpconnect/wrappers/ChromeObjectWrapper.h
@@ -51,21 +51,21 @@ class ChromeObjectWrapper : public Chrom
 
     virtual bool objectClassIs(JS::Handle<JSObject*> obj, js::ESClassValue classValue,
                                JSContext *cx) const MOZ_OVERRIDE;
 
     virtual bool enter(JSContext *cx, JS::Handle<JSObject*> wrapper, JS::Handle<jsid> id,
                        js::Wrapper::Action act, bool *bp) const MOZ_OVERRIDE;
 
     // NB: One might think we'd need to implement enumerate(), keys(), iterate(),
-    // and getPropertyNames() here. However, ES5 built-in properties aren't
+    // and getPropertyKeys() here. However, ES5 built-in properties aren't
     // enumerable (and SpiderMonkey's implementation seems to match the spec
     // modulo Error.prototype.fileName and Error.prototype.lineNumber). Since
     // we're only remapping the prototypes of standard objects, there would
     // never be anything more to enumerate up the prototype chain. So we can
-    // atually skip these.
+    // actually skip these.
 
     static const ChromeObjectWrapper singleton;
 };
 
 } /* namespace xpc */
 
 #endif /* __ChromeObjectWrapper_h__ */
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -645,17 +645,17 @@ JSXrayTraits::enumerateNames(JSContext *
     if (!isPrototype(holder)) {
         // For Object and Array instances, we expose some properties from the underlying
         // object, but only after filtering them carefully.
         if (key == JSProto_Object || key == JSProto_Array) {
             MOZ_ASSERT(props.empty());
             {
                 JSAutoCompartment ac(cx, target);
                 AutoIdVector targetProps(cx);
-                if (!js::GetPropertyNames(cx, target, flags | JSITER_OWNONLY, &targetProps))
+                if (!js::GetPropertyKeys(cx, target, flags | JSITER_OWNONLY, &targetProps))
                     return false;
                 // Loop over the properties, and only pass along the ones that
                 // we determine to be safe.
                 if (!props.reserve(targetProps.length()))
                     return false;
                 for (size_t i = 0; i < targetProps.length(); ++i) {
                     Rooted<JSPropertyDescriptor> desc(cx);
                     RootedId id(cx, targetProps[i]);
@@ -1368,17 +1368,17 @@ bool
 XPCWrappedNativeXrayTraits::enumerateNames(JSContext *cx, HandleObject wrapper, unsigned flags,
                                            AutoIdVector &props)
 {
     // Force all native properties to be materialized onto the wrapped native.
     AutoIdVector wnProps(cx);
     {
         RootedObject target(cx, singleton.getTargetObject(wrapper));
         JSAutoCompartment ac(cx, target);
-        if (!js::GetPropertyNames(cx, target, flags, &wnProps))
+        if (!js::GetPropertyKeys(cx, target, flags, &wnProps))
             return false;
     }
 
     // Go through the properties we found on the underlying object and see if
     // they appear on the XrayWrapper. If it throws (which may happen if the
     // wrapper is a SecurityWrapper), just clear the exception and move on.
     MOZ_ASSERT(!JS_IsExceptionPending(cx));
     if (!props.reserve(wnProps.length()))
@@ -2007,17 +2007,17 @@ XrayWrapper<Base, Traits>::enumerate(JSC
     assertEnteredPolicy(cx, wrapper, JSID_VOID, BaseProxyHandler::ENUMERATE);
 
     // Enumerate expando properties first. Note that the expando object lives
     // in the target compartment.
     RootedObject target(cx, Traits::singleton.getTargetObject(wrapper));
     RootedObject expando(cx, Traits::singleton.getExpandoObject(cx, target, wrapper));
     if (expando) {
         JSAutoCompartment ac(cx, expando);
-        if (!js::GetPropertyNames(cx, expando, flags, &props))
+        if (!js::GetPropertyKeys(cx, expando, flags, &props))
             return false;
     }
 
     return Traits::singleton.enumerateNames(cx, wrapper, flags, props);
 }
 
 template <typename Base, typename Traits>
 bool