Remove stopgap MOZ_RUNINIT use in nsImapProtocol.cpp
Categories
(Thunderbird :: General, task)
Tracking
(Not tracked)
People
(Reporter: benc, Assigned: welpy-cw)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
After Bug 1920718, global vars that require construction must be explicitly flagged, and that was done in Bug 1928157.
But we shouldn't really have any such variables - constructing things before main() is always a little fraught.
The patch in Bug 1928157, D227403 can be used as a roadmap of what needs changing.
For IMAP, it's all stuff that looks like it should already be constant (static ints that are initialised using the contents of other statically-initialised ints).
| Assignee | ||
Comment 1•7 days ago
•
|
||
Remove the stopgap MOZ_RUNINIT annotation by making the IMAP wait durations
non-runtime-initialized constants. Store the durations as constexpr
second-based constants and convert them with PR_SecondsToInterval() at the
point of use.
- Keep the 60-second IMAP sleep and two-second IDLE delay as file-level constexpr constants, making the IDLE delay available for reuse.
- Convert the folder message and password waits through the same NSPR helper.
Also remove the unused FallbackToFetchWholeMsg() code left behind by the
nsImapBodyShell removal in Bug 1888569, along with an unused include and macro.
Updated•7 days ago
|
Updated•6 days ago
|
| Assignee | ||
Updated•5 days ago
|
Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/a31a077151c4
Remove stopgap MOZ_RUNINIT use in nsImapProtocol.cpp. r=BenC
Description
•