rem: var ObserverService = Components.classes["component: 
add: var ObserverService = Components.classes["@mozilla.org/observer-service;1"].getService(); 
context: function goQuitApplication(){	var ObserverService = Components.classes["component://netscape/observer-service"].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['component://netscape/rdf/datasource?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 );		domWindow.focus();		if ( domWindow.tryToClose == null )		{			// dump(" window.close \n");			domWindow.close();		}		else		{			// dump(" try to close \n" );			if ( !domWindow.tryToClose() )				return false;		}	};		// call appshell exit	var appShell = Components.classes['component://netscape/appshell/appShellService'].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/6cc70ebd6c97bd0b2fe48c31f579e855387ced9d/globalOverlay.js/buggy/xpfe/global/resources/content/globalOverlay.js