src/polyfill/promise.js
function setState(promise, state) {
  utils.defineProperty(promise, 'state', {
    enumerable: false,
    // According to the spec: If the state is UNFULFILLED (0), the state can be changed;
    // If the state is FULFILLED (1) or FAILED (2), the state cannot be changed, and therefore we
    // lock the property
    configurable: (! state),
    writable: false,
    value: state
  });
}
function setState(promise, state) {
  utils.defineProperty(promise, 'state', {
    enumerable: false,
    // According to the spec: If the state is UNFULFILLED (0), the state can be changed;
    // If the state is FULFILLED (1) or FAILED (2), the state cannot be changed, and therefore we
    // lock the property
    configurable: (! state),
    writable: false,
    value: state
  });
}
function setState ( promise , state ) { utils . defineProperty ( promise , 'state' , { enumerable : false , // According to the spec: If the state is UNFULFILLED (0), the state can be changed; // If the state is FULFILLED (1) or FAILED (2), the state cannot be changed, and therefore we // lock the property configurable : ( ! state ) , writable : false , value : state } ) ; }
Set the state of a promise  @param {promise} the promise to modify @param {state} the new state @return void
Set the state of a promise