promise.js
function PromiseReactionTask ( reaction, argument ) {
    var promiseCapability = reaction['[[Capabilities]]'],
      handler = reaction['[[Handler]]'],
      handlerResult, selfResolutionError, updateResult;
    try {
      handlerResult = handler.call(undefined, argument);
    } catch ( e ) {
      return promiseCapability['[[Reject]]'].call(undefined, e);
    }
    if ( SameValue(handlerResult, promiseCapability['[[Promise]]']) ) {
      selfResolutionError = TypeError();
      return promiseCapability['[[Reject]]']
        .call(undefined, selfResolutionError);
    }
    updateResult = UpdatePromiseFromPotentialThenable(handlerResult,
      promiseCapability
    );
    if ( updateResult === 'not a thenable' ) {
      return promiseCapability['[[Resolve]]'].call(undefined, handlerResult);
    }
    return undefined;
  }
function PromiseReactionTask ( reaction, argument ) {
    var promiseCapability = reaction['[[Capabilities]]'],
      handler = reaction['[[Handler]]'],
      handlerResult, selfResolutionError, updateResult;
    try {
      handlerResult = handler.call(undefined, argument);
    } catch ( e ) {
      return promiseCapability['[[Reject]]'].call(undefined, e);
    }
    if ( SameValue(handlerResult, promiseCapability['[[Promise]]']) ) {
      selfResolutionError = TypeError();
      return promiseCapability['[[Reject]]']
        .call(undefined, selfResolutionError);
    }
    updateResult = UpdatePromiseFromPotentialThenable(handlerResult,
      promiseCapability
    );
    if ( updateResult === 'not a thenable' ) {
      return promiseCapability['[[Resolve]]'].call(undefined, handlerResult);
    }
    return undefined;
  }
25.4.2.1 PromiseReactionTask( reaction, argument )