B2G/gecko/browser/devtools/scratchpad/scratchpad.js
/**
   * Set the filename and execution context using the given state. Called
   * when scratchpad is being restored from a previous session.
   *
   * @param object aState
   *        An object with filename and executionContext properties.
   */
Set the filename and execution context using the given state. Called
when scratchpad is being restored from a previous session.

@param object aState
An object with filename and executionContext properties.
Set the filename and execution context using the given state . Called when scratchpad is being restored from a previous session . @param object aState An object with filename and executionContext properties .
function SP_setState(aState)
  {
    if (aState.filename) {
      this.setFilename(aState.filename);
    }
    if (this.editor) {
      this.editor.dirty = !aState.saved;
    }
    if (aState.executionContext == SCRATCHPAD_CONTEXT_BROWSER) {
      this.setBrowserContext();
    }
    else {
      this.setContentContext();
    }
  }
function SP_setState ( aState ) { if ( aState . filename ) { this . setFilename ( aState . filename ) ; } if ( this . editor ) { this . editor . dirty = ! aState . saved ; } if ( aState . executionContext == SCRATCHPAD_CONTEXT_BROWSER ) { this . setBrowserContext ( ) ; } else { this . setContentContext ( ) ; } }
Set the filename and execution context using the given state.
Set the filename and execution context using the given state .