Open Bug 435058 Opened 16 years ago Updated 2 years ago

Create a shutdown-service for XPCOM

Categories

(Core :: XPCOM, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: nick.kreeger, Unassigned)

Details

A while back, I wrote an initial version of a shutdown service for the mailnews code (nsIMsgShutdownService). The service was useful for things that need to be done on application shutdown (like purge an IMAP folder, etc). 

After talking with some peers, we decided that the service would be beneficial to the platform - and not just mailnews specific.

There is one main issue with the shutdown service: On Linux and Windows, if a user clicks on the window close button, the XPCOM shutdown procedure does NOT fire a "quit-application-requested"...
I think we already have a well-done shutdown sequence... if we have bugs, like quit-application-requested not being fired, we should just fix them... how does this service differ?
In the example above, mailnews components can register for shutdown. Then when shutdown happens, the service iterates through the tasks asynchronously  and powers a UI dialog for it.
So this is actually about displaying a UI showing progress of tasks running during shutdown?
(In reply to comment #4)
> So this is actually about displaying a UI showing progress of tasks running
> during shutdown?
> 

Part of it, the service also delegates each task to complete it's task async.

http://mxr.mozilla.org/seamonkey/source/mailnews/base/src/nsMsgMailSession.cpp#521
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.