docs: function adopt(promise, state, value, adoptee) {
    var queue = promise._value;
    promise._state = state;
    promise._value = value;
  
    if (adoptee && state === PendingPromise) {
      adoptee._state(value, void 0, void 0, {
        promise: promise,
        resolve: void 0,
        reject: void 0
      });
    }
  
    for (var i = 0; i < queue.length; i++) {
      var next = queue[i];
      promise._state(
        value,
        next.onFulfilled,
        next.onRejected,
        next.deferred
      );
    }
    queue.length = 0;
  
    // Determine if this rejected promise will be "handled".
    if (state === RejectedPromise && promise._isChainEnd) {
      setTimeout(function() {
        if (promise._isChainEnd) {
          onPossiblyUnhandledRejection(value, promise);
        }
      }, 0);
    }
  }