B2G/gecko/browser/components/sessionstore/src/SessionStore.jsm
/**
   * open a new browser window for a given session state
   * called when restoring a multi-window session
   * @param aState
   *        Object containing session data
   */
open a new browser window for a given session state
called when restoring a multi-window session
@param aState
Object containing session data
open a new browser window for a given session state called when restoring a multi - window session @param aState Object containing session data
function ssi_openWindowWithState(aState) {
    var argString = Cc["@mozilla.org/supports-string;1"].
                    createInstance(Ci.nsISupportsString);
    argString.data = "";
    let features = "chrome,dialog=no,macsuppressanimation,all";
    let winState = aState.windows[0];
    WINDOW_ATTRIBUTES.forEach(function(aFeature) {
      if (aFeature in winState && !isNaN(winState[aFeature]))
        features += "," + aFeature + "=" + winState[aFeature];
    });
    var window =
      Services.ww.openWindow(null, this._prefBranch.getCharPref("chromeURL"),
                             "_blank", features, argString);
    do {
      var ID = "window" + Math.random();
    } while (ID in this._statesToRestore);
    this._statesToRestore[(window.__SS_restoreID = ID)] = aState;
    return window;
  }
function ssi_openWindowWithState ( aState ) { var argString = Cc [ "@mozilla.org/supports-string;1" ] . createInstance ( Ci . nsISupportsString ) ; argString . data = "" ; let features = "chrome,dialog=no,macsuppressanimation,all" ; let winState = aState . windows [ 0 ] ; WINDOW_ATTRIBUTES . forEach ( function ( aFeature ) { if ( aFeature in winState && ! isNaN ( winState [ aFeature ] ) ) features += "," + aFeature + "=" + winState [ aFeature ] ; } ) ; var window = Services . ww . openWindow ( null , this . _prefBranch . getCharPref ( "chromeURL" ) , "_blank" , features , argString ) ; do { var ID = "window" + Math . random ( ) ; } while ( ID in this . _statesToRestore ) ; this . _statesToRestore [ ( window . __SS_restoreID = ID ) ] = aState ; return window ; }
open a new browser window for a given session state
 called when restoring a multi-window session
 @param aState
        Object containing session data
open a new browser window for a given session state called when restoring a multi - window session @param aState Object containing session data
// Build feature string // Use !isNaN as an easy way to ignore sizemode and check for numbers