зеркало из https://github.com/mozilla/pjs.git
fixes bug 285991 "leak loading site from HTTPS" r=biesi sr=dbaron
This commit is contained in:
Родитель
130fb0d326
Коммит
ed46df60ea
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче