1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Implement a threadsafe & revised version of http2PushedStream.

This commit is contained in:
wolfbeast
2019-07-18 17:52:46 +02:00
committed by Roy Tam
parent 71a6b780d9
commit 28e15ed590
9 changed files with 144 additions and 32 deletions
+12 -7
View File
@@ -1819,13 +1819,18 @@ nsHttpConnectionMgr::ProcessNewTransaction(nsHttpTransaction *trans)
trans->SetPendingTime();
Http2PushedStream *pushedStream = trans->GetPushedStream();
if (pushedStream) {
LOG((" ProcessNewTransaction %p tied to h2 session push %p\n",
trans, pushedStream->Session()));
return pushedStream->Session()->
AddStream(trans, trans->Priority(), false, nullptr) ?
NS_OK : NS_ERROR_UNEXPECTED;
RefPtr<Http2PushedStreamWrapper> pushedStreamWrapper =
trans->GetPushedStream();
if (pushedStreamWrapper) {
Http2PushedStream* pushedStream = pushedStreamWrapper->GetStream();
if (pushedStream) {
LOG((" ProcessNewTransaction %p tied to h2 session push %p\n", trans,
pushedStream->Session()));
return pushedStream->Session()->AddStream(trans, trans->Priority(), false,
nullptr)
? NS_OK
: NS_ERROR_UNEXPECTED;
}
}
nsresult rv = NS_OK;