code: function cancel(opt_reason) {
      if (!isPending()) {
        return;
      }
  
      if (opt_canceller) {
        opt_reason = opt_canceller(opt_reason) || opt_reason;
      }
  
      reject(opt_reason);
    }
docs: Attempts to cancel the computation of this instance's value. This attempt
  will silently fail if this instance has already resolved.
  @param {*=} opt_reason The reason for cancelling this promise.