mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Backed out changeset c92d26145221 (bug 1769635) for causing assertion failures HttpBaseChannel.h. CLOSED TREE
This commit is contained in:
parent
4a67cb0362
commit
bfc8cd0834
@ -23,10 +23,9 @@ function checkTestsDone() {
|
||||
}
|
||||
var script = SpecialPowers.loadChromeScript(() => {
|
||||
/* eslint-env mozilla/chrome-script */
|
||||
let counter = 0;
|
||||
Services.obs.addObserver(function onExamResp(subject, topic, data) {
|
||||
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
|
||||
if (!channel.URI.spec.startsWith("https://example.com") || counter >= 2) {
|
||||
if (!channel.URI.spec.startsWith("https://example.com")) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -38,7 +37,6 @@ var script = SpecialPowers.loadChromeScript(() => {
|
||||
refererHeaderSet = false;
|
||||
}
|
||||
ok(!refererHeaderSet, "the referer header should not be set");
|
||||
counter++;
|
||||
sendAsyncMessage("checked-referer-header");
|
||||
}, "http-on-stop-request");
|
||||
});
|
||||
|
@ -392,9 +392,9 @@ SheetLoadData::SheetLoadData(
|
||||
}
|
||||
|
||||
SheetLoadData::~SheetLoadData() {
|
||||
MOZ_RELEASE_ASSERT(mSheetCompleteCalled || mIntentionallyDropped,
|
||||
"Should always call SheetComplete, except when "
|
||||
"dropping the load");
|
||||
MOZ_DIAGNOSTIC_ASSERT(mSheetCompleteCalled || mIntentionallyDropped,
|
||||
"Should always call SheetComplete, except when "
|
||||
"dropping the load");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -5653,10 +5653,6 @@ nsresult nsHttpChannel::CancelInternal(nsresult status) {
|
||||
&mTransactionTimings, std::move(mSource));
|
||||
}
|
||||
|
||||
// If we don't have mTransactionPump and mCachePump, we need to call
|
||||
// AsyncAbort to make sure this channel's listener got notified.
|
||||
bool needAsyncAbort = !mTransactionPump && !mCachePump;
|
||||
|
||||
if (mProxyRequest) mProxyRequest->Cancel(status);
|
||||
CancelNetworkRequest(status);
|
||||
mCacheInputStream.CloseAndRelease();
|
||||
@ -5667,19 +5663,10 @@ nsresult nsHttpChannel::CancelInternal(nsresult status) {
|
||||
mOnTailUnblock = nullptr;
|
||||
mRequestContext->CancelTailedRequest(this);
|
||||
CloseCacheEntry(false);
|
||||
needAsyncAbort = false;
|
||||
Unused << AsyncAbort(status);
|
||||
} else if (channelClassifierCancellationPending) {
|
||||
// If we're coming from an asynchronous path when canceling a channel due
|
||||
// to safe-browsing protection, we need to AsyncAbort the channel now.
|
||||
needAsyncAbort = false;
|
||||
Unused << AsyncAbort(status);
|
||||
}
|
||||
|
||||
// If we already have mCallOnResume, AsyncAbort will be called in
|
||||
// ResumeInternal.
|
||||
if (needAsyncAbort && !mCallOnResume) {
|
||||
CloseCacheEntry(false);
|
||||
Unused << AsyncAbort(status);
|
||||
}
|
||||
return NS_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user