diff options
author | cjihrig <cjihrig@gmail.com> | 2018-10-12 12:45:26 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-10-14 13:23:16 -0400 |
commit | ff8db70bc2eacf1cc494573bb6e8335b82c9da49 (patch) | |
tree | 2328de9cf495cda9adcf2a6de732d99d12d0162a /benchmark/util | |
parent | eeb2c8fcbbd15d42376249d43fec0cda648b9f72 (diff) | |
download | android-node-v8-ff8db70bc2eacf1cc494573bb6e8335b82c9da49.tar.gz android-node-v8-ff8db70bc2eacf1cc494573bb6e8335b82c9da49.tar.bz2 android-node-v8-ff8db70bc2eacf1cc494573bb6e8335b82c9da49.zip |
benchmark: add common.binding()
Recently, process.binding() was replaced with internalBinding().
However, internalBinding() is not available on older builds of
Node, which are often used for benchmarking purposes. This commit
adds a common.binding() to the benchmarks to work around the
issue. Hopefully, this can be removed in the not too distant
future.
PR-URL: https://github.com/nodejs/node/pull/23460
Fixes: https://github.com/nodejs/node/issues/23436
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'benchmark/util')
-rw-r--r-- | benchmark/util/type-check.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/benchmark/util/type-check.js b/benchmark/util/type-check.js index d9acdaedf5..f11471980d 100644 --- a/benchmark/util/type-check.js +++ b/benchmark/util/type-check.js @@ -38,8 +38,7 @@ function main({ type, argument, version, n }) { // For testing, if supplied with an empty type, default to ArrayBufferView. type = type || 'ArrayBufferView'; - const { internalBinding } = require('internal/test/binding'); - const util = internalBinding('util'); + const util = common.binding('util'); const types = require('internal/util/types'); const func = { native: util, js: types }[version][`is${type}`]; |