diff --git a/java/xpcom/xpcom/bcXPCOMProxy.cpp b/java/xpcom/xpcom/bcXPCOMProxy.cpp index 8f5fb38ba887..ff8391cd4b02 100644 --- a/java/xpcom/xpcom/bcXPCOMProxy.cpp +++ b/java/xpcom/xpcom/bcXPCOMProxy.cpp @@ -153,9 +153,13 @@ NS_IMETHODIMP bcXPCOMProxy::CallMethod(PRUint16 methodIndex, } NS_IF_RELEASE(eventQ); bcIUnMarshaler * unmarshaler = call->GetUnMarshaler(); - mt->UnMarshal(unmarshaler); + nsresult result; + unmarshaler->ReadSimple(&result, bc_T_U32); + if (NS_SUCCEEDED(result)) { + mt->UnMarshal(unmarshaler); + } delete call; delete marshaler; delete unmarshaler; delete mt; - return NS_OK; + return result; } nsrefcnt bcXPCOMProxy::AddRef(void) { diff --git a/java/xpcom/xpcom/bcXPCOMStub.cpp b/java/xpcom/xpcom/bcXPCOMStub.cpp index a483b02607d2..4a2e5e5cf7e5 100644 --- a/java/xpcom/xpcom/bcXPCOMStub.cpp +++ b/java/xpcom/xpcom/bcXPCOMStub.cpp @@ -111,10 +111,12 @@ void bcXPCOMStub::DispatchAndSaveThread(bcICall *call, nsIEventQueue *eventQueue stubsAndProxiesService->PushEventQueue(eventQueue); //nb return value; excepion handling PR_LOG(log, PR_LOG_DEBUG, ("--bcXPCOMStub::DispatchAndSaveThreade about to XPTC_InvokeByIndex\n")); - XPTC_InvokeByIndex(object, mid, paramCount, params); + nsresult result = XPTC_InvokeByIndex(object, mid, paramCount, params); PR_LOG(log, PR_LOG_DEBUG, ("--bcXPCOMStub::DispatchAndSaveThreade after XPTC_InvokeByIndex\n")); - if (mt != NULL) { //nb to do what about nsresult ? - bcIMarshaler * m = call->GetMarshaler(); + bcIMarshaler * m = call->GetMarshaler(); + m->WriteSimple(&result, bc_T_U32); + if (NS_SUCCEEDED(result) + && mt != NULL) { PR_LOG(log, PR_LOG_DEBUG, ("--bcXPCOMStub::DispatchAndSaveThreade about to mt->Marshal\n")); mt->Marshal(m); delete m;