B2G/gecko/testing/marionette/marionette-server.js
/**
   * Callback invoked after a new session has been started in a browser.
   * Loads the Marionette frame script into the browser if needed.
   *
   * @param nsIDOMWindow win
   *        Window whose browser we need to access
   * @param boolean newSession
   *        True if this is the first time we're talking to this browser
   */
Callback invoked after a new session has been started in a browser.
Loads the Marionette frame script into the browser if needed.

@param nsIDOMWindow win
Window whose browser we need to access
@param boolean newSession
True if this is the first time we're talking to this browser
Callback invoked after a new session has been started in a browser . Loads the Marionette frame script into the browser if needed . @param nsIDOMWindow win Window whose browser we need to access @param boolean newSession True if this is the first time we ' re talking to this browser
function MDA_whenBrowserStarted(win, newSession) {
    try {
      if (!Services.prefs.getBoolPref("marionette.contentListener") || !newSession) {
        this.curBrowser.loadFrameScript(FRAME_SCRIPT, win);
      }
    }
    catch (e) {
      logger.info("could not load listener into content for page: " + win.location.href);
    }
    utils.window = win;
  }
function MDA_whenBrowserStarted ( win , newSession ) { try { if ( ! Services . prefs . getBoolPref ( "marionette.contentListener" ) || ! newSession ) { this . curBrowser . loadFrameScript ( FRAME_SCRIPT , win ) ; } } catch ( e ) { logger . info ( "could not load listener into content for page: " + win . location . href ) ; } utils . window = win ; }
Callback invoked after a new session has been started in a browser.
Callback invoked after a new session has been started in a browser .
//there may not always be a content process