Bug 959787 - Handlify JS_Set* APIs r=terrence r=bz

This commit is contained in:
Jon Coppeard
2014-01-25 09:29:12 +00:00
parent 49faa76855
commit 3292d16e7e
9 changed files with 38 additions and 34 deletions

View File

@@ -430,6 +430,7 @@ JavaScriptParent::call(JSContext *cx, HandleObject proxy, const CallArgs &args)
if (outparams.Length() != outobjects.length())
return ipcfail(cx);
RootedObject obj(cx);
for (size_t i = 0; i < outparams.Length(); i++) {
// Don't bother doing anything for outparams that weren't set.
if (outparams[i].type() == JSParam::Tvoid_t)
@@ -440,7 +441,7 @@ JavaScriptParent::call(JSContext *cx, HandleObject proxy, const CallArgs &args)
if (!toValue(cx, outparams[i], &v))
return false;
JSObject *obj = &outobjects[i].toObject();
obj = &outobjects[i].toObject();
if (!JS_SetProperty(cx, obj, "value", v))
return false;
}