Last active
July 16, 2021 05:56
-
-
Save idandagan1/c65a6aa8e4207727e4f90c4e91f43686 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function processPromiseRejections() { | |
... | |
... | |
let len = pendingUnhandledRejections.length; | |
while (len--) { | |
const promise = ArrayPrototypeShift(pendingUnhandledRejections); | |
const promiseInfo = maybeUnhandledPromises.get(promise); | |
if (promiseInfo === undefined) { | |
continue; | |
} | |
... | |
const { reason, uid, emit } = promiseInfo; | |
switch (unhandledRejectionsMode) { | |
case kStrictUnhandledRejections: { ... } | |
case kIgnoreUnhandledRejections: { | |
emit(reason, promise, promiseInfo); | |
break; | |
} | |
case kThrowUnhandledRejections: { ... } | |
case kWarnWithErrorCodeUnhandledRejections: { ... } | |
... | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment