src/polyfill/promise.js
function fulfillPromise(promise, value) {
  if (promise.state !== PENDING) {return;}

  setValue(promise, value);
  setState(promise, UNFULFILLED);

  setImmediate(function() {
    setState(promise, FULFILLED);
    invokeFunctions(promise);
  });
}
function fulfillPromise(promise, value) {
  if (promise.state !== PENDING) {return;}

  setValue(promise, value);
  setState(promise, UNFULFILLED);

  setImmediate(function() {
    setState(promise, FULFILLED);
    invokeFunctions(promise);
  });
}
function fulfillPromise ( promise , value ) { if ( promise . state !== PENDING ) { return ; } setValue ( promise , value ) ; setState ( promise , UNFULFILLED ) ; setImmediate ( function ( ) { setState ( promise , FULFILLED ) ; invokeFunctions ( promise ) ; } ) ; }
Fulfill the given promise  @param {promise} the promise to resolve @param {value} the value of the promise @return void
Fulfill the given promise