Bug 1655843 - Call ProcessPendingQ wheen a Http3 connection has been connected. r=michal,necko-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D85201
This commit is contained in:
Dragana Damjanovic 2020-08-03 14:13:33 +00:00
Родитель 52146366d5
Коммит 1c2de69532
3 изменённых файлов: 32 добавлений и 0 удалений

Просмотреть файл

@ -396,6 +396,7 @@ nsresult Http3Session::ProcessEvents(uint32_t count) {
mState = CONNECTED;
SetSecInfo();
mSocketControl->HandshakeCompleted();
gHttpHandler->ConnMgr()->ReportHttp3Connection(mSegmentReaderWriter);
MaybeResumeSend();
break;
case Http3Event::Tag::GoawayReceived:

Просмотреть файл

@ -958,6 +958,35 @@ void nsHttpConnectionMgr::ReportSpdyConnection(nsHttpConnection* conn,
}
}
void nsHttpConnectionMgr::ReportHttp3Connection(HttpConnectionBase* conn) {
MOZ_ASSERT(OnSocketThread(), "not on socket thread");
if (!conn->ConnectionInfo()) {
return;
}
nsConnectionEntry* ent = mCT.GetWeak(conn->ConnectionInfo()->HashKey());
if (!ent) {
return;
}
mNumSpdyHttp3ActiveConns++;
UpdateCoalescingForNewConn(conn, ent);
nsresult rv = ProcessPendingQ(ent->mConnInfo);
if (NS_FAILED(rv)) {
LOG(
("ReportHttp3Connection conn=%p ent=%p "
"failed to process pending queue (%08x)\n",
conn, ent, static_cast<uint32_t>(rv)));
}
rv = PostEvent(&nsHttpConnectionMgr::OnMsgProcessAllSpdyPendingQ);
if (NS_FAILED(rv)) {
LOG(
("ReportHttp3Connection conn=%p ent=%p "
"failed to post event (%08x)\n",
conn, ent, static_cast<uint32_t>(rv)));
}
}
//-----------------------------------------------------------------------------
bool nsHttpConnectionMgr::DispatchPendingQ(
nsTArray<RefPtr<nsHttpConnectionMgr::PendingTransactionInfo>>& pendingQ,

Просмотреть файл

@ -107,6 +107,8 @@ class nsHttpConnectionMgr final : public HttpConnectionMgrShell,
// bit different.
void ReportSpdyConnection(nsHttpConnection*, bool usingSpdy);
void ReportHttp3Connection(HttpConnectionBase*);
bool GetConnectionData(nsTArray<HttpRetParams>*);
void ResetIPFamilyPreference(nsHttpConnectionInfo*);