mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00
Bug 1820776: Cleanup H3Session r=kershaw,valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D171900
This commit is contained in:
parent
aa17c3a176
commit
74ba2fecf7
@ -1034,10 +1034,10 @@ void Http3Session::QueueStream(Http3StreamBase* stream) {
|
||||
void Http3Session::ProcessPending() {
|
||||
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
|
||||
|
||||
Http3StreamBase* stream;
|
||||
RefPtr<Http3StreamBase> stream;
|
||||
while ((stream = mQueuedStreams.PopFront())) {
|
||||
LOG3(("Http3Session::ProcessPending %p stream %p woken from queue.", this,
|
||||
stream));
|
||||
stream.get()));
|
||||
MOZ_ASSERT(stream->Queued());
|
||||
stream->SetQueued(false);
|
||||
mReadyForWrite.Push(stream);
|
||||
@ -1046,10 +1046,10 @@ void Http3Session::ProcessPending() {
|
||||
}
|
||||
|
||||
static void RemoveStreamFromQueue(Http3StreamBase* aStream,
|
||||
nsDeque<Http3StreamBase>& queue) {
|
||||
nsRefPtrDeque<Http3StreamBase>& queue) {
|
||||
size_t size = queue.GetSize();
|
||||
for (size_t count = 0; count < size; ++count) {
|
||||
Http3StreamBase* stream = queue.PopFront();
|
||||
RefPtr<Http3StreamBase> stream = queue.PopFront();
|
||||
if (stream != aStream) {
|
||||
queue.Push(stream);
|
||||
}
|
||||
@ -1408,12 +1408,12 @@ nsresult Http3Session::SendData(nsIUDPSocket* socket) {
|
||||
// to let the error be handled).
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
Http3StreamBase* stream = nullptr;
|
||||
RefPtr<Http3StreamBase> stream;
|
||||
|
||||
// Step 1)
|
||||
while (CanSandData() && (stream = mReadyForWrite.PopFront())) {
|
||||
LOG(("Http3Session::SendData call ReadSegments from stream=%p [this=%p]",
|
||||
stream, this));
|
||||
stream.get(), this));
|
||||
|
||||
rv = stream->ReadSegments();
|
||||
|
||||
|
@ -260,9 +260,9 @@ class Http3Session final : public nsAHttpTransaction, public nsAHttpConnection {
|
||||
nsRefPtrHashtable<nsPtrHashKey<nsAHttpTransaction>, Http3StreamBase>
|
||||
mStreamTransactionHash;
|
||||
|
||||
nsDeque<Http3StreamBase> mReadyForWrite;
|
||||
nsRefPtrDeque<Http3StreamBase> mReadyForWrite;
|
||||
nsTArray<RefPtr<Http3StreamBase>> mSlowConsumersReadyForRead;
|
||||
nsDeque<Http3StreamBase> mQueuedStreams;
|
||||
nsRefPtrDeque<Http3StreamBase> mQueuedStreams;
|
||||
|
||||
enum State {
|
||||
INITIALIZING,
|
||||
|
Loading…
x
Reference in New Issue
Block a user