gInstallCount++; if (gInstallCount == 1) updateGlobalCommands(); break; 
  onStateChange: function (aAddon, aState, aValue)  {    const nsIXPIProgressDialog = Components.interfaces.nsIXPIProgressDialog;    var element = this.getElementForAddon(aAddon);    if (!element && aState != nsIXPIProgressDialog.DIALOG_CLOSE)      return;    switch (aState) {      case nsIXPIProgressDialog.DOWNLOAD_START:        gInstallCount++;        if (gInstallCount == 1)          updateGlobalCommands();        break;      case nsIXPIProgressDialog.DOWNLOAD_DONE:      case nsIXPIProgressDialog.INSTALL_START:        break;      case nsIXPIProgressDialog.INSTALL_DONE:        gInstallCount--;        if (gInstallCount == 0)          updateGlobalCommands();        // From nsInstall.h        // SUCCESS        = 0        // REBOOT_NEEDED  = 999        // USER_CANCELLED = -210        if (aValue == 0 || aValue == 999 || aValue == -210)          break;        var xpinstallStrings = document.getElementById("xpinstallStrings");        try {          var msg = xpinstallStrings.getString("error" + aValue);        }        catch (e) {          msg = xpinstallStrings.getFormattedString("unknown.error", [aValue]);        }        var title = getExtensionString("errorInstallTitle");        var message = getExtensionString("errorInstallMsg", [getBrandShortName(),                                                             aAddon.xpiURL, msg]);        var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]                           .getService(Components.interfaces.nsIPromptService);        ps.alert(window, title, message + "\n" + aValue);        break;      case nsIXPIProgressDialog.DIALOG_CLOSE:        // Sort on startup and anytime an add-on is installed or upgraded.        gExtensionManager.sortTypeByProperty(nsIUpdateItem.TYPE_ADDON, "name", true);        // XXXrstrong - installs may be made compatible after this notification        // see bug 351819        // For updates on startup always enable the continue button after the        // update has completed.        if (gUpdatesOnly) {          setElementDisabledByID("cmd_continue", false);          document.getElementById("continueDialogButton").focus();        }        else          updateGlobalCommands();        break;    }  },
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/af532bd69f3b8d70c3aa6780021b70fe1e998002/extensions.js/buggy/toolkit/mozapps/extensions/content/extensions.js