rem: var appShell = Components.classes['@mozilla.org/appshell/appShellService;1'].getService(); appShell = appShell.QueryInterface( Components.interfaces.nsIAppShellService ); 
context: function goQuitApplication(){  var ObserverService = Components.classes["@mozilla.org/observer-service;1"].getService();  ObserverService = ObserverService.QueryInterface(Components.interfaces.nsIObserverService);  if (ObserverService)  {    try    {      ObserverService.Notify(null, "quit-application", null);    }    catch (ex)    {      // dump("no observer found \n");    }  }  var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService();  var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);  var enumerator = windowManagerInterface.getEnumerator( null );  while ( enumerator.hasMoreElements()  )  {    var  windowToClose = enumerator.getNext();    var domWindow = windowManagerInterface.convertISupportsToDOMWindow( windowToClose );    if (!("tryToClose" in domWindow))    {      // dump(" window.close \n");      domWindow.close();    }    else    {      // dump(" try to close \n" );      if ( !domWindow.tryToClose() )        return false;    }  };  // call appshell exit  var appShell = Components.classes['@mozilla.org/appshell/appShellService;1'].getService();  appShell = appShell.QueryInterface( Components.interfaces.nsIAppShellService );  appShell.Quit();  return true;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d5b89ada81397152e5375dc850aecdbd8b912924/globalOverlay.js/buggy/xpfe/global/resources/content/globalOverlay.js