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 id27661
push usercbook@mozilla.com
push dateFri, 17 Oct 2014 14:25:58 +0000
treeherdermozilla-central@4e9c5f29fc5e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersefaust
bugs1083204
milestone36.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 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;