} mQuiting = PR_FALSE; return mAppShell->Exit();
rv = mShutdownTimer->Init(ExitCallback, this, 0); if (NS_FAILED(rv)) return rv; }  return NS_OK;
NS_IMETHODIMP nsAppShellService::Quit(){	if ( mQuiting )		return NS_OK; nsresult rv; mQuiting = PR_TRUE;	// now step through all opened registered windows and close them.  NS_WITH_SERVICE(nsIWindowMediator, windowMediator, kWindowMediatorCID, &rv);  if (NS_SUCCEEDED(rv)) {    nsCOMPtr<nsISimpleEnumerator> windowEnumerator;    if (NS_SUCCEEDED(windowMediator->GetEnumerator(nsnull, getter_AddRefs(windowEnumerator)))) {      PRBool more;      // get the (main) webshell for each window in the enumerator      windowEnumerator->HasMoreElements(&more);      while (more) {        nsCOMPtr<nsISupports> protoWindow;        rv = windowEnumerator->GetNext(getter_AddRefs(protoWindow));        if (NS_SUCCEEDED(rv) && protoWindow) {          nsCOMPtr<nsIDOMWindow> window(do_QueryInterface(protoWindow));          if (window)            window->Close();        }        windowEnumerator->HasMoreElements(&more);      }    }   }  mQuiting = PR_FALSE;   return mAppShell->Exit();}