Skip to content

Commit d724555

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 26de071 commit d724555

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
@@ -1001,6 +1001,10 @@ def configure_v8(o):
10011001
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
10021002
o['variables']['force_dynamic_crt'] = 1 if options.shared else 0
10031003
o['variables']['node_enable_d8'] = b(options.enable_d8)
1004+
# Unconditionally force typed arrays to allocate outside the v8 heap. This
1005+
# is to prevent memory pointers from being moved around that are returned by
1006+
# Buffer::Data().
1007+
o['variables']['v8_typed_array_max_size_in_heap'] = 0
10041008
if options.enable_d8:
10051009
o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
10061010
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
@@ -4677,12 +4677,6 @@ void Init(int* argc,
46774677
}
46784678
#endif
46794679

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

0 commit comments

Comments
 (0)