mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
b=141871 Releasing callback in nsNSSSocketInfo must be proxied.
r=javi sr=alecf
This commit is contained in:
parent
ac1bfbc0b2
commit
20d03f9370
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user