Changes

Jump to: navigation, search

Background Updates

1,661 bytes added, 23:05, 17 October 2011
Firefox startup
* If the manifest file is found, Firefox looks for the known <code>FIREFOX_NEW</code> directory. If that directory is not found, Firefox removes the manifest file and continues to startup as normal.
* If the <code>FIREFOX_NEW</code> is found, Firefox "replaces" the existing installation direcotry with the new <code>FIREFOX_NEW</code> directory, and removes the <code>FIREFOX_NEW</code> directory, and restarts using the new binary. The details of this phase depends on the platform, and is documented below.
 
== Replacing the existing installation ==
=== Windows ===
On Windows, it is not possible to remove or rename files and directories which are being used. In order to handle this, we need to add a little complexity.
 
* The Firefox executable will launch a helper application copied to somewhere outside of the installation directory, most likely the system's temporary directory.
* The helper application renames the existing installation directory to a new directory with ".tmp" appended to its path name. If the rename operation fails in the middle of the operation because of a File being open by another application, it reverts the change.
* If the first rename is successful, the helper app renames the <code>FIREFOX_NEW</code> directory to the name of the existing installation. If something goes wrong in this phase, the <code>FIREFOX_NEW</code> directory and the one created in this phase are both removed and the ".tmp" directory is restored back to the state it was before the helper application was launched.
* If the previous operation was successful, the helper app removes the ".tmp" diectory.
* At the end of its run, the helper app relaunches Firefox from the path name of the existing installation, whatever it was.
 
=== Mac ===
On Mac, we basically copy the Contents directory in the <code>FIREFOX_NEW</code> directory over to the Contents directory in the existing installation, remove the manifest file and the now empty <code>FIREFOX_NEW</code> directory, and restart Firefox.
 
=== Linux ===
On Linux, we basically copy the <code>FIREFOX_NEW</code> over the existing installation directory, remove the manifest file, and restart Firefox.
Confirm
657
edits

Navigation menu