SF 169946 Event Proxy leaves thread attached to VM when id of callback not recognized
This commit is contained in:
@@ -30,6 +30,10 @@
|
|||||||
<td width="13%" valign="top">1465539</td>
|
<td width="13%" valign="top">1465539</td>
|
||||||
<td width="87%" valign="top">(pre-release 1) IEnumVariant leak fixed in patch 1674179</td>
|
<td width="87%" valign="top">(pre-release 1) IEnumVariant leak fixed in patch 1674179</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td width="13%" valign="top">1699946 </td>
|
||||||
|
<td width="87%" valign="top">(pre-release 5) Unrecognized event callback id leaves thread attached to VM when ComFailException is thrown.</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="13%" valign="top"> </td>
|
<td width="13%" valign="top"> </td>
|
||||||
<td width="87%" valign="top"> </td>
|
<td width="87%" valign="top"> </td>
|
||||||
|
|||||||
@@ -139,6 +139,12 @@ STDMETHODIMP EventProxy::Invoke(DISPID dispID, REFIID riid,
|
|||||||
eventMethodName = W2A((OLECHAR *)MethName[i]);
|
eventMethodName = W2A((OLECHAR *)MethName[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// added 1.12
|
||||||
|
if (!eventMethodName) {
|
||||||
|
// just bail if can't find signature. no need to attach
|
||||||
|
// printf("Invoke: didn't find method name for dispatch id %d\n",dispID);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
if (DISPATCH_METHOD & wFlags)
|
if (DISPATCH_METHOD & wFlags)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -153,11 +159,12 @@ STDMETHODIMP EventProxy::Invoke(DISPID dispID, REFIID riid,
|
|||||||
|
|
||||||
if (!eventMethodName)
|
if (!eventMethodName)
|
||||||
{
|
{
|
||||||
// user did not implement this method
|
// could not find this signature in list
|
||||||
// printf("Invoke: didn't find method name\n");
|
// printf("Invoke: didn't find method name for dispatch id %d\n",dispID);
|
||||||
|
// this probably leaves a native thread attached to the vm when we don't want it
|
||||||
ThrowComFail(env, "Event method received was not defined as part of callback interface", -1);
|
ThrowComFail(env, "Event method received was not defined as part of callback interface", -1);
|
||||||
|
|
||||||
// should we detatch before returning?? The old code didn't but I don't see why not.
|
// should we detatch before returning?? We probably never get here if we ThrowComFail()
|
||||||
// jvm->DetachCurrentThread();
|
// jvm->DetachCurrentThread();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user