From 2cab511d956145579049a5183b5c05fd50fee412 Mon Sep 17 00:00:00 2001 From: Ouyang Yadong Date: Thu, 25 Oct 2018 14:05:41 +0800 Subject: src: use "constants" string instead of creating new one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using the same "constants" string in c++. PR-URL: https://github.com/nodejs/node/pull/23894 Reviewed-By: Anna Henningsen Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Сковорода Никита Андреевич --- src/pipe_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pipe_wrap.cc') diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index eb1e06876c..66b9677cc9 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -109,7 +109,7 @@ void PipeWrap::Initialize(Local target, NODE_DEFINE_CONSTANT(constants, UV_READABLE); NODE_DEFINE_CONSTANT(constants, UV_WRITABLE); target->Set(context, - FIXED_ONE_BYTE_STRING(env->isolate(), "constants"), + env->constants_string(), constants).FromJust(); } -- cgit v1.2.3