summaryrefslogtreecommitdiff
path: root/src/node_util.cc
diff options
context:
space:
mode:
authorBrian White <mscdex@mscdex.net>2017-02-25 23:40:39 -0500
committerBrian White <mscdex@mscdex.net>2017-03-02 15:31:21 -0500
commit4e05952a8a75af6df625415db612d3a9a1322682 (patch)
tree0ae32c1f3c65cb506effdfcfd0a5a75dce1b7586 /src/node_util.cc
parent22d7dc221211678dd1d5ce30d298791df7dfd956 (diff)
downloadandroid-node-v8-4e05952a8a75af6df625415db612d3a9a1322682.tar.gz
android-node-v8-4e05952a8a75af6df625415db612d3a9a1322682.tar.bz2
android-node-v8-4e05952a8a75af6df625415db612d3a9a1322682.zip
os: improve cpus() performance
PR-URL: https://github.com/nodejs/node/pull/11564 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
Diffstat (limited to 'src/node_util.cc')
-rw-r--r--src/node_util.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node_util.cc b/src/node_util.cc
index a1387353e3..8279a787d7 100644
--- a/src/node_util.cc
+++ b/src/node_util.cc
@@ -141,6 +141,12 @@ void Initialize(Local<Object> target,
}
#undef V
+ target->DefineOwnProperty(
+ env->context(),
+ OneByteString(env->isolate(), "pushValToArrayMax"),
+ Integer::NewFromUnsigned(env->isolate(), NODE_PUSH_VAL_TO_ARRAY_MAX),
+ v8::ReadOnly).FromJust();
+
env->SetMethod(target, "getHiddenValue", GetHiddenValue);
env->SetMethod(target, "setHiddenValue", SetHiddenValue);
env->SetMethod(target, "getProxyDetails", GetProxyDetails);