mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
v8: remove --harmony-top-level-await
PR-URL: https://github.com/nodejs/node/pull/40226 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
committed by
Node.js GitHub Bot
parent
481c1609d8
commit
02de40246f
@@ -803,13 +803,6 @@ int ProcessGlobalArgs(std::vector<std::string>* args,
|
||||
return 12;
|
||||
}
|
||||
|
||||
// TODO(mylesborins): remove this when the harmony-top-level-await flag
|
||||
// is removed in V8
|
||||
if (std::find(v8_args.begin(), v8_args.end(),
|
||||
"--no-harmony-top-level-await") == v8_args.end()) {
|
||||
v8_args.push_back("--harmony-top-level-await");
|
||||
}
|
||||
|
||||
auto env_opts = per_process::cli_options->per_isolate->per_env;
|
||||
if (std::find(v8_args.begin(), v8_args.end(),
|
||||
"--abort-on-uncaught-exception") != v8_args.end() ||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// Flags: --no-harmony-top-level-await
|
||||
|
||||
'use strict';
|
||||
await async () => 0;
|
||||
@@ -1,10 +0,0 @@
|
||||
file:///*/test/message/esm_display_syntax_error.mjs:4
|
||||
await async () => 0;
|
||||
^^^^^
|
||||
|
||||
SyntaxError: Unexpected reserved word
|
||||
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:*:*)
|
||||
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:*:*)
|
||||
at async link (node:internal/modules/esm/module_job:*:*)
|
||||
|
||||
Node.js *
|
||||
@@ -1,8 +0,0 @@
|
||||
// Flags: --no-harmony-top-level-await
|
||||
|
||||
import {
|
||||
mustCall,
|
||||
} from '../common/index.mjs';
|
||||
|
||||
process.on('unhandledRejection', mustCall());
|
||||
Promise.reject(new Error('should not be fatal error'));
|
||||
@@ -28,7 +28,6 @@ int main(int argc, char* argv[]) {
|
||||
#endif // _WIN32
|
||||
|
||||
v8::V8::SetFlagsFromString("--random_seed=42");
|
||||
v8::V8::SetFlagsFromString("--harmony-top-level-await");
|
||||
|
||||
if (argc < 2) {
|
||||
std::cerr << "Usage: " << argv[0] << " <path/to/output.cc>\n";
|
||||
|
||||
Reference in New Issue
Block a user