src/libs/Promise.js
function (fpSuccess, fpFailure) {
    var oResult = this.oResult;
    if (this.bCompleted) {
      if (this.sType === 'resolve') {
        fpSuccess.apply(fpSuccess, oResult);
      } else {
        fpFailure.apply(fpFailure, oResult);
      }
    } else {
      this.aPending.push({ resolve: fpSuccess, reject: fpFailure});
    }
    return this;
  }
function (fpSuccess, fpFailure) {
    var oResult = this.oResult;
    if (this.bCompleted) {
      if (this.sType === 'resolve') {
        fpSuccess.apply(fpSuccess, oResult);
      } else {
        fpFailure.apply(fpFailure, oResult);
      }
    } else {
      this.aPending.push({ resolve: fpSuccess, reject: fpFailure});
    }
    return this;
  }
Adds new callbacks to execute when the promise has been completed
@member Promise.prototype
@param {Function} fpSuccess
@param {Function} fpFailure
@return {Promise} Promise instance