diff --git a/patches/v8/.patches b/patches/v8/.patches index ff0b6eb65d118..5d74c796bcf93 100644 --- a/patches/v8/.patches +++ b/patches/v8/.patches @@ -6,3 +6,4 @@ workaround_an_undefined_symbol_error.patch do_not_export_private_v8_symbols_on_windows.patch fix_build_deprecated_attirbute_for_older_msvc_versions.patch fix_disable_implies_dcheck_for_node_stream_array_buffers.patch +fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch diff --git a/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch b/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch new file mode 100644 index 0000000000000..c7868d98cf43a --- /dev/null +++ b/patches/v8/fix_use_allocationtype_kold_in_v8_scriptormodule_legacy_lifetime.patch @@ -0,0 +1,56 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Tue, 4 Jan 2022 14:55:00 -0800 +Subject: fix: use allocationtype kold in v8 scriptormodule legacy lifetime + +Changed in this CL: https://chromium-review.googlesource.com/c/v8/v8/+/3211575 +Upstream proposed fix: https://chromium-review.googlesource.com/c/v8/v8/+/3354087 + +Enabling V8_SCRIPTORMODULE_LEGACY_LIFETIME is necessary to fix ESM in +Node.js, but Blink expects old allocations so we change this in the +interim while Node.js works to remove their usage of WeakRefs to +ScriptOrModule. + +This patch can be removed when the upsteam fix is merged, or +when support is added in Node.js + +diff --git a/src/heap/factory-base.cc b/src/heap/factory-base.cc +index 89eb0defc2c1f1d2f6f59c3fb107d844e0c7f986..509cc193f339fc2d44ee493c6fe6c17c024b55fb 100644 +--- a/src/heap/factory-base.cc ++++ b/src/heap/factory-base.cc +@@ -247,7 +247,7 @@ Handle