function OA_onScope(aRequest) {
    if (this.threadActor.state !== "paused") {
      return this.WRONG_STATE_RESPONSE;
    }

    if (this.obj.class !== "Function") {
      return { error: "objectNotFunction",
               message: "scope request is only valid for object grips with a" +
                        " 'Function' class." };
    }

    let envActor = this.threadActor.createEnvironmentActor(this.obj.environment,
                                                           this.registeredPool);
    if (!envActor) {
      return { error: "notDebuggee",
               message: "cannot access the environment of this function." };
    }

    // XXX: the following call of env.form() won't work until bug 747514 lands.
    // We can't get to the frame that defined this function's environment,
    // neither here, nor during ObjectActor's construction. Luckily, we don't
    // use the 'scope' request in the debugger frontend.
    return { name: this.obj.name || null,
             scope: envActor.form(this.obj) };
  }
/**
   * Handle a protocol request to provide the lexical scope of a function.
   *
   * @param aRequest object
   *        The protocol request object.
   */
Handle a protocol request to provide the lexical scope of a function.
@param aRequest object
The protocol request object.
Handle a protocol request to provide the lexical scope of a function . @param aRequest object The protocol request object .
function OA_onScope(aRequest) {
    if (this.threadActor.state !== "paused") {
      return this.WRONG_STATE_RESPONSE;
    }
    if (this.obj.class !== "Function") {
      return { error: "objectNotFunction",
               message: "scope request is only valid for object grips with a" +
                        " 'Function' class." };
    }
    let envActor = this.threadActor.createEnvironmentActor(this.obj.environment,
                                                           this.registeredPool);
    if (!envActor) {
      return { error: "notDebuggee",
               message: "cannot access the environment of this function." };
    }
    return { name: this.obj.name || null,
             scope: envActor.form(this.obj) };
  }
function OA_onScope ( aRequest ) { if ( this . threadActor . state !== "paused" ) { return this . WRONG_STATE_RESPONSE ; } if ( this . obj . class !== "Function" ) { return { error : "objectNotFunction" , message : "scope request is only valid for object grips with a" + " 'Function' class." } ; } let envActor = this . threadActor . createEnvironmentActor ( this . obj . environment , this . registeredPool ) ; if ( ! envActor ) { return { error : "notDebuggee" , message : "cannot access the environment of this function." } ; } return { name : this . obj . name || null , scope : envActor . form ( this . obj ) } ; }
Handle a protocol request to provide the lexical scope of a function.
Handle a protocol request to provide the lexical scope of a function .
// XXX: the following call of env.form() won't work until bug 747514 lands. // We can't get to the frame that defined this function's environment, // neither here, nor during ObjectActor's construction. Luckily, we don't // use the 'scope' request in the debugger frontend.