B2G/gecko/toolkit/devtools/debugger/server/dbg-script-actors.js
/**
   * Returns an environment form for use in a protocol message. Note that the
   * requirement of passing the frame as a parameter is only temporary, since
   * when bug 747514 lands, the environment will have a callee property that
   * will contain it.
   *
   * @param Debugger.Frame aObject
   *        The stack frame object whose environment bindings are being
   *        generated.
   */
Returns an environment form for use in a protocol message. Note that the
requirement of passing the frame as a parameter is only temporary, since
when bug 747514 lands, the environment will have a callee property that
will contain it.

@param Debugger.Frame aObject
The stack frame object whose environment bindings are being
generated.
Returns an environment form for use in a protocol message . Note that the requirement of passing the frame as a parameter is only temporary since when bug 747514 lands the environment will have a callee property that will contain it . @param Debugger . Frame aObject The stack frame object whose environment bindings are being generated .
function EA_form(aObject) {
    if (!aObject.live) {
      return undefined;
    }
    let parent;
    if (this.obj.parent) {
      let thread = this.threadActor;
      parent = thread.createEnvironmentActor(this.obj.parent,
                                             this.registeredPool);
    }
    let parentFrame = aObject;
    if (this.obj.type == "declarative" && aObject.older) {
      parentFrame = aObject.older;
    }
    let form = { actor: this.actorID,
                 parent: parent ? parent.form(parentFrame) : parent };
    if (this.obj.type == "with") {
      form.type = "with";
      form.object = this.threadActor.createValueGrip(this.obj.object);
    } else if (this.obj.type == "object") {
      form.type = "object";
      form.object = this.threadActor.createValueGrip(this.obj.object);
    } else { 
      if (aObject.callee) {
        form.type = "function";
        form.function = this.threadActor.createValueGrip(aObject.callee);
        form.functionName = getFunctionName(aObject.callee);
      } else {
        form.type = "block";
      }
      form.bindings = this._bindings(aObject);
    }
    return form;
  }
function EA_form ( aObject ) { if ( ! aObject . live ) { return undefined ; } let parent ; if ( this . obj . parent ) { let thread = this . threadActor ; parent = thread . createEnvironmentActor ( this . obj . parent , this . registeredPool ) ; } let parentFrame = aObject ; if ( this . obj . type == "declarative" && aObject . older ) { parentFrame = aObject . older ; } let form = { actor : this . actorID , parent : parent ? parent . form ( parentFrame ) : parent } ; if ( this . obj . type == "with" ) { form . type = "with" ; form . object = this . threadActor . createValueGrip ( this . obj . object ) ; } else if ( this . obj . type == "object" ) { form . type = "object" ; form . object = this . threadActor . createValueGrip ( this . obj . object ) ; } else { if ( aObject . callee ) { form . type = "function" ; form . function = this . threadActor . createValueGrip ( aObject . callee ) ; form . functionName = getFunctionName ( aObject . callee ) ; } else { form . type = "block" ; } form . bindings = this . _bindings ( aObject ) ; } return form ; }
Returns an environment form for use in a protocol message.
Returns an environment form for use in a protocol message .
// Debugger.Frame might be dead by the time we get here, which will cause // accessing its properties to throw. // Deduce the frame that created the parent scope in order to pass it to // parent.form(). TODO: this can be removed after bug 747514 is done. // this.obj.type == "declarative"