Bug 351007 Crash @ XPCWrappedNative::CallMethod passing null to out A*String parameters r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@227030 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user