зеркало из https://github.com/mozilla/gecko-dev.git
bug 654201 - an idle persistent connection could be run with the wrong security callbacks r=honzab
This commit is contained in:
Родитель
97b8d83e6a
Коммит
e6a161640a
|
@ -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;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче