B2G/gecko/browser/components/tabview/tabitems.js
// Returns true if this tab is removed.
Returns true if this tab is removed.
Returns true if this tab is removed .
function TabItem_close(groupClose) {
    if (!groupClose && gBrowser.tabs.length == 1) {
      let group = this.tab._tabViewTabItem.parent;
      group.newTab(null, { closedLastTab: true });
    }
    gBrowser.removeTab(this.tab);
    let tabClosed = !this.tab;
    if (tabClosed)
      this._sendToSubscribers("tabRemoved");
    return tabClosed;
  }
function TabItem_close ( groupClose ) { if ( ! groupClose && gBrowser . tabs . length == 1 ) { let group = this . tab . _tabViewTabItem . parent ; group . newTab ( null , { closedLastTab : true } ) ; } gBrowser . removeTab ( this . tab ) ; let tabClosed = ! this . tab ; if ( tabClosed ) this . _sendToSubscribers ( "tabRemoved" ) ; return tabClosed ; }
Returns true if this tab is removed.
Returns true if this tab is removed .
// When the last tab is closed, put a new tab into closing tab's group. If // closing tab doesn't belong to a group and no empty group, create a new  // one for the new tab. // when "TabClose" event is fired, the browser tab is about to close and our  // item "close" is fired before the browser tab actually get closed.  // Therefore, we need "tabRemoved" event below. // No need to explicitly delete the tab data, becasue sessionstore data // associated with the tab will automatically go away