b=141871 Releasing callback in nsNSSSocketInfo must be proxied.

r=javi sr=alecf
This commit is contained in:
kaie%netscape.com 2002-05-07 09:35:00 +00:00
parent ac1bfbc0b2
commit 20d03f9370

View File

@ -239,7 +239,18 @@ nsNSSSocketInfo::GetNotificationCallbacks(nsIInterfaceRequestor** aCallbacks)
NS_IMETHODIMP NS_IMETHODIMP
nsNSSSocketInfo::SetNotificationCallbacks(nsIInterfaceRequestor* aCallbacks) nsNSSSocketInfo::SetNotificationCallbacks(nsIInterfaceRequestor* aCallbacks)
{ {
mCallbacks = aCallbacks; nsCOMPtr<nsIProxyObjectManager> proxyman(do_GetService(NS_XPCOMPROXY_CONTRACTID));
if (!proxyman)
return NS_ERROR_FAILURE;
nsCOMPtr<nsIInterfaceRequestor> proxiedCallbacks;
proxyman->GetProxyForObject(NS_UI_THREAD_EVENTQ,
NS_GET_IID(nsIInterfaceRequestor),
NS_STATIC_CAST(nsIInterfaceRequestor*,aCallbacks),
PROXY_SYNC,
getter_AddRefs(proxiedCallbacks));
mCallbacks = proxiedCallbacks;
return NS_OK; return NS_OK;
} }