Bug 1026918, part 3 - Rename mozilla::jsipc::PJavaScript::GetPropertyNames -> GetPropertyKeys. r=billm.
authorJason Orendorff <jorendorff@mozilla.com>
Fri, 26 Sep 2014 19:52:45 -0500
changeset 209380 38a7ffcc3507cf99a70e934bc2e930b0b0caf4dd
parent 209379 d646fdb79bf6018d1aeeed355a8e51e5f2289f63
child 209381 5583c1a286cf282e93e830559a7d13b0da965813
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbillm
bugs1026918
milestone35.0a1
Bug 1026918, part 3 - Rename mozilla::jsipc::PJavaScript::GetPropertyNames -> GetPropertyKeys. r=billm.
js/ipc/JavaScriptBase.h
js/ipc/PJavaScript.ipdl
js/ipc/WrapperAnswer.cpp
js/ipc/WrapperAnswer.h
js/ipc/WrapperOwner.cpp
js/ipc/WrapperOwner.h
--- a/js/ipc/JavaScriptBase.h
+++ b/js/ipc/JavaScriptBase.h
@@ -96,19 +96,19 @@ class JavaScriptBase : public WrapperOwn
     }
     bool RecvClassName(const uint64_t &objId, nsString *result) {
         return Answer::RecvClassName(ObjectId::deserialize(objId), result);
     }
     bool RecvRegExpToShared(const uint64_t &objId, ReturnStatus *rs, nsString *source, uint32_t *flags) {
         return Answer::RecvRegExpToShared(ObjectId::deserialize(objId), rs, source, flags);
     }
 
