bug 654201 - an idle persistent connection could be run with the wrong security callbacks r=honzab

This commit is contained in:
Patrick McManus 2011-05-13 13:28:30 -07:00
Родитель 97b8d83e6a
Коммит e6a161640a
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -150,6 +150,18 @@ nsHttpConnection::Activate(nsAHttpTransaction *trans, PRUint8 caps)
NS_ENSURE_ARG_POINTER(trans); NS_ENSURE_ARG_POINTER(trans);
NS_ENSURE_TRUE(!mTransaction, NS_ERROR_IN_PROGRESS); NS_ENSURE_TRUE(!mTransaction, NS_ERROR_IN_PROGRESS);
// Update security callbacks
nsCOMPtr<nsIInterfaceRequestor> callbacks;
nsCOMPtr<nsIEventTarget> callbackTarget;
trans->GetSecurityCallbacks(getter_AddRefs(callbacks),
getter_AddRefs(callbackTarget));
if (callbacks != mCallbacks) {
mCallbacks.swap(callbacks);
if (callbacks)
NS_ProxyRelease(mCallbackTarget, callbacks);
mCallbackTarget = callbackTarget;
}
// take ownership of the transaction // take ownership of the transaction
mTransaction = trans; mTransaction = trans;