Skip to content

Commit 2c75b52

Browse files
psmarshalltargos
authored andcommitted
build: replace runtime flag with compiler option
V8 changed the typed array threshold option from a runtime flag to a compile-time option. PR-URL: #16271 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent a1ed29b commit 2c75b52

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

configure

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,10 @@ def configure_v8(o):
10271027
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
10281028
o['variables']['force_dynamic_crt'] = 1 if options.shared else 0
10291029
o['variables']['node_enable_d8'] = b(options.enable_d8)
1030+
# Unconditionally force typed arrays to allocate outside the v8 heap. This
1031+
# is to prevent memory pointers from being moved around that are returned by
1032+
# Buffer::Data().
1033+
o['variables']['v8_typed_array_max_size_in_heap'] = 0
10301034
if options.enable_d8:
10311035
o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
10321036
if options.without_bundled_v8 and options.enable_d8:

src/node.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4232,12 +4232,6 @@ void Init(int* argc,
42324232
}
42334233
#endif
42344234

4235-
// Unconditionally force typed arrays to allocate outside the v8 heap. This
4236-
// is to prevent memory pointers from being moved around that are returned by
4237-
// Buffer::Data().
4238-
const char no_typed_array_heap[] = "--typed_array_max_size_in_heap=0";
4239-
V8::SetFlagsFromString(no_typed_array_heap, sizeof(no_typed_array_heap) - 1);
4240-
42414235
// Needed for access to V8 intrinsics. Disabled again during bootstrapping,
42424236
// see lib/internal/bootstrap_node.js.
42434237
const char allow_natives_syntax[] = "--allow_natives_syntax";

0 commit comments

Comments
 (0)