Open Bug 1732775 Opened 3 years ago Updated 3 years ago

ChannelWrapper and nsIHttpChannel are different meanings/values for suspend/resume

Categories

(WebExtensions :: Request Handling, defect, P3)

defect
Points:
3

Tracking

(Not tracked)

People

(Reporter: mixedpuppy, Unassigned)

References

Details

(Whiteboard: [addons-jira])

ChannelWrapper uses a boolean to keep itself from doing repeat calls to nsIHttpChannel suspend/resume. However, it also returns that flag in ChannelWrapper::Suspended.

nsHttpChannel uses a counter (mSuspendCount) for repeat calls to suspend/resume.

Anyone with channel access can suspend/resume, and if that is followed with a ChannelWrapper:Suspended call, the result will not be accurate.

If any ChannelWrapper code depends (now or in the future) on ChannelWrapper:Suspended or its internal mSuspended member as a reliable indication that the channel is suspended, it could be operating incorrectly.

If any consumer of ChannelWrapper expects that the channel is suspended or resumed by using channel wrapper, there is a non-zero chance that it is incorrect.

This is documented in the webidl.

My concern is that mSuspended could get used in the future for something under the assumption that it reflects the state of the underlying channel.

The severity field is not set for this bug.
:mixedpuppy, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mixedpuppy)
Severity: -- → S3
Flags: needinfo?(mixedpuppy)
Priority: -- → P3
Whiteboard: [addons-jira]
Points: --- → 3
You need to log in before you can comment on or make changes to this bug.