rem:  gBrowser.removeCurrentTab(); 
add: if (gBrowser.tabContainer.childNodes.length > 1 || window.toolbar.visible && !gPrefService.getBoolPref("browser.tabs.autoHide")) {  var isLastTab = gBrowser.tabContainer.childNodes.length == 1; gBrowser.removeCurrentTab(); if (isLastTab && gURLBar) setTimeout(function() { gURLBar.focus(); }, 0); return; }  closeWindow(true); 
context: function BrowserCloseTabOrWindow(){#ifdef XP_MACOSX  // If we're not a browser window, just close the window  if (window.location.href != getBrowserURL()) {    closeWindow(true);    return;  }#endif  // If the current tab is the last one, this will close the window.  gBrowser.removeCurrentTab();}
meta: 10520	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10520/28c33ba7d378b0c4eddf239ee3a1e22a268830d6/browser.js/buggy/browser/base/content/browser.js