promise.js
function NewPromiseCapability ( C ) {
    var promise;
    if ( !IsConstructor(C) ) {
      throw TypeError();
    }
    try {
      promise = Object.create(C.prototype);
    } catch ( e ) {
      return e;
    }
    return CreatePromiseCapabilityRecord(promise, C);
  }
function NewPromiseCapability ( C ) {
    var promise;
    if ( !IsConstructor(C) ) {
      throw TypeError();
    }
    try {
      promise = Object.create(C.prototype);
    } catch ( e ) {
      return e;
    }
    return CreatePromiseCapabilityRecord(promise, C);
  }
25.4.1.5 NewPromiseCapability ( C )