B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * Store all session data for a window
   * @param aWindow
   *        Window reference
   */
Store all session data for a window
@param aWindow
Window reference
Store all session data for a window @param aWindow Window reference
function ssi_saveWindowHistory(aWindow) {
    var tabbrowser = aWindow.gBrowser;
    var tabs = tabbrowser.tabs;
    var tabsData = this._windows[aWindow.__SSi].tabs = [];
    for (var i = 0; i < tabs.length; i++)
      tabsData.push(this._collectTabData(tabs[i]));
    this._windows[aWindow.__SSi].selected = tabbrowser.mTabBox.selectedIndex + 1;
  }
function ssi_saveWindowHistory ( aWindow ) { var tabbrowser = aWindow . gBrowser ; var tabs = tabbrowser . tabs ; var tabsData = this . _windows [ aWindow . __SSi ] . tabs = [ ] ; for ( var i = 0 ; i < tabs . length ; i ++ ) tabsData . push ( this . _collectTabData ( tabs [ i ] ) ) ; this . _windows [ aWindow . __SSi ] . selected = tabbrowser . mTabBox . selectedIndex + 1 ; }
Store all session data for a window
 @param aWindow
        Window reference
Store all session data for a window @param aWindow Window reference