B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * remove listeners for a tab
   * @param aWindow
   *        Window reference
   * @param aTab
   *        Tab reference
   * @param aNoNotification
   *        bool Do not save state if we're updating an existing tab
   */
remove listeners for a tab
@param aWindow
Window reference
@param aTab
Tab reference
@param aNoNotification
bool Do not save state if we're updating an existing tab
remove listeners for a tab @param aWindow Window reference @param aTab Tab reference @param aNoNotification bool Do not save state if we ' re updating an existing tab
function ssi_onTabRemove(aWindow, aTab, aNoNotification) {
    let browser = aTab.linkedBrowser;
    browser.removeEventListener("load", this, true);
    browser.removeEventListener("pageshow", this, true);
    browser.removeEventListener("change", this, true);
    browser.removeEventListener("input", this, true);
    browser.removeEventListener("DOMAutoComplete", this, true);
    delete browser.__SS_data;
    delete browser.__SS_tabStillLoading;
    delete browser.__SS_formDataSaved;
    delete browser.__SS_hostSchemeData;
    let previousState;
    if (previousState = browser.__SS_restoreState) {
      this._resetTabRestoringState(aTab);
      if (previousState == TAB_STATE_RESTORING)
        this.restoreNextTab();
    }
    if (!aNoNotification) {
      this.saveStateDelayed(aWindow);
    }
  }
function ssi_onTabRemove ( aWindow , aTab , aNoNotification ) { let browser = aTab . linkedBrowser ; browser . removeEventListener ( "load" , this , true ) ; browser . removeEventListener ( "pageshow" , this , true ) ; browser . removeEventListener ( "change" , this , true ) ; browser . removeEventListener ( "input" , this , true ) ; browser . removeEventListener ( "DOMAutoComplete" , this , true ) ; delete browser . __SS_data ; delete browser . __SS_tabStillLoading ; delete browser . __SS_formDataSaved ; delete browser . __SS_hostSchemeData ; let previousState ; if ( previousState = browser . __SS_restoreState ) { this . _resetTabRestoringState ( aTab ) ; if ( previousState == TAB_STATE_RESTORING ) this . restoreNextTab ( ) ; } if ( ! aNoNotification ) { this . saveStateDelayed ( aWindow ) ; } }
remove listeners for a tab
 @param aWindow
        Window reference
 @param aTab
        Tab reference
 @param aNoNotification
        bool Do not save state if we're updating an existing tab
remove listeners for a tab @param aWindow Window reference @param aTab Tab reference @param aNoNotification bool Do not save state if we ' re updating an existing tab
// If this tab was in the middle of restoring or still needs to be restored, // we need to reset that state. If the tab was restoring, we will attempt to // restore the next tab.