Bug 1083204 - Handlify js::GetPropertyKeys and Snapshot. r=efaust.
authorJason Orendorff <jorendorff@mozilla.com>
Mon, 13 Oct 2014 14:20:13 -0500
changeset 210818 9702f1f2f133d0869e3b1bce831eeadcc745330a
parent 210817 a2458d9afc8167382d14066bd804689e6e401e22
child 210819 38939f7bff4dfae923a2bb3e9e0d0081f46d9eaa
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersefaust
bugs1083204
milestone36.0a1
Bug 1083204 - Handlify js::GetPropertyKeys and Snapshot. r=efaust.
js/src/jsfriendapi.h
js/src/jsiter.cpp
--- 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)
-GetPropertyKeys(JSContext *cx, JSObject *obj, unsigned flags, JS::AutoIdVector *props);
+GetPropertyKeys(JSContext *cx, JS::HandleObject 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
@@ -266,17 +266,17 @@ struct SortComparatorIds
         *lessOrEqualp = (result <= 0);
         return true;
     }
 };
 
 #endif /* JS_MORE_DETERMINISTIC */
 
 static bool
-Snapshot(JSContext *cx, JSObject *pobj_, unsigned flags, AutoIdVector *props)
+Snapshot(JSContext *cx, HandleObject pobj_, unsigned flags, AutoIdVector *props)
 {
     IdSet ht(cx);
     if (!ht.init(32))
         return false;
 
     RootedObject pobj(cx, pobj_);
 
     do {
@@ -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::GetPropertyKeys(JSContext *cx, JSObject *obj, unsigned flags, AutoIdVector *props)
+js::GetPropertyKeys(JSContext *cx, HandleObject obj, unsigned flags, AutoIdVector *props)
 {
     return Snapshot(cx, obj,
                     flags & (JSITER_OWNONLY | JSITER_HIDDEN | JSITER_SYMBOLS | JSITER_SYMBOLSONLY),
                     props);
 }
 
 size_t sCustomIteratorCount = 0;