mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1522210 - Fingerprinting and cryptomining classifiers must have separate nsIWebProgressListener blocking state codes - part 2 - rename variables in nsHttpChannel, r=ehsan
Differential Revision: https://phabricator.services.mozilla.com/D17664
This commit is contained in:
parent
43a5f36077
commit
3386d20a2c
@ -328,7 +328,7 @@ nsHttpChannel::nsHttpChannel()
|
||||
mStronglyFramed(false),
|
||||
mUsedNetwork(0),
|
||||
mAuthConnectionRestartable(0),
|
||||
mTrackingProtectionCancellationPending(0),
|
||||
mChannelClassifierCancellationPending(0),
|
||||
mAsyncResumePending(0),
|
||||
mPushedStream(nullptr),
|
||||
mLocalBlocklist(false),
|
||||
@ -6051,7 +6051,7 @@ nsHttpChannel::CancelForTrackingProtection() {
|
||||
if (mSuspendCount) {
|
||||
LOG(("Waiting until resume in Cancel [this=%p]\n", this));
|
||||
MOZ_ASSERT(!mCallOnResume);
|
||||
mTrackingProtectionCancellationPending = 1;
|
||||
mChannelClassifierCancellationPending = 1;
|
||||
mCallOnResume = [](nsHttpChannel *self) {
|
||||
self->HandleContinueCancelledByTrackingProtection();
|
||||
return NS_OK;
|
||||
@ -6062,7 +6062,7 @@ nsHttpChannel::CancelForTrackingProtection() {
|
||||
// Check to see if we should redirect this channel elsewhere by
|
||||
// nsIHttpChannel.redirectTo API request
|
||||
if (mAPIRedirectToURI) {
|
||||
mTrackingProtectionCancellationPending = 1;
|
||||
mChannelClassifierCancellationPending = 1;
|
||||
return AsyncCall(&nsHttpChannel::HandleAsyncAPIRedirect);
|
||||
}
|
||||
|
||||
@ -6092,10 +6092,10 @@ void nsHttpChannel::ContinueCancelledByTrackingProtection() {
|
||||
}
|
||||
|
||||
nsresult nsHttpChannel::CancelInternal(nsresult status) {
|
||||
bool trackingProtectionCancellationPending =
|
||||
!!mTrackingProtectionCancellationPending;
|
||||
bool channelClassifierCancellationPending =
|
||||
!!mChannelClassifierCancellationPending;
|
||||
if (UrlClassifierFeatureFactory::IsClassifierBlockingErrorCode(status)) {
|
||||
mTrackingProtectionCancellationPending = 0;
|
||||
mChannelClassifierCancellationPending = 0;
|
||||
}
|
||||
|
||||
mCanceled = true;
|
||||
@ -6111,9 +6111,9 @@ nsresult nsHttpChannel::CancelInternal(nsresult status) {
|
||||
mRequestContext->CancelTailedRequest(this);
|
||||
CloseCacheEntry(false);
|
||||
Unused << AsyncAbort(status);
|
||||
} else if (trackingProtectionCancellationPending) {
|
||||
} else if (channelClassifierCancellationPending) {
|
||||
// If we're coming from an asynchronous path when canceling a channel due
|
||||
// to tracking protection, we need to AsyncAbort the channel now.
|
||||
// to safe-browsing protection, we need to AsyncAbort the channel now.
|
||||
Unused << AsyncAbort(status);
|
||||
}
|
||||
return NS_OK;
|
||||
@ -6635,10 +6635,10 @@ nsresult nsHttpChannel::BeginConnectActual() {
|
||||
|
||||
AUTO_PROFILER_LABEL("nsHttpChannel::BeginConnectActual", NETWORK);
|
||||
|
||||
if (mTrackingProtectionCancellationPending) {
|
||||
if (mChannelClassifierCancellationPending) {
|
||||
LOG(
|
||||
("Waiting for tracking protection cancellation in BeginConnectActual "
|
||||
"[this=%p]\n",
|
||||
("Waiting for safe-browsing protection cancellation in "
|
||||
"BeginConnectActual [this=%p]\n",
|
||||
this));
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -679,10 +679,10 @@ class nsHttpChannel final : public HttpBaseChannel,
|
||||
// the next authentication request can be sent on a whole new connection
|
||||
uint32_t mAuthConnectionRestartable : 1;
|
||||
|
||||
// True if the channel classifier has marked the channel to be cancelled
|
||||
// due to the tracking protection rules, but the asynchronous cancellation
|
||||
// True if the channel classifier has marked the channel to be cancelled due
|
||||
// to the safe-browsing classifier rules, but the asynchronous cancellation
|
||||
// process hasn't finished yet.
|
||||
uint32_t mTrackingProtectionCancellationPending : 1;
|
||||
uint32_t mChannelClassifierCancellationPending : 1;
|
||||
|
||||
// True only when we are between Resume and async fire of mCallOnResume.
|
||||
// Used to suspend any newly created pumps in mCallOnResume handler.
|
||||
|
Loading…
Reference in New Issue
Block a user