mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 22:04:36 +00:00
Bug 351007 Crash @ XPCWrappedNative::CallMethod passing null to out A*String parameters r+sr=jst
This commit is contained in:
parent
36908fc2d4
commit
5e726d585c
@ -1959,21 +1959,22 @@ XPCWrappedNative::CallMethod(XPCCallContext& ccx,
|
||||
// set 'src' to be the object from which we get the value and
|
||||
// prepare for out param
|
||||
|
||||
if((paramInfo.IsOut() || paramInfo.IsDipper()) &&
|
||||
!paramInfo.IsRetval() &&
|
||||
(JSVAL_IS_PRIMITIVE(argv[i]) ||
|
||||
!OBJ_GET_PROPERTY(ccx, JSVAL_TO_OBJECT(argv[i]),
|
||||
rt->GetStringID(XPCJSRuntime::IDX_VALUE),
|
||||
&src)))
|
||||
{
|
||||
ThrowBadParam(NS_ERROR_XPC_NEED_OUT_OBJECT, i, ccx);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if(paramInfo.IsOut())
|
||||
{
|
||||
dp->SetPtrIsData();
|
||||
dp->ptr = &dp->val;
|
||||
|
||||
if(!paramInfo.IsRetval() &&
|
||||
(JSVAL_IS_PRIMITIVE(argv[i]) ||
|
||||
!OBJ_GET_PROPERTY(ccx, JSVAL_TO_OBJECT(argv[i]),
|
||||
rt->GetStringID(XPCJSRuntime::IDX_VALUE),
|
||||
&src)))
|
||||
{
|
||||
ThrowBadParam(NS_ERROR_XPC_NEED_OUT_OBJECT, i, ccx);
|
||||
goto done;
|
||||
}
|
||||
|
||||
if(type.IsPointer() &&
|
||||
type_tag != nsXPTType::T_INTERFACE &&
|
||||
!paramInfo.IsShared())
|
||||
|
Loading…
x
Reference in New Issue
Block a user