function onRejected() {
            pendingCount--;
            if (pendingCount === 0) {
                deferred.reject(new Error(
                    "Can't get fulfillment value from any promise, all " +
                    "promises were rejected."
                ));
            }
        }
Provides an opportunity to observe the settling of a promise,
regardless of whether the promise is fulfilled or rejected.  Forwards
the resolution to the returned promise when the callback is done.
The callback can return a promise to defer completion.
@param {Any*} promise
@param {Function} callback to observe the resolution of the given
promise, takes no arguments.
@returns a promise for the resolution of the given promise when
``fin`` is done.