Skip to content

Commit

Permalink
build: replace runtime flag with compiler option
Browse files Browse the repository at this point in the history
V8 changed the typed array threshold option from a runtime flag to a
compile-time option.

PR-URL: nodejs#16271
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
  • Loading branch information
psmarshall authored and targos committed Dec 6, 2017
1 parent a1ed29b commit 2c75b52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,10 @@ def configure_v8(o):
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
o['variables']['force_dynamic_crt'] = 1 if options.shared else 0
o['variables']['node_enable_d8'] = b(options.enable_d8)
# Unconditionally force typed arrays to allocate outside the v8 heap. This
# is to prevent memory pointers from being moved around that are returned by
# Buffer::Data().
o['variables']['v8_typed_array_max_size_in_heap'] = 0
if options.enable_d8:
o['variables']['test_isolation_mode'] = 'noop' # Needed by d8.gyp.
if options.without_bundled_v8 and options.enable_d8:
Expand Down
6 changes: 0 additions & 6 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4232,12 +4232,6 @@ void Init(int* argc,
}
#endif

// Unconditionally force typed arrays to allocate outside the v8 heap. This
// is to prevent memory pointers from being moved around that are returned by
// Buffer::Data().
const char no_typed_array_heap[] = "--typed_array_max_size_in_heap=0";
V8::SetFlagsFromString(no_typed_array_heap, sizeof(no_typed_array_heap) - 1);

// Needed for access to V8 intrinsics. Disabled again during bootstrapping,
// see lib/internal/bootstrap_node.js.
const char allow_natives_syntax[] = "--allow_natives_syntax";
Expand Down

0 comments on commit 2c75b52

Please sign in to comment.