nsIMsgAsyncPrompter.queueAsyncAuthPrompt() prompts should auto-cancel upon shutdown?
Categories
(MailNews Core :: Networking: IMAP, task)
Tracking
(thunderbird_esr140 wontfix, thunderbird145 wontfix)
People
(Reporter: benc, Assigned: mkmelin)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
(Following on from Bug 1629669)
I don't think async prompts are cancelled when shutdown occurs.
Example:
The IMAP protocol thread calls nsImapIncomingServer::AsyncGetPassword() on the main thread to get a password. If the password is not set, this means popping up an async password prompt for the user (the IMAP protocol object is passed in as the listener - it implements nsIMsgAsyncPromptListener.
If shutdown occurs while the prompt is up, experience from Bug 1629669 suggests the listener is never informed. It should be!
Probably just by calling onPromptCanceled() on the listener.
For Bug 1629669 the proposed fix is to add an explicit check for shutdown, but really, the check for NS_MSG_PASSWORD_PROMPT_CANCELLED (set by the onPromptCanceled() handler) should be enough to break out of the loop.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
(In reply to Ben Campbell from comment #0)
(Following on from Bug 1629669)
I don't think async prompts are cancelled when shutdown occurs.
...
For Bug 1629669 the proposed fix is to add an explicit check for shutdown, but really, the check forNS_MSG_PASSWORD_PROMPT_CANCELLED(set by the onPromptCanceled() handler) should be enough to break out of the loop.
That is now the "implemented fix", correct? So, IS the NS_MSG_PASSWORD_PROMPT_CANCELLED (set by the onPromptCanceled() handler) enough to break out of the loop, as you inquired above? If so, is there a patch for that?
Comment 2•1 year ago
|
||
This has potential to kill or significantly reduce our #1 crash https://crash-stats.mozilla.org/topcrashers/?product=Thunderbird&version=128.5.0esr&_facets_size=200&_report_type=any
Comment 3•1 year ago
|
||
Hey Geoff, could your fix for bug 1934491 be used to address this? (#1 crash)
Comment 4•1 year ago
|
||
(In reply to Toby Pilling [:tobyp] from comment #3)
Hey Geoff, could your fix for bug 1934491 be used to address this? (#1 crash)
Footnote, bug 1934491 had two regressions reported.
| Assignee | ||
Comment 5•7 months ago
|
||
(In reply to Ben Campbell from comment #0)
I don't think async prompts are cancelled when shutdown occurs.
Seems they are though, at least now.
Was going to try have an "quit-application" observer while doing _promiseAuthPrompt() in run(). But, if I quit (from another window), that promise already gets resolved. So nothing to do I think.
But I'll attach the modernization I did while looking at this.
| Assignee | ||
Comment 6•7 months ago
|
||
Updated•7 months ago
|
| Assignee | ||
Updated•6 months ago
|
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/1fb337050145
Modernize MsgAsyncPrompter.sys.mjs. r=BenC
Comment 8•6 months ago
|
||
status-thunderbird145: --- → fixed
Target Milestone: --- → 146 Branch
Magnus, did you intend status-thunderbird145 to be wontfix?
| Assignee | ||
Comment 9•6 months ago
|
||
Yes, ended up with just cleanup in this bug. I could not reproduce the original issue.
Updated•5 months ago
|
Comment 10•5 months ago
|
||
No apparent change in beta crash rate, at least up to 146.0b2
Description
•