Open Bug 1088152 Opened 10 years ago Updated 2 years ago

Clean up shutdown observers in nsMsgSendLater

Categories

(MailNews Core :: Composition, defect)

defect

Tracking

(Not tracked)

People

(Reporter: Irving, Unassigned)

References

(Blocks 1 open bug)

Details

nsMsgSendLater.cpp registers several shutdown observers, for 'msg-shutdown', 'quit-application' and 'xpcom-shutdown'.

The observer for msg-shutdown doesn't appear to execute any code, so I'd suggest removing it except that there's a big pile of nsMsgShutdownService that might blow up if we do: http://dxr.mozilla.org/comm-central/source/mailnews/base/src/nsMsgMailSession.cpp#623

The observer for 'xpcom-shutdown' should really fire at profile-before-change, or maybe even profile-change-net-teardown if there's a chance this module could initiate network traffic between quit-application and this notification. See https://developer.mozilla.org/en-US/docs/Observer_Notifications#Application_shutdown
(In reply to :Irving Reid from comment #0)

> The observer for msg-shutdown doesn't appear to execute any code, so I'd
> suggest removing it except that there's a big pile of nsMsgShutdownService
> that might blow up if we do:
> http://dxr.mozilla.org/comm-central/source/mailnews/base/src/
> nsMsgMailSession.cpp#623

This appears to be:
Bug 397498 - Create a shutdown task manager for core mailnews.
https://wiki.mozilla.org/Thunderbird:ShutdownService

The only caller was introduced in:
http://hg.mozilla.org/comm-central/rev/8ef97925ead2
Part of bug 440794 Leverage Offline capabilities to make sending email appear faster - provide partial support to ensure we finish sending emails when sending in the background and exiting
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.