Verify if we can bail out earlier from nsHttpChannel::BeginConnect in case of shutdown
Categories
(Core :: Networking: HTTP, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox109 | --- | fixed |
People
(Reporter: jstutte, Assigned: jstutte)
References
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file)
In bug 1768581 we've seen that a late creation after net-teardown of an HTTP channel can lead to an unnecessary initialization of the cookie DB (and who knows what else) before it actually refuses to work.
The very beginning of nsHttpChannel::BeginConnect
might be the right place to add an AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownNetTeardown)
check and bail out with an error in case (which?).
Assignee | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #0)
In bug 1768581 we've seen that a late creation after net-teardown of an HTTP channel can lead to an unnecessary initialization of the cookie DB (and who knows what else) before it actually refuses to work.
The very beginning of
nsHttpChannel::BeginConnect
might be the right place to add anAppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownNetTeardown)
check and bail out with an error in case (which?).
I think we can check gHttpHandler->Active()
before calling BeginConnect
.
Assignee | ||
Comment 2•1 year ago
|
||
Ah, sure, that might work as well. There is a slight difference in time, AppShutdown::IsInOrBeyond(ShutdownPhase::AppShutdownNetTeardown)
triggers as soon as we enter that shutdown phase, while gHttpHandler->Active()
is flipped as consequence of the net-teardown notification. I assume that there are not many listeners to net-teardown, so the difference is probably neglect-able here and it seems wise to use your existing infrastructure for this.
Assignee | ||
Comment 3•1 year ago
|
||
First try push. There might be something to investigate...
Updated•1 year ago
|
Assignee | ||
Comment 4•1 year ago
|
||
Assignee | ||
Comment 5•1 year ago
|
||
(In reply to Jens Stutte [:jstutte] from comment #3)
First try push. There might be something to investigate...
Just some intermittent failures, hopefully. I am curious about those WPT leaks in a service worker test, but might just land as is.
Pushed by jstutte@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7cb2bf89ee90 nsHttpChannel::MaybeResolveProxyAndBeginConnect should not call BeginConnect if the handler is not active. r=necko-reviewers,kershaw
Comment 7•1 year ago
|
||
bugherder |
Description
•