mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
Fix for random crashes caused by uninitialized XPCVariant type. Also, fixed an FMR. b=203434, r=dbardley@netscape.com, sr=jst@netscape.com, a=sspitzer@netscape.com
This commit is contained in:
parent
c7581e8286
commit
42426ec8f0
@ -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<nsIWSDLBinding> 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);
|
||||
|
@ -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<nsIInterfaceInfo> iinfo;
|
||||
if (type.IsArray()) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user