B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * Reset the restoring state for a particular tab. This will be called when
   * removing a tab or when a tab needs to be reset (it's being overwritten).
   *
   * @param aTab
   *        The tab that will be "reset"
   */
Reset the restoring state for a particular tab. This will be called when
removing a tab or when a tab needs to be reset (it's being overwritten).

@param aTab
The tab that will be "reset"
Reset the restoring state for a particular tab . This will be called when removing a tab or when a tab needs to be reset ( it ' s being overwritten ) . @param aTab The tab that will be " reset "
function ssi_resetTabRestoringState(aTab) {
    let window = aTab.ownerDocument.defaultView;
    let browser = aTab.linkedBrowser;
    let previousState = browser.__SS_restoreState;
    delete browser.__SS_restoreState;
    window.__SS_tabsToRestore--;
    this._removeTabsProgressListener(window);
    if (previousState == TAB_STATE_RESTORING) {
      if (this._tabsRestoringCount)
        this._tabsRestoringCount--;
    }
    else if (previousState == TAB_STATE_NEEDS_RESTORE) {
      this._removeSHistoryListener(aTab);
      this._removeTabFromTabsToRestore(aTab);
    }
  }
function ssi_resetTabRestoringState ( aTab ) { let window = aTab . ownerDocument . defaultView ; let browser = aTab . linkedBrowser ; let previousState = browser . __SS_restoreState ; delete browser . __SS_restoreState ; window . __SS_tabsToRestore -- ; this . _removeTabsProgressListener ( window ) ; if ( previousState == TAB_STATE_RESTORING ) { if ( this . _tabsRestoringCount ) this . _tabsRestoringCount -- ; } else if ( previousState == TAB_STATE_NEEDS_RESTORE ) { this . _removeSHistoryListener ( aTab ) ; this . _removeTabFromTabsToRestore ( aTab ) ; } }
Reset the restoring state for a particular tab.
Reset the restoring state for a particular tab .
// Keep the tab's previous state for later in this method // The browser is no longer in any sort of restoring state. // We want to decrement window.__SS_tabsToRestore here so that we always // decrement it AFTER a tab is done restoring or when a tab gets "reset". // Remove the progress listener if we should. // Make sure the session history listener is removed. This is normally // done in restoreTab, but this tab is being removed before that gets called. // Make sure that the tab is removed from the list of tabs to restore. // Again, this is normally done in restoreTab, but that isn't being called // for this tab.