Skip to content

misc: use top-level await #13975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jun 10, 2022
Merged

misc: use top-level await #13975

merged 22 commits into from
Jun 10, 2022

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
@@ -26,8 +26,7 @@ if (!process.env.WPT_KEY) throw new Error('missing WPT_KEY');
const WPT_KEY = process.env.WPT_KEY;
const DEBUG = process.env.DEBUG;

/** @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