mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
fixes bug 285991 "leak loading site from HTTPS" r=biesi sr=dbaron
This commit is contained in:
parent
9791154211
commit
430b684e9c
@ -1529,6 +1529,13 @@ nsSocketTransport::OnSocketDetached(PRFileDesc *fd)
|
||||
mOutput.OnSocketReady(mCondition);
|
||||
}
|
||||
|
||||
// break any potential reference cycle between the security info object
|
||||
// and ourselves by resetting its notification callbacks object. see
|
||||
// bug 285991 for details.
|
||||
nsCOMPtr<nsISSLSocketControl> secCtrl = do_QueryInterface(mSecInfo);
|
||||
if (secCtrl)
|
||||
secCtrl->SetNotificationCallbacks(nsnull);
|
||||
|
||||
// finally, release our reference to the socket (must do this within
|
||||
// the transport lock) possibly closing the socket.
|
||||
{
|
||||
|
@ -257,6 +257,11 @@ nsNSSSocketInfo::GetNotificationCallbacks(nsIInterfaceRequestor** aCallbacks)
|
||||
NS_IMETHODIMP
|
||||
nsNSSSocketInfo::SetNotificationCallbacks(nsIInterfaceRequestor* aCallbacks)
|
||||
{
|
||||
if (!aCallbacks) {
|
||||
mCallbacks = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIProxyObjectManager> proxyman(do_GetService(NS_XPCOMPROXY_CONTRACTID));
|
||||
if (!proxyman)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user