Skip to content

Commit 23e7793

Browse files
committed
esm: js-string Wasm builtins in ESM Integration
nodejs/node#59179
1 parent 34203b7 commit 23e7793

6 files changed

Lines changed: 40 additions & 29 deletions

patches/node/.patches

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ build_compile_with_c_20_support.patch
3030
add_v8_taskpirority_to_foreground_task_runner_signature.patch
3131
cli_remove_deprecated_v8_flag.patch
3232
build_restore_clang_as_default_compiler_on_macos.patch
33-
fix_remove_harmony-import-assertions_from_node_cc.patch
33+
fix_remove_outdated_v8_flags_from_node_cc.patch
3434
chore_disable_deprecation_ftbfs_in_simdjson_header.patch
3535
build_allow_unbundling_of_node_js_dependencies.patch
3636
test_use_static_method_names_in_call_stacks.patch

patches/node/cli_move_--trace-atomics-wait_to_eol.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ index 6913992a5476d2317a34fb69d3c6af63b686f9a6..1faef5ba1d4206a5cc4c71cb71f7a08f
8383
Print stack traces for deprecations.
8484
.
8585
diff --git a/src/node.cc b/src/node.cc
86-
index 443c351d67a3efb3aece3480e2e21558b335120a..2f373662006a74b751bfd259863d8ca5373fddf3 100644
86+
index 0d383dcdb80fe30e3c2d6880b44f626f065bb1f3..9d9992dacbc595c987827f55eb12ea8af0480df6 100644
8787
--- a/src/node.cc
8888
+++ b/src/node.cc
8989
@@ -232,44 +232,6 @@ void Environment::WaitForInspectorFrontendByOptions() {

patches/node/fix_cppgc_initializing_twice.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This can be removed/refactored once Node.js upgrades to a version of V8
1212
containing the above CL.
1313

1414
diff --git a/src/node.cc b/src/node.cc
15-
index 2f373662006a74b751bfd259863d8ca5373fddf3..23fc21e450963284edb2495166b4f5d7d0bf0a72 100644
15+
index 9d9992dacbc595c987827f55eb12ea8af0480df6..d43a88b8780f04d186485a2dc58ad07083e699ac 100644
1616
--- a/src/node.cc
1717
+++ b/src/node.cc
1818
@@ -1222,7 +1222,7 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,

patches/node/fix_remove_harmony-import-assertions_from_node_cc.patch

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Shelley Vohr <shelley.vohr@gmail.com>
3+
Date: Fri, 18 Oct 2024 17:01:06 +0200
4+
Subject: fix: remove outdated V8 flags from node.cc
5+
6+
Refs https://chromium-review.googlesource.com/c/v8/v8/+/5507047
7+
Refs https://chromium-review.googlesource.com/c/v8/v8/+/6249026
8+
9+
The above CL removes the `--harmony-import-assertions` and
10+
--experimental-wasm-memory64 flags from V8.
11+
12+
This patch can be removed when we upgrade to a V8 version that
13+
contains the above CLs.
14+
15+
diff --git a/src/node.cc b/src/node.cc
16+
index 1b5e989e5456a9bf77475e06250702029568c08d..61d65094aebd7f3016d51a8e7c9c761fc69cecba 100644
17+
--- a/src/node.cc
18+
+++ b/src/node.cc
19+
@@ -816,7 +816,7 @@ static ExitCode ProcessGlobalArgsInternal(std::vector<std::string>* args,
20+
}
21+
// TODO(nicolo-ribaudo): remove this once V8 doesn't enable it by default
22+
// anymore.
23+
- v8_args.emplace_back("--no-harmony-import-assertions");
24+
+ // v8_args.emplace_back("--no-harmony-import-assertions");
25+
26+
auto env_opts = per_process::cli_options->per_isolate->per_env;
27+
if (std::find(v8_args.begin(), v8_args.end(),
28+
@@ -828,7 +828,7 @@ static ExitCode ProcessGlobalArgsInternal(std::vector<std::string>* args,
29+
30+
// Support stable Phase 5 WebAssembly proposals
31+
v8_args.emplace_back("--experimental-wasm-imported-strings");
32+
- v8_args.emplace_back("--experimental-wasm-memory64");
33+
+ // v8_args.emplace_back("--experimental-wasm-memory64");
34+
v8_args.emplace_back("--experimental-wasm-exnref");
35+
36+
#ifdef __POSIX__

patches/node/refactor_attach_cppgc_heap_on_v8_isolate_creation.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ index 1079e3beb02e5f5d71a15fd2db65cb93ebd175d6..a7be609c3ab9093cec5145367b95ae68
102102
worker::Worker* worker_context_ = nullptr;
103103
PerIsolateWrapperData* wrapper_data_;
104104
diff --git a/src/node.cc b/src/node.cc
105-
index b47ed0dafebbc9c344e0b72fe1435a136f70e8b3..443c351d67a3efb3aece3480e2e21558b335120a 100644
105+
index 61d65094aebd7f3016d51a8e7c9c761fc69cecba..0d383dcdb80fe30e3c2d6880b44f626f065bb1f3 100644
106106
--- a/src/node.cc
107107
+++ b/src/node.cc
108108
@@ -1271,6 +1271,14 @@ InitializeOncePerProcessInternal(const std::vector<std::string>& args,

0 commit comments

Comments
 (0)