src/yaku.aplus.js
function scheduleHandler (p1, p2) {
        return setTimeout(function () {
            var x, handler = p1._s ? p2._onFulfilled : p2._onRejected;

            // 2.2.7.3
            // 2.2.7.4
            if (handler === void 0) {
                settlePromise(p2, p1._s, p1._v);
                return;
            }

            try {
                // 2.2.5
                x = handler(p1._v);
            } catch (err) {
                // 2.2.7.2
                settlePromise(p2, $rejected, err);
                return;
            }

            // 2.2.7.1
            settleWithX(p2, x);
        });
    }
function scheduleHandler (p1, p2) {
        return setTimeout(function () {
            var x, handler = p1._s ? p2._onFulfilled : p2._onRejected;

            // 2.2.7.3
            // 2.2.7.4
            if (handler === void 0) {
                settlePromise(p2, p1._s, p1._v);
                return;
            }

            try {
                // 2.2.5
                x = handler(p1._v);
            } catch (err) {
                // 2.2.7.2
                settlePromise(p2, $rejected, err);
                return;
            }

            // 2.2.7.1
            settleWithX(p2, x);
        });
    }
function scheduleHandler ( p1 , p2 ) { return setTimeout ( function ( ) { var x , handler = p1 . _s ? p2 . _onFulfilled : p2 . _onRejected ; // 2.2.7.3 // 2.2.7.4 if ( handler === void 0 ) { settlePromise ( p2 , p1 . _s , p1 . _v ) ; return ; } try { // 2.2.5 x = handler ( p1 . _v ) ; } catch ( err ) { // 2.2.7.2 settlePromise ( p2 , $rejected , err ) ; return ; } // 2.2.7.1 settleWithX ( p2 , x ) ; } ) ; }
Resolve the value returned by onFulfilled or onRejected.
@private
@param {Yaku} p1
@param {Yaku} p2
Resolve the value returned by onFulfilled or onRejected .