rem: _onQuitRequest: function(aCancelQuit) 
add: _onQuitRequest: function(aCancelQuit, aQuitType) 
context:   _onQuitRequest: function(aCancelQuit)  {    var wm = Cc["@mozilla.org/appshell/window-mediator;1"].             getService(Ci.nsIWindowMediator);    var windowcount = 0;    var pagecount = 0;    var browserEnum = wm.getEnumerator("navigator:browser");    while (browserEnum.hasMoreElements()) {      windowcount++;      var browser = browserEnum.getNext();      var tabbrowser = browser.document.getElementById("content");      if (tabbrowser)        pagecount += tabbrowser.browsers.length;    }    this._saveSession = false;    if (pagecount < 2)      return;    var prefBranch = Cc["@mozilla.org/preferences-service;1"].                     getService(Ci.nsIPrefBranch);    var showPrompt = true;    try {      if (prefBranch.getIntPref("browser.startup.page") == 3 ||          prefBranch.getBoolPref("browser.sessionstore.resume_session_once"))        showPrompt = false;      else        showPrompt = prefBranch.getBoolPref("browser.warnOnQuit");    } catch (ex) {}    var buttonChoice = 0;    if (showPrompt) {      var bundleService = Cc["@mozilla.org/intl/stringbundle;1"].                          getService(Ci.nsIStringBundleService);      var quitBundle = bundleService.createBundle("chrome://browser/locale/quitDialog.properties");      var brandBundle = bundleService.createBundle("chrome://branding/locale/brand.properties");      var appName = brandBundle.GetStringFromName("brandShortName");      var quitDialogTitle = quitBundle.formatStringFromName("quitDialogTitle",                                                            [appName], 1);      var quitTitle = quitBundle.GetStringFromName("quitTitle");      var cancelTitle = quitBundle.GetStringFromName("cancelTitle");      var saveTitle = quitBundle.GetStringFromName("saveTitle");      var neverAskText = quitBundle.GetStringFromName("neverAsk");      if (windowcount == 1)        var message = quitBundle.formatStringFromName("messageNoWindows",                                                      [appName], 1);      else        var message = quitBundle.formatStringFromName("message",                                                      [appName], 1);      var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].                          getService(Ci.nsIPromptService);      var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +                  promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1 +                  promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2 +                  promptService.BUTTON_POS_0_DEFAULT;      var neverAsk = {value:false};      buttonChoice = promptService.confirmEx(null, quitDialogTitle, message,                                   flags, quitTitle, cancelTitle, saveTitle,                                   neverAskText, neverAsk);      switch (buttonChoice) {      case 0:        if (neverAsk.value)          prefBranch.setBoolPref("browser.warnOnQuit", false);        break;      case 1:        aCancelQuit.QueryInterface(Ci.nsISupportsPRBool);        aCancelQuit.data = true;        break;      case 2:        // could also set browser.warnOnQuit to false here,        // but not setting it is a little safer.        if (neverAsk.value)          prefBranch.setIntPref("browser.startup.page", 3);        break;      }      this._saveSession = buttonChoice == 2;    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/6542df1a46beee13ec906404b51bf1655301e47a/nsBrowserGlue.js/buggy/browser/components/nsBrowserGlue.js