Bug 8844105 - Handlify JS_WrapObject. r=terrence

This commit is contained in:
Tom Schuster
2013-10-15 20:02:23 -04:00
parent 6b448ec5aa
commit b6ee9f1bce
37 changed files with 100 additions and 99 deletions

View File

@@ -343,7 +343,7 @@ JS_NondeterministicGetWeakMapKeys(JSContext *cx, JSObject *objArg, JSObject **re
gc::AutoSuppressGC suppress(cx);
for (ObjectValueMap::Base::Range r = map->all(); !r.empty(); r.popFront()) {
RootedObject key(cx, r.front().key);
if (!JS_WrapObject(cx, key.address()))
if (!cx->compartment()->wrap(cx, &key))
return false;
if (!js_NewbornArrayPush(cx, arr, ObjectValue(*key)))
return false;