code: function dispatch(child, value, success) {
  	setTimeout(function deferred() {
  		var method = success ? child.success : child.failure;
  
  		if (!method) {
  			return void child.promise[success ? 'resolve' : 'reject'](value);
  		}
  
  		var result;
  
  		try {
  			result = method(value);
  
  			if (result === child.promise) {
  				child.promise.reject(
  					new TypeError('Cannot return a promise from itself!')
  				);
  			} else if (!isPromise(result)) {
  				child.promise.resolve(result);
  			} else {
  				result.then(child.promise.resolve, child.promise.reject);
  			}
  		} catch (error) {
  			if (child.promise.hasErrorHandlers()) {
  				child.promise.reject(error);
  			} else {
  				throw error;
  			}
  		}
  	}, 0);
  }
docs: We declare this function standalone, rather than on the Promise prototype, in order to avoid clashes with that property name in cases when a base object is passed in to the Promise constructor that implements ".dispatch()".