lib/webdriver/promise.js
function cancel(opt_reason) {
    if (!isPending()) {
      return;
    }

    if (opt_canceller) {
      opt_reason = opt_canceller(opt_reason) || opt_reason;
    }

    reject(opt_reason);
  }
function cancel(opt_reason) {
    if (!isPending()) {
      return;
    }

    if (opt_canceller) {
      opt_reason = opt_canceller(opt_reason) || opt_reason;
    }

    reject(opt_reason);
  }
function cancel ( opt_reason ) { if ( ! isPending ( ) ) { return ; } if ( opt_canceller ) { opt_reason = opt_canceller ( opt_reason ) || opt_reason ; } reject ( opt_reason ) ; }
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.
Attempts to cancel the computation of this instance s value . This attempt will silently fail if this instance has already resolved .