 var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var windows = wm.getEnumerator(null); while (windows.hasMoreElements()) { var win = windows.getNext(); if (("tryToClose" in win) && !win.tryToClose()) return; } 
function restartApp() {  const nsIAppStartup = Components.interfaces.nsIAppStartup;  // Notify all windows that an application quit has been requested.  var os = Components.classes["@mozilla.org/observer-service;1"]                     .getService(Components.interfaces.nsIObserverService);  var cancelQuit = Components.classes["@mozilla.org/supports-PRBool;1"]                             .createInstance(Components.interfaces.nsISupportsPRBool);  os.notifyObservers(cancelQuit, "quit-application-requested", null);  // Something aborted the quit process.   if (cancelQuit.data)    return;  // Notify all windows that an application quit has been granted.  os.notifyObservers(null, "quit-application-granted", null);  // Enumerate all windows and call shutdown handlers  var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]                     .getService(Components.interfaces.nsIWindowMediator);  var windows = wm.getEnumerator(null);  while (windows.hasMoreElements()) {    var win = windows.getNext();    if (("tryToClose" in win) && !win.tryToClose())      return;  }  Components.classes["@mozilla.org/toolkit/app-startup;1"].getService(nsIAppStartup)            .quit(nsIAppStartup.eRestart | nsIAppStartup.eAttemptQuit);}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/09aeed6d3936774d55ecb969a7d76e81306e995d/list.js/buggy/toolkit/mozapps/extensions/content/list.js