B2G/gecko/browser/devtools/debugger/debugger-controller.js
/**
   * Called when a script's source has been loaded.
   *
   * @private
   * @param string aScriptUrl
   *        The URL of the source script.
   * @param string aSourceText
   *        The text of the source script.
   * @param object aOptions [optional]
   *        Additional options for showing the script. Supported options:
   *        - targetLine: place the editor at the given line number.
   */
Called when a script's source has been loaded.
@private
@param string aScriptUrl
The URL of the source script.
@param string aSourceText
The text of the source script.
@param object aOptions [optional]
Additional options for showing the script. Supported options:
- targetLine: place the editor at the given line number.
Called when a script ' s source has been loaded . @private @param string aScriptUrl The URL of the source script . @param string aSourceText The text of the source script . @param object aOptions [ optional ] Additional options for showing the script . Supported options : - targetLine : place the editor at the given line number .
function SS__onLoadSourceFinished(aScriptUrl, aSourceText, aOptions) {
    let element = DebuggerView.Scripts.getScriptByLocation(aScriptUrl);
    if (!element) {
      return;
    }
    let script = element.getUserData("sourceScript");
    script.loaded = true;
    script.text = aSourceText;
    element.setUserData("sourceScript", script, null);
    if (aOptions.silent) {
      aOptions.callback && aOptions.callback(aScriptUrl, aSourceText);
      return;
    }
    this.showScript(script, aOptions);
  }
function SS__onLoadSourceFinished ( aScriptUrl , aSourceText , aOptions ) { let element = DebuggerView . Scripts . getScriptByLocation ( aScriptUrl ) ; if ( ! element ) { return ; } let script = element . getUserData ( "sourceScript" ) ; script . loaded = true ; script . text = aSourceText ; element . setUserData ( "sourceScript" , script , null ) ; if ( aOptions . silent ) { aOptions . callback && aOptions . callback ( aScriptUrl , aSourceText ) ; return ; } this . showScript ( script , aOptions ) ; }
Called when a script's source has been loaded.
Called when a script ' s source has been loaded .
// Tab navigated before we got a chance to finish loading and displaying // the source. The outcome is that the expected url is not present anymore // in the scripts container, hence the original script object coming from // the active thread no longer exists. There's really nothing that needs // to be done in this case, nor something that can be currently avoided.