B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * When a tab is selected, save session data
   * @param aWindow
   *        Window reference
   */
When a tab is selected, save session data
@param aWindow
Window reference
When a tab is selected save session data @param aWindow Window reference
function ssi_onTabSelect(aWindow) {
    if (this._loadState == STATE_RUNNING) {
      this._windows[aWindow.__SSi].selected = aWindow.gBrowser.tabContainer.selectedIndex;
      let tab = aWindow.gBrowser.selectedTab;
      if (tab.linkedBrowser.__SS_restoreState &&
          tab.linkedBrowser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE)
        this.restoreTab(tab);
      this._updateCrashReportURL(aWindow);
    }
  }
function ssi_onTabSelect ( aWindow ) { if ( this . _loadState == STATE_RUNNING ) { this . _windows [ aWindow . __SSi ] . selected = aWindow . gBrowser . tabContainer . selectedIndex ; let tab = aWindow . gBrowser . selectedTab ; if ( tab . linkedBrowser . __SS_restoreState && tab . linkedBrowser . __SS_restoreState == TAB_STATE_NEEDS_RESTORE ) this . restoreTab ( tab ) ; this . _updateCrashReportURL ( aWindow ) ; } }
When a tab is selected, save session data
 @param aWindow
        Window reference
When a tab is selected save session data @param aWindow Window reference
// If __SS_restoreState is still on the browser and it is // TAB_STATE_NEEDS_RESTORE, then then we haven't restored // this tab yet. Explicitly call restoreTab to kick off the restore. // attempt to update the current URL we send in a crash report