Bug 595668 - create XPCCallContext in XPC_NW_Construct (r=mrbkap)

--HG--
extra : rebase_source : a9fb4a39b56af90045f6055d31354c61cbc97a0d
This commit is contained in:
Luke Wagner 2010-09-20 18:23:04 -07:00
parent adfba421c2
commit 656da172a8

View File

@ -719,6 +719,13 @@ XPC_NW_Construct(JSContext *cx, uintN argc, jsval *vp)
return ThrowException(NS_ERROR_INVALID_ARG, cx);
}
XPCCallContext ccx(JS_CALLER, cx, obj, nsnull, JSID_VOID,
argc, JS_ARGV(cx, vp), vp);
if(!ccx.IsValid())
return JS_FALSE;
JS_ASSERT(obj == ccx.GetFlattenedJSObject());
nsresult rv = wrappedNative->GetScriptableInfo()->
GetCallback()->Construct(wrappedNative, cx, obj, argc, JS_ARGV(cx, vp), vp,
&retval);