Bug 1883626 - Avoid race between HttpChannelParent::Delete and HttpChannelParent...
commit34b7da2258e93ed589148b497bb2b0abfaf5664c
authorValentin Gosu <valentin.gosu@gmail.com>
Sun, 10 Mar 2024 09:41:49 +0000 (10 09:41 +0000)
committerValentin Gosu <valentin.gosu@gmail.com>
Sun, 10 Mar 2024 09:41:49 +0000 (10 09:41 +0000)
tree1e1444ad2ac92d25f1fc59471480047636220ef5
parenta379682ede0164bc7f76f8b87acffe9dc1281756
Bug 1883626 - Avoid race between HttpChannelParent::Delete and HttpChannelParent::SendRedirectFailed r=necko-reviewers,kershaw

When HttpChannelParent::OnRedirectResult is called with an error code,
CompleteRedirect would end up calling SendRedirectFailed, then soon after
we'd call redirectChannel->Delete()

RecvRedirectFailed() then calls mRedirectChannelChild->Cancel() which races
against the Delete called by the main proces.

Differential Revision: https://phabricator.services.mozilla.com/D203601
modules/libpref/init/StaticPrefList.yaml
netwerk/protocol/http/HttpChannelParent.cpp