Changes

Jump to: navigation, search

XPCOM Shutdown

485 bytes added, 19:04, 28 February 2012
add profile notifications
This page describes the startup and shutdown sequence of XUL apps. The goal: of these notifications is to cleanly shut down XPCOM components, including component loaders, so that all cross-module references are cleaned up start and quit the component DLLs can be unloaded. The problems: the current "xpcom-shutdown" notification is not sufficient because component loaders cannot unload until all their loaded components are first unloadedapplication quickly with as little indeterminate behavior as possible. In addition GC does not happen until very latedebug builds, while we're in the middle of destroying the component managerapp should shut down cleanly so automated tools can verify that there are no leaksBug: {{bug|316414}}
== Terms ==
<th>Step
<th>Description
<td>Profile State
<th>Main Event Queue
<th>Component Manager
<th>Function calls across components
<th>Notes
 
<tr>
<th><tt>profile-change-net-teardown</tt> notification
<td rowspan="3">Notification(s) that any unsaved user data should be saved
<td rowspan="3">Profile access allowed
<td rowspan="8">Events accepted
<td rowspan="9">All calls allowed
<td rowspan="11">Calls across components allowed
<td><em>bsmedberg note: other than historical momentum, I don't think we need three separate notifications.</em>
 
<tr>
<th><tt>profile-change-teardown</tt> notification
 
<tr>
<th><tt>profile-before-change</tt> notification
<td><em>After this notification, release builds will _exit()!</em>
<tr>
<th><tt>xpcom-will-shutdown</tt> notification
<td>Notification of the coming xpcom shutdown... during this topic observers can mark themselves as being destroyed, but they must not spin event loop. <td rowspan="510">Events accepted <td rowspan="6">All calls No profile access allowed <td>No event loop spinningThis description is unclear; there is only one consumer of this notification: the appshell service prevents new windows from opening after it is delivered.
<tr>
<th><tt>xpcom-shutdown</tt> notification
<td>Initial notification of xpcom shutdown... during this observer topic all primary modules should begin shutdown and should release any root references.
<td rowspan="7">Calls across components allowed
<tr>
Confirm, emeritus
1,217
edits

Navigation menu