mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 658909 - Set args at XPCCallContext construct time in XPC_WN_GetterSetter. r=mrbkap
It's not clear to me why it's done this way, but it confuses our ability to determine during wrapper lookup whether we're doing a set or a get. This aligns the behavior with XPC_WN_CallMethod, including passing JSID_VOID for the name (which is safe because XPCCallContext explicitly special-cases JSID_VOID and doesn't call SetName in that case).
This commit is contained in:
parent
a0f79166c0
commit
ef68a202d1
@ -1441,7 +1441,7 @@ XPC_WN_GetterSetter(JSContext *cx, unsigned argc, jsval *vp)
|
||||
if (IS_SLIM_WRAPPER(obj) && !MorphSlimWrapper(cx, obj))
|
||||
return Throw(NS_ERROR_XPC_BAD_OP_ON_WN_PROTO, cx);
|
||||
|
||||
XPCCallContext ccx(JS_CALLER, cx, obj, funobj);
|
||||
XPCCallContext ccx(JS_CALLER, cx, obj, funobj, JSID_VOID, argc, JS_ARGV(cx, vp), vp);
|
||||
XPCWrappedNative* wrapper = ccx.GetWrapper();
|
||||
THROW_AND_RETURN_IF_BAD_WRAPPER(cx, wrapper);
|
||||
|
||||
@ -1451,7 +1451,6 @@ XPC_WN_GetterSetter(JSContext *cx, unsigned argc, jsval *vp)
|
||||
if (!XPCNativeMember::GetCallInfo(funobj, &iface, &member))
|
||||
return Throw(NS_ERROR_XPC_CANT_GET_METHOD_INFO, cx);
|
||||
|
||||
ccx.SetArgsAndResultPtr(argc, JS_ARGV(cx, vp), vp);
|
||||
if (argc && member->IsWritableAttribute()) {
|
||||
ccx.SetCallInfo(iface, member, true);
|
||||
JSBool retval = XPCWrappedNative::SetAttribute(ccx);
|
||||
|
Loading…
Reference in New Issue
Block a user