Skip to content

Conversation

@connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented May 6, 2022

(#13967 should land first)

Fixes #13964

I likely missed a few places where we could use top-level await.

FYI:
image

I verified that a node process exits with 1 and logs the error when a promise rejects, so no need to catch them.

@connorjclark connorjclark requested a review from a team as a code owner May 6, 2022 21:54
@connorjclark connorjclark requested review from brendankenny and removed request for a team May 6, 2022 21:54
@connorjclark connorjclark changed the title core(trace): add PrePaint event, renamed from UpdateLayerTree (#13950) misc: use top-level await May 6, 2022

/** @type {typeof common.ProgressLogger['prototype']} */
let log;
const log = new common.ProgressLogger();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive by

@brendankenny
Copy link
Contributor

I verified that a node process exits with 1 and logs the error when a promise rejects, so no need to catch them.

happens in Node 15, sry :/

@connorjclark
Copy link
Collaborator Author

hmm, was it perhaps backported?

image

@connorjclark
Copy link
Collaborator Author

connorjclark commented May 6, 2022

anyway, we could add NODE_OPTIONS=--unhandled-rejections=throw in CI for node 14.

Base automatically changed from esm-build to master May 6, 2022 22:24
@connorjclark
Copy link
Collaborator Author

connorjclark commented May 14, 2022

checked our min node version 14.15 and also OK

image

@brendankenny I think that top-level awaited promises are not unconsidered "unhandled" on rejections. The runtime is handling them.

@connorjclark connorjclark merged commit 907804a into master Jun 10, 2022
@connorjclark connorjclark deleted the top-await branch June 10, 2022 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use top-level await

4 participants