B2G/gecko/browser/components/tabview/tabitems.js
// Takes in a xul:tab and destroys the TabItem associated with it. 
Takes in a xul:tab and destroys the TabItem associated with it.
Takes in a xul : tab and destroys the TabItem associated with it .
function TabItems_unlink(tab) {
    try {
      Utils.assertThrow(tab, "tab");
      Utils.assertThrow(tab._tabViewTabItem, "should already be linked");
      this.unregister(tab._tabViewTabItem);
      tab._tabViewTabItem._sendToSubscribers("close");
      tab._tabViewTabItem.$container.remove();
      tab._tabViewTabItem.removeTrenches();
      Items.unsquish(null, tab._tabViewTabItem);
      tab._tabViewTabItem.tab = null;
      tab._tabViewTabItem.tabCanvas.tab = null;
      tab._tabViewTabItem.tabCanvas = null;
      tab._tabViewTabItem = null;
      Storage.saveTab(tab, null);
      this._tabsWaitingForUpdate.remove(tab);
    } catch(e) {
      Utils.log(e);
    }
  }
function TabItems_unlink ( tab ) { try { Utils . assertThrow ( tab , "tab" ) ; Utils . assertThrow ( tab . _tabViewTabItem , "should already be linked" ) ; this . unregister ( tab . _tabViewTabItem ) ; tab . _tabViewTabItem . _sendToSubscribers ( "close" ) ; tab . _tabViewTabItem . $container . remove ( ) ; tab . _tabViewTabItem . removeTrenches ( ) ; Items . unsquish ( null , tab . _tabViewTabItem ) ; tab . _tabViewTabItem . tab = null ; tab . _tabViewTabItem . tabCanvas . tab = null ; tab . _tabViewTabItem . tabCanvas = null ; tab . _tabViewTabItem = null ; Storage . saveTab ( tab , null ) ; this . _tabsWaitingForUpdate . remove ( tab ) ; } catch ( e ) { Utils . log ( e ) ; } }
Takes in a xul:tab and destroys the TabItem associated with it.
Takes in a xul : tab and destroys the TabItem associated with it .
// note that it's ok to unlink an app tab; see .handleTabUnpin