B2G/gecko/testing/marionette/marionette-server.js
/**
   * Registers a new frame, and sets its current frame id to this frame
   * if it is not already assigned, and if a) we already have a session 
   * or b) we're starting a new session and it is the right start frame.
   *
   * @param string uid
   *        frame uid
   * @param object frameWindow
   *        the DOMWindow object of the frame that's being registered
   */
Registers a new frame, and sets its current frame id to this frame
if it is not already assigned, and if a) we already have a session
or b) we're starting a new session and it is the right start frame.

@param string uid
frame uid
@param object frameWindow
the DOMWindow object of the frame that's being registered
Registers a new frame and sets its current frame id to this frame if it is not already assigned and if a ) we already have a session or b ) we ' re starting a new session and it is the right start frame . @param string uid frame uid @param object frameWindow the DOMWindow object of the frame that ' s being registered
function BO_register(uid, frameWindow) {
    if (this.curFrameId == null) {
      if ((!this.newSession) ||
          (this.newSession &&
            ((appName != "Firefox") ||
             frameWindow == this.browser.getBrowserForTab(this.tab).contentWindow))) {
        this.curFrameId = uid;
        this.mainContentId = uid;
      }
    }
    this.knownFrames.push(uid); 
    return uid;
  }
function BO_register ( uid , frameWindow ) { if ( this . curFrameId == null ) { if ( ( ! this . newSession ) || ( this . newSession && ( ( appName != "Firefox" ) || frameWindow == this . browser . getBrowserForTab ( this . tab ) . contentWindow ) ) ) { this . curFrameId = uid ; this . mainContentId = uid ; } } this . knownFrames . push ( uid ) ; return uid ; }
Registers a new frame, and sets its current frame id to this frame
 if it is not already assigned, and if a) we already have a session
 or b) we're starting a new session and it is the right start frame.
Registers a new frame and sets its current frame id to this frame if it is not already assigned and if a ) we already have a session or b ) we ' re starting a new session and it is the right start frame .
// If we're setting up a new session on Firefox, we only process the // registration for this frame if it belongs to the tab we've just // created. //used to delete sessions