B2G/gecko/services/common/modules-testing/storageserver.js
/**
   * This is invoked by the HttpServer. `this` is bound to the StorageServer;
   * `handler` is the HttpServer's handler.
   *
   * TODO: need to use the correct Storage API response codes and errors here.
   */
This is invoked by the HttpServer. `this` is bound to the StorageServer;
`handler` is the HttpServer's handler.

need to use the correct Storage API response codes and errors here.
This is invoked by the HttpServer . ` this ` is bound to the StorageServer ; ` handler ` is the HttpServer ' s handler . need to use the correct Storage API response codes and errors here .
function handleDefault(handler, req, resp) {
    this.requestCount++;
    let timestamp = new_timestamp();
    try {
      this._handleDefault(handler, req, resp, timestamp);
    } catch (e) {
      if (e instanceof HttpError) {
        this.respond(req, resp, e.code, e.description, "", {}, timestamp);
      } else {
        this._log.warn(CommonUtils.exceptionStr(e));
        throw e;
      }
    }
  }
function handleDefault ( handler , req , resp ) { this . requestCount ++ ; let timestamp = new_timestamp ( ) ; try { this . _handleDefault ( handler , req , resp , timestamp ) ; } catch ( e ) { if ( e instanceof HttpError ) { this . respond ( req , resp , e . code , e . description , "" , { } , timestamp ) ; } else { this . _log . warn ( CommonUtils . exceptionStr ( e ) ) ; throw e ; } } }
This is invoked by the HttpServer.
This is invoked by the HttpServer .