B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * serialize session data for a window
   * @param aWindow
   *        Window reference
   * @returns string
   */
serialize session data for a window
@param aWindow
Window reference
@returns string
serialize session data for a window @param aWindow Window reference @returns string
function ssi_getWindowState(aWindow) {
    if (!this._isWindowLoaded(aWindow))
      return this._statesToRestore[aWindow.__SS_restoreID];
    if (this._loadState == STATE_RUNNING) {
      this._collectWindowData(aWindow);
    }
    var winData = this._windows[aWindow.__SSi];
    let windows = {};
    windows[aWindow.__SSi] = winData;
    this._updateCookies(windows);
    return { windows: [winData] };
  }
function ssi_getWindowState ( aWindow ) { if ( ! this . _isWindowLoaded ( aWindow ) ) return this . _statesToRestore [ aWindow . __SS_restoreID ] ; if ( this . _loadState == STATE_RUNNING ) { this . _collectWindowData ( aWindow ) ; } var winData = this . _windows [ aWindow . __SSi ] ; let windows = { } ; windows [ aWindow . __SSi ] = winData ; this . _updateCookies ( windows ) ; return { windows : [ winData ] } ; }
serialize session data for a window
 @param aWindow
        Window reference
 @returns string
serialize session data for a window @param aWindow Window reference @returns string