diff --git a/mozilla/extensions/webservices/proxy/src/wspcallcontext.cpp b/mozilla/extensions/webservices/proxy/src/wspcallcontext.cpp index 5f23fe56f0f..977e75b0653 100644 --- a/mozilla/extensions/webservices/proxy/src/wspcallcontext.cpp +++ b/mozilla/extensions/webservices/proxy/src/wspcallcontext.cpp @@ -261,10 +261,6 @@ WSPCallContext::CallCompletionListener() rv = XPTC_InvokeByIndex(mAsyncListener, 3, 2, dispatchParams); } else if (response) { - // pre-fill the call context into param 0. - dispatchParams[0].val.p = NS_STATIC_CAST(nsIWebServiceCallContext*, this); - dispatchParams[0].SetValIsInterface(); - nsCOMPtr binding; rv = mOperation->GetBinding(getter_AddRefs(binding)); if (NS_FAILED(rv)) { @@ -407,6 +403,8 @@ WSPCallContext::CallCompletionListener() dispatchParams[paramIndex].val.p = NS_STATIC_CAST(nsIWebServiceCallContext*, this); dispatchParams[paramIndex].SetValIsInterface(); + dispatchParams[paramIndex].type.flags = + XPT_TDP_POINTER | TD_INTERFACE_TYPE; rv = XPTC_InvokeByIndex(mAsyncListener, mListenerMethodIndex, paramCount, dispatchParams); diff --git a/mozilla/extensions/webservices/proxy/src/wspproxy.cpp b/mozilla/extensions/webservices/proxy/src/wspproxy.cpp index 6b7e9921518..b678f9611ef 100644 --- a/mozilla/extensions/webservices/proxy/src/wspproxy.cpp +++ b/mozilla/extensions/webservices/proxy/src/wspproxy.cpp @@ -816,6 +816,11 @@ WSPProxy::VariantToInParameter(nsIInterfaceInfo* aInterfaceInfo, if (NS_FAILED(rv)) { return rv; } + + // Set the param's type on the XPTCVariant because xptcinvoke's + // invoke_copy_to_stack depends on it. This fixes bug 203434. + aXPTCVariant->type = type; + uint8 type_tag = type.TagPart(); nsCOMPtr iinfo; if (type.IsArray()) { diff --git a/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp b/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp index d432c8d28f4..a0b277d619b 100644 --- a/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp +++ b/mozilla/extensions/webservices/soap/src/nsSOAPMessage.cpp @@ -716,12 +716,12 @@ NS_IMETHODIMP break; nsSOAPUtils::GetNextSiblingElement(element, getter_AddRefs(next)); } - if (!NS_FAILED(rv)) { + if (NS_SUCCEEDED(rv)) { if (count) { parameters = (nsISOAPParameter * *)nsMemory::Realloc(parameters, - count * - sizeof(*parameters)); + count * + sizeof(*parameters)); } } else { @@ -734,12 +734,6 @@ NS_IMETHODIMP } *aCount = count; *aParameters = parameters; - if (count) { - parameters = - (nsISOAPParameter * *)nsMemory::Realloc(parameters, - count * - sizeof(*parameters)); - } return rv; }