summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMatt Loring <mattloring@google.com>2017-05-25 11:51:56 -0700
committerAnna Henningsen <anna@addaleax.net>2017-05-28 17:11:34 +0200
commit849f22309a3e612dd4b9483db32713f7e759215b (patch)
treed4a58b79312aabea98e342c26e132d73ab63eec9 /configure
parent5b50501395ebe9dd1fc33aa792e8d5a54a78cfb4 (diff)
downloadandroid-node-v8-849f22309a3e612dd4b9483db32713f7e759215b.tar.gz
android-node-v8-849f22309a3e612dd4b9483db32713f7e759215b.tar.bz2
android-node-v8-849f22309a3e612dd4b9483db32713f7e759215b.zip
async_wrap,src: wrap promises directly
Promises do not have any internal fields by default. V8 recently added the capability of configuring the number of internal fields on promises. This change adds an internal field to promises allowing promises to be wrapped directly by the PromiseWrap object. In addition to cleaner code this avoids an extra object allocation per promise and speeds up promise creation with async_hooks enabled by ~2x. PR-URL: https://github.com/nodejs/node/pull/13242 Ref: https://github.com/nodejs/node/pull/13224 Reviewed-By: Andreas Madsen <amwebdk@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure b/configure
index 7ce5e964e5..01aacb8ed0 100755
--- a/configure
+++ b/configure
@@ -954,6 +954,7 @@ def configure_v8(o):
o['variables']['v8_no_strict_aliasing'] = 1 # Work around compiler bugs.
o['variables']['v8_optimized_debug'] = 0 # Compile with -O0 in debug builds.
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
+ o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
o['variables']['v8_use_snapshot'] = 'false' if options.without_snapshot else 'true'
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)