diff options
author | Myles Borins <mylesborins@github.com> | 2020-07-30 01:52:02 +0300 |
---|---|---|
committer | Myles Borins <mylesborins@github.com> | 2020-08-03 21:27:28 +0300 |
commit | 54746bb763ebea0dc7e99d88ff4b379bcd680964 (patch) | |
tree | fe501ab1975605a96a8b57ab3677b7452e70d20e /src/node.cc | |
parent | 8d8090b9bb3ee657e20f0cb00fdc1c120a58537c (diff) |
module: unflag Top-Level Await
This unflags Top-Level await so it can be used by default in the module
goal. This is accomplished by manually setting the
--harmony-top-level-await flag. We are allowing this as a one of
approval based on circumstances. It is not a precedent that future
harmony features will be manually enabled.
Refs: https://github.com/nodejs/node/issues/34551
PR-URL: https://github.com/nodejs/node/pull/34558
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Zeyu Yang <himself65@outlook.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/node.cc b/src/node.cc index f14ff44be80..d68c6d8d148 100644 --- a/src/node.cc +++ b/src/node.cc @@ -773,6 +773,13 @@ 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() || |