author | Bobby Holley <bobbyholley@gmail.com> |
Fri, 25 Nov 2011 17:09:07 -0800 | |
changeset 82433 | 74a834deb8a22ab5b9d9bd5c25983b7381b7cf39 |
parent 82432 | 206075dcdf40dd80588fa6676b692e278ca3f86b |
child 82434 | d7e55d8251a62eb606c64cae0dfe07eef0320cec |
push id | 519 |
push user | akeybl@mozilla.com |
push date | Wed, 01 Feb 2012 00:38:35 +0000 |
treeherder | mozilla-beta@788ea1ef610b [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | mrbkap |
bugs | 692342 |
milestone | 11.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -2727,35 +2727,35 @@ CallMethodHelper::ConvertDependentParam( bool isSizedString = isArray ? JS_FALSE : type.TagPart() == nsXPTType::T_PSTRING_SIZE_IS || type.TagPart() == nsXPTType::T_PWSTRING_SIZE_IS; nsXPTCVariant* dp = GetDispatchParam(i); dp->type = type; - // Specify the correct storage/calling semantics. - if (paramInfo.IsIndirect()) - dp->SetIndirect(); - if (isArray) { if (NS_FAILED(mIFaceInfo->GetTypeForParam(mVTableIndex, ¶mInfo, 1, &datum_type))) { Throw(NS_ERROR_XPC_CANT_GET_ARRAY_INFO, mCallContext); return JS_FALSE; } - if (datum_type.IsPointer()) - dp->SetValNeedsCleanup(); } else { datum_type = type; } - if (datum_type.IsInterfacePointer()) { + // Specify the correct storage/calling semantics. + if (paramInfo.IsIndirect()) + dp->SetIndirect(); + + if (isArray && datum_type.IsPointer()) dp->SetValNeedsCleanup(); - } + + if (datum_type.IsInterfacePointer()) + dp->SetValNeedsCleanup(); // Even if there's nothing to convert, we still need to examine the // JSObject container for out-params. If it's null or otherwise invalid, // we want to know before the call, rather than after. // // This is a no-op for 'in' params. jsval src; if (!GetOutParamSource(i, &src))