mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1802471 - nsHttpChannel::MaybeResolveProxyAndBeginConnect should not call BeginConnect if the handler is not active. r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D163125
This commit is contained in:
parent
cfebc1bd3c
commit
4c64d1115a
@ -6018,7 +6018,15 @@ void nsHttpChannel::MaybeResolveProxyAndBeginConnect() {
|
||||
return;
|
||||
}
|
||||
|
||||
rv = BeginConnect();
|
||||
if (!gHttpHandler->Active()) {
|
||||
LOG(
|
||||
("nsHttpChannel::MaybeResolveProxyAndBeginConnect [this=%p] "
|
||||
"Handler no longer active.\n",
|
||||
this));
|
||||
rv = NS_ERROR_NOT_AVAILABLE;
|
||||
} else {
|
||||
rv = BeginConnect();
|
||||
}
|
||||
if (NS_FAILED(rv)) {
|
||||
CloseCacheEntry(false);
|
||||
Unused << AsyncAbort(rv);
|
||||
@ -6069,6 +6077,9 @@ nsresult nsHttpChannel::BeginConnect() {
|
||||
LOG(("nsHttpChannel::BeginConnect [this=%p]\n", this));
|
||||
nsresult rv;
|
||||
|
||||
// It is the caller's responsibility to not call us late in shutdown.
|
||||
MOZ_ASSERT(gHttpHandler->Active());
|
||||
|
||||
// Construct connection info object
|
||||
nsAutoCString host;
|
||||
nsAutoCString scheme;
|
||||
|
Loading…
Reference in New Issue
Block a user