-    bool RecvGetPropertyNames(const uint64_t &objId, const uint32_t &flags,
-                                ReturnStatus *rs, nsTArray<nsString> *names) {
-        return Answer::RecvGetPropertyNames(ObjectId::deserialize(objId), flags, rs, names);
+    bool RecvGetPropertyKeys(const uint64_t &objId, const uint32_t &flags,
+                             ReturnStatus *rs, nsTArray<nsString> *names) {
+        return Answer::RecvGetPropertyKeys(ObjectId::deserialize(objId), flags, rs, names);
     }
     bool RecvInstanceOf(const uint64_t &objId, const JSIID &iid,
                           ReturnStatus *rs, bool *instanceof) {
         return Answer::RecvInstanceOf(ObjectId::deserialize(objId), iid, rs, instanceof);
     }
     bool RecvDOMInstanceOf(const uint64_t &objId, const int &prototypeID, const int &depth,
                              ReturnStatus *rs, bool *instanceof) {
         return Answer::RecvDOMInstanceOf(ObjectId::deserialize(objId), prototypeID, depth, rs, instanceof);
@@ -194,19 +194,19 @@ class JavaScriptBase : public WrapperOwn
         return Base::SendClassName(objId.serialize(), result);
     }
 
     bool SendRegExpToShared(const ObjectId &objId, ReturnStatus *rs,
                             nsString *source, uint32_t *flags) {
         return Base::SendRegExpToShared(objId.serialize(), rs, source, flags);
     }
 
-    bool SendGetPropertyNames(const ObjectId &objId, const uint32_t &flags,
-                              ReturnStatus *rs, nsTArray<nsString> *names) {
-        return Base::SendGetPropertyNames(objId.serialize(), flags, rs, names);
+    bool SendGetPropertyKeys(const ObjectId &objId, const uint32_t &flags,
+                             ReturnStatus *rs, nsTArray<nsString> *names) {
+        return Base::SendGetPropertyKeys(objId.serialize(), flags, rs, names);
     }
     bool SendInstanceOf(const ObjectId &objId, const JSIID &iid,
                         ReturnStatus *rs, bool *instanceof) {
         return Base::SendInstanceOf(objId.serialize(), iid, rs, instanceof);
     }
     bool SendDOMInstanceOf(const ObjectId &objId, const int &prototypeID, const int &depth,
                            ReturnStatus *rs, bool *instanceof) {
         return Base::SendDOMInstanceOf(objId.serialize(), prototypeID, depth, rs, instanceof);
--- a/js/ipc/PJavaScript.ipdl
+++ b/js/ipc/PJavaScript.ipdl
@@ -37,17 +37,17 @@ both:
 
     prio(high) sync IsExtensible(uint64_t objId) returns (ReturnStatus rs, bool result);
     prio(high) sync CallOrConstruct(uint64_t objId, JSParam[] argv, bool construct) returns (ReturnStatus rs, JSVariant result, JSParam[] outparams);
     prio(high) sync HasInstance(uint64_t objId, JSVariant v) returns (ReturnStatus rs, bool has);
     prio(high) sync ObjectClassIs(uint64_t objId, uint32_t classValue) returns (bool result);
     prio(high) sync ClassName(uint64_t objId) returns (nsString name);
     prio(high) sync RegExpToShared(uint64_t objId) returns (ReturnStatus rs, nsString source, uint32_t flags);
 
-    prio(high) sync GetPropertyNames(uint64_t objId, uint32_t flags) returns (ReturnStatus rs, nsString[] names);
+    prio(high) sync GetPropertyKeys(uint64_t objId, uint32_t flags) returns (ReturnStatus rs, nsString[] names);
     prio(high) sync InstanceOf(uint64_t objId, JSIID iid) returns (ReturnStatus rs, bool instanceof);
     prio(high) sync DOMInstanceOf(uint64_t objId, int prototypeID, int depth) returns (ReturnStatus rs, bool instanceof);
 
     prio(high) sync IsCallable(uint64_t objId) returns (bool result);
     prio(high) sync IsConstructor(uint64_t objId) returns (bool result);
 
 parent:
     async __delete__();
--- a/js/ipc/WrapperAnswer.cpp
+++ b/js/ipc/WrapperAnswer.cpp
@@ -574,29 +574,29 @@ WrapperAnswer::RecvRegExpToShared(const 
     source->Assign(sourceStr);
 
     *flags = JS_GetRegExpFlags(cx, obj);
 
     return ok(rs);
 }
 
 bool
-WrapperAnswer::RecvGetPropertyNames(const ObjectId &objId, const uint32_t &flags,
-                                    ReturnStatus *rs, nsTArray<nsString> *names)
+WrapperAnswer::RecvGetPropertyKeys(const ObjectId &objId, const uint32_t &flags,
+                                   ReturnStatus *rs, nsTArray<nsString> *names)
 {
     AutoSafeJSContext cx;
     JSAutoRequest request(cx);
 
     RootedObject obj(cx, findObjectById(cx, objId));
     if (!obj)
         return fail(cx, rs);
 
     JSAutoCompartment comp(cx, obj);
 
-    LOG("%s.getPropertyNames()", ReceiverObj(objId));
+    LOG("%s.getPropertyKeys()", ReceiverObj(objId));
 
     AutoIdVector props(cx);
     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))
--- a/js/ipc/WrapperAnswer.h
+++ b/js/ipc/WrapperAnswer.h
@@ -49,18 +49,18 @@ class WrapperAnswer : public virtual Jav
                              const bool &construct, ReturnStatus *rs, JSVariant *result,
                              nsTArray<JSParam> *outparams);
     bool RecvHasInstance(const ObjectId &objId, const JSVariant &v, ReturnStatus *rs, bool *bp);
     bool RecvObjectClassIs(const ObjectId &objId, const uint32_t &classValue,
                            bool *result);
     bool RecvClassName(const ObjectId &objId, nsString *result);
     bool RecvRegExpToShared(const ObjectId &objId, ReturnStatus *rs, nsString *source, uint32_t *flags);
 
-    bool RecvGetPropertyNames(const ObjectId &objId, const uint32_t &flags,
-                              ReturnStatus *rs, nsTArray<nsString> *names);
+    bool RecvGetPropertyKeys(const ObjectId &objId, const uint32_t &flags,
+                             ReturnStatus *rs, nsTArray<nsString> *names);
     bool RecvInstanceOf(const ObjectId &objId, const JSIID &iid,
                         ReturnStatus *rs, bool *instanceof);
     bool RecvDOMInstanceOf(const ObjectId &objId, const int &prototypeID, const int &depth,
                            ReturnStatus *rs, bool *instanceof);
 
     bool RecvIsCallable(const ObjectId &objId, bool *result);
     bool RecvIsConstructor(const ObjectId &objId, bool *result);
 
--- a/js/ipc/WrapperOwner.cpp
+++ b/js/ipc/WrapperOwner.cpp
@@ -772,17 +772,17 @@ WrapperOwner::init()
 
 bool
 WrapperOwner::getPropertyKeys(JSContext *cx, HandleObject proxy, uint32_t flags, AutoIdVector &props)
 {
     ObjectId objId = idOf(proxy);
 
     ReturnStatus status;
     InfallibleTArray<nsString> names;
-    if (!SendGetPropertyNames(objId, flags, &status, &names))
+    if (!SendGetPropertyKeys(objId, flags, &status, &names))
         return ipcfail(cx);
 
     LOG_STACK();
 
     if (!ok(cx, status))
         return false;
 
     for (size_t i = 0; i < names.Length(); i++) {
--- a/js/ipc/WrapperOwner.h
+++ b/js/ipc/WrapperOwner.h
@@ -140,18 +140,18 @@ class WrapperOwner : public virtual Java
     virtual bool SendHasInstance(const ObjectId &objId, const JSVariant &v,
                                  ReturnStatus *rs, bool *bp) = 0;
     virtual bool SendObjectClassIs(const ObjectId &objId, const uint32_t &classValue,
                                    bool *result) = 0;
     virtual bool SendClassName(const ObjectId &objId, nsString *result) = 0;
     virtual bool SendRegExpToShared(const ObjectId &objId, ReturnStatus *rs, nsString *source,
                                     uint32_t *flags) = 0;
 
-    virtual bool SendGetPropertyNames(const ObjectId &objId, const uint32_t &flags,
-                                      ReturnStatus *rs, nsTArray<nsString> *names) = 0;
+    virtual bool SendGetPropertyKeys(const ObjectId &objId, const uint32_t &flags,
+                                     ReturnStatus *rs, nsTArray<nsString> *names) = 0;
     virtual bool SendInstanceOf(const ObjectId &objId, const JSIID &iid,
                                 ReturnStatus *rs, bool *instanceof) = 0;
     virtual bool SendDOMInstanceOf(const ObjectId &objId, const int &prototypeID, const int &depth,
                                    ReturnStatus *rs, bool *instanceof) = 0;
 
     virtual bool SendIsCallable(const ObjectId &objId, bool *result) = 0;
     virtual bool SendIsConstructor(const ObjectId &objId, bool *result) = 0;
 };