B2G/gecko/dom/base/IndexedDBHelper.jsm
/**
   * Use the cached DB or open a new one.
   *
   * @param successCb
   *        Success callback to call.
   * @param failureCb
   *        Error callback to call when an error is encountered.
   */
Use the cached DB or open a new one.
@param successCb
Success callback to call.
@param failureCb
Error callback to call when an error is encountered.
Use the cached DB or open a new one . @param successCb Success callback to call . @param failureCb Error callback to call when an error is encountered .
function ensureDB(aSuccessCb, aFailureCb) {
    if (this._db) {
      if (DEBUG) debug("ensureDB: already have a database, returning early.");
      aSuccessCb();
      return;
    }
    this.open(aSuccessCb, aFailureCb);
  }
function ensureDB ( aSuccessCb , aFailureCb ) { if ( this . _db ) { if ( DEBUG ) debug ( "ensureDB: already have a database, returning early." ) ; aSuccessCb ( ) ; return ; } this . open ( aSuccessCb , aFailureCb ) ; }
Use the cached DB or open a new one.
Use the cached DB or open a new one .