From d3e8d8b21fb1fbfbc555b2b3a8b2d2992dedcc21 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Sat, 16 Mar 2002 06:26:07 +0000 Subject: [PATCH] #70045 r=mkaply, sr=blizzard, a=asa OS/2 only - properly handle long longs in xptstubs to fix download problem --- .../reflect/xptcall/src/md/os2/xptcstubs_os2.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/xpcom/reflect/xptcall/src/md/os2/xptcstubs_os2.cpp b/xpcom/reflect/xptcall/src/md/os2/xptcstubs_os2.cpp index 264dd0f5b011..5e82257bb2c0 100644 --- a/xpcom/reflect/xptcall/src/md/os2/xptcstubs_os2.cpp +++ b/xpcom/reflect/xptcall/src/md/os2/xptcstubs_os2.cpp @@ -72,13 +72,17 @@ PrepareAndDispatch( nsXPTCStubBase *self, PRUint32 methodIndex, the stack where it was pushed */ if (paramCount) { args[0] = args[-4]; - } - /* If paramCount is > 1, write out the ECX pointer to the - space on the stack args[1]. args[-3] is the space on - the stack where it was pushed */ - if (paramCount > 1) { - args[1] = args[-3]; + /* If this is the second parameter, or if the first parameter is an + 8 byte long long, write out the ECX pointer to the space on the + stack args[1]. args[-3] is the space on the stack where it was + pushed */ + nsXPTType type = info->GetParam(0).GetType(); + if( paramCount > 1 || + type == nsXPTType::T_I64 || type == nsXPTType::T_U64 ) + { + args[1] = args[-3]; + } } #endif