From 51cea618e21ba88bc20feb537a72c1b831a94b46 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 9 Nov 2018 12:22:30 +0800 Subject: os: do not call into JS to push values to an array in GetCPUInfo Instead of calling into JS from C++ to push values into an array, use the new Array::New API that takes a pointer and a length directly. PR-URL: https://github.com/nodejs/node/pull/24264 Reviewed-By: Anna Henningsen Reviewed-By: Daniel Bevenius Reviewed-By: Refael Ackermann --- src/node_util.cc | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/node_util.cc') diff --git a/src/node_util.cc b/src/node_util.cc index 62af7a1115..1a08c0e255 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -24,7 +24,6 @@ using v8::Private; using v8::Promise; using v8::PropertyFilter; using v8::Proxy; -using v8::ReadOnly; using v8::SKIP_STRINGS; using v8::SKIP_SYMBOLS; using v8::String; @@ -206,12 +205,6 @@ void Initialize(Local target, } #undef V - target->DefineOwnProperty( - env->context(), - OneByteString(env->isolate(), "pushValToArrayMax"), - Integer::NewFromUnsigned(env->isolate(), NODE_PUSH_VAL_TO_ARRAY_MAX), - ReadOnly).FromJust(); - #define V(name) \ target->Set(context, \ FIXED_ONE_BYTE_STRING(env->isolate(), #name), \ -- cgit v1.2.3