B2G/gecko/toolkit/devtools/webconsole/dbg-webconsole-actors.js
/**
   * Handler for the "evaluateJS" request. This method evaluates the given
   * JavaScript string and sends back the result.
   *
   * @param object aRequest
   *        The JSON request object received from the Web Console client.
   * @return object
   *         The evaluation response packet.
   */
Handler for the "evaluateJS" request. This method evaluates the given
JavaScript string and sends back the result.

@param object aRequest
The JSON request object received from the Web Console client.
@return object
The evaluation response packet.
Handler for the " evaluateJS " request . This method evaluates the given JavaScript string and sends back the result . @param object aRequest The JSON request object received from the Web Console client . @return object The evaluation response packet .
function WCA_onEvaluateJS(aRequest)
  {
    let input = aRequest.text;
    let result, error = null;
    let timestamp;
    this.helperResult = null;
    this.evalInput = input;
    try {
      timestamp = Date.now();
      result = this.evalInSandbox(input);
    }
    catch (ex) {
      error = ex;
    }
    let helperResult = this.helperResult;
    delete this.helperResult;
    delete this.evalInput;
    return {
      from: this.actorID,
      input: input,
      result: this.createValueGrip(result),
      timestamp: timestamp,
      error: error,
      errorMessage: error ? String(error) : null,
      helperResult: helperResult,
    };
  }
function WCA_onEvaluateJS ( aRequest ) { let input = aRequest . text ; let result , error = null ; let timestamp ; this . helperResult = null ; this . evalInput = input ; try { timestamp = Date . now ( ) ; result = this . evalInSandbox ( input ) ; } catch ( ex ) { error = ex ; } let helperResult = this . helperResult ; delete this . helperResult ; delete this . evalInput ; return { from : this . actorID , input : input , result : this . createValueGrip ( result ) , timestamp : timestamp , error : error , errorMessage : error ? String ( error ) : null , helperResult : helperResult , } ; }
Handler for the "evaluateJS" request.
Handler for the " evaluateJS " request .