Skip to content

Commit 89b8415

Browse files
psmarshallnodejs-ci
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.
1 parent 742f949 commit 89b8415

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
@@ -1028,6 +1028,10 @@ def configure_v8(o):
10281028
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
10291029
o['variables']['force_dynamic_crt'] = 1 if options.shared else 0
10301030
o['variables']['node_enable_d8'] = b(options.enable_d8)
1031+
# Unconditionally force typed arrays to allocate outside the v8 heap. This
1032+
# is to prevent memory pointers from being moved around that are returned by
1033+
# Buffer::Data().
1034+
o['variables']['v8_typed_array_max_size_in_heap'] = 0
10311035
if options.enable_d8:
10321036
o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
10331037
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
@@ -4282,12 +4282,6 @@ void Init(int* argc,
42824282
}
42834283
#endif
42844284

4285-
// Unconditionally force typed arrays to allocate outside the v8 heap. This
4286-
// is to prevent memory pointers from being moved around that are returned by
4287-
// Buffer::Data().
4288-
const char no_typed_array_heap[] = "--typed_array_max_size_in_heap=0";
4289-
V8::SetFlagsFromString(no_typed_array_heap, sizeof(no_typed_array_heap) - 1);
4290-
42914285
// We should set node_is_initialized here instead of in node::Start,
42924286
// otherwise embedders using node::Init to initialize everything will not be
42934287
// able to set it and native modules will not load for them.

0 commit comments

Comments
 (0)