From 02de40246f261355ece1cc044e282db4db60d59b Mon Sep 17 00:00:00 2001 From: Geoffrey Booth Date: Sun, 26 Sep 2021 22:28:48 -0700 Subject: [PATCH] v8: remove --harmony-top-level-await MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/40226 Reviewed-By: Michaƫl Zasso Reviewed-By: Myles Borins Reviewed-By: Antoine du Hamel --- src/node.cc | 7 ------- test/message/esm_display_syntax_error.mjs | 4 ---- test/message/esm_display_syntax_error.out | 10 ---------- test/parallel/test-no-harmony-top-level-await.mjs | 8 -------- tools/code_cache/mkcodecache.cc | 1 - 5 files changed, 30 deletions(-) delete mode 100644 test/message/esm_display_syntax_error.mjs delete mode 100644 test/message/esm_display_syntax_error.out delete mode 100644 test/parallel/test-no-harmony-top-level-await.mjs diff --git a/src/node.cc b/src/node.cc index acf4f0fac03c0b..e942c108a15a3c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -803,13 +803,6 @@ int ProcessGlobalArgs(std::vector* 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() || diff --git a/test/message/esm_display_syntax_error.mjs b/test/message/esm_display_syntax_error.mjs deleted file mode 100644 index 0b9a30c2d054f7..00000000000000 --- a/test/message/esm_display_syntax_error.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// Flags: --no-harmony-top-level-await - -'use strict'; -await async () => 0; diff --git a/test/message/esm_display_syntax_error.out b/test/message/esm_display_syntax_error.out deleted file mode 100644 index 46db263e67181f..00000000000000 --- a/test/message/esm_display_syntax_error.out +++ /dev/null @@ -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 * diff --git a/test/parallel/test-no-harmony-top-level-await.mjs b/test/parallel/test-no-harmony-top-level-await.mjs deleted file mode 100644 index 5805af0e5ee265..00000000000000 --- a/test/parallel/test-no-harmony-top-level-await.mjs +++ /dev/null @@ -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')); diff --git a/tools/code_cache/mkcodecache.cc b/tools/code_cache/mkcodecache.cc index 3a1d0ee50e5078..9a0127184372bc 100644 --- a/tools/code_cache/mkcodecache.cc +++ b/tools/code_cache/mkcodecache.cc @@ -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] << " \n";