summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Marshall <p.s.marshall0@gmail.com>2017-09-14 12:51:54 +0200
committerMichaƫl Zasso <targos@protonmail.com>2017-12-06 12:52:07 +0100
commit2c75b52af88961e15563ddf452ba1c199ad0ef53 (patch)
treee738930f52ac4c95f100e5c8f2489a850c189564
parenta1ed29b1c63675420832048d330b78c18d0edd77 (diff)
downloadandroid-node-v8-2c75b52af88961e15563ddf452ba1c199ad0ef53.tar.gz
android-node-v8-2c75b52af88961e15563ddf452ba1c199ad0ef53.tar.bz2
android-node-v8-2c75b52af88961e15563ddf452ba1c199ad0ef53.zip
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: https://github.com/nodejs/node/pull/16271 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Myles Borins <myles.borins@gmail.com>
-rwxr-xr-xconfigure4
-rw-r--r--src/node.cc6
2 files changed, 4 insertions, 6 deletions
diff --git a/configure b/configure
index 98a96ac0cb..ddcc37df54 100755
--- a/configure
+++ b/configure
@@ -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:
diff --git a/src/node.cc b/src/node.cc
index d515e6712b..ed2f0c14ff 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -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";