mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-02 13:58:40 +09:00
Implement a threadsafe & revised version of http2PushedStream.
This commit is contained in:
parent
71a6b780d9
commit
28e15ed590
9 changed files with 144 additions and 32 deletions
|
|
@ -380,12 +380,24 @@ Http2Session::AddStream(nsAHttpTransaction *aHttpTransaction,
|
|||
|
||||
if (mClosed || mShouldGoAway) {
|
||||
nsHttpTransaction *trans = aHttpTransaction->QueryHttpTransaction();
|
||||
if (trans && !trans->GetPushedStream()) {
|
||||
LOG3(("Http2Session::AddStream %p atrans=%p trans=%p session unusable - resched.\n",
|
||||
this, aHttpTransaction, trans));
|
||||
aHttpTransaction->SetConnection(nullptr);
|
||||
gHttpHandler->InitiateTransaction(trans, trans->Priority());
|
||||
return true;
|
||||
if (trans) {
|
||||
RefPtr<Http2PushedStreamWrapper> pushedStreamWrapper;
|
||||
pushedStreamWrapper = trans->GetPushedStream();
|
||||
if (!pushedStreamWrapper || !pushedStreamWrapper->GetStream()) {
|
||||
LOG3(
|
||||
("Http2Session::AddStream %p atrans=%p trans=%p session unusable - "
|
||||
"resched.\n", this, aHttpTransaction, trans));
|
||||
aHttpTransaction->SetConnection(nullptr);
|
||||
nsresult rv =
|
||||
gHttpHandler->InitiateTransaction(trans, trans->Priority());
|
||||
if (NS_FAILED(rv)) {
|
||||
LOG3(
|
||||
("Http2Session::AddStream %p atrans=%p trans=%p failed to "
|
||||
"initiate transaction (%08x).\n",
|
||||
this, aHttpTransaction, trans, static_cast<uint32_t>(rv)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue