summaryrefslogtreecommitdiff
path: root/src/pipe_wrap.cc
diff options
context:
space:
mode:
authorOuyang Yadong <oyydoibh@gmail.com>2018-10-25 14:05:41 +0800
committerRefael Ackermann <refack@gmail.com>2018-10-30 13:24:24 -0400
commit2cab511d956145579049a5183b5c05fd50fee412 (patch)
tree8faa6b1b51cce7d69e66d7fff650f60c54093c6d /src/pipe_wrap.cc
parentbd8c1078941a7a6de93892fe529868adee357917 (diff)
downloadandroid-node-v8-2cab511d956145579049a5183b5c05fd50fee412.tar.gz
android-node-v8-2cab511d956145579049a5183b5c05fd50fee412.tar.bz2
android-node-v8-2cab511d956145579049a5183b5c05fd50fee412.zip
src: use "constants" string instead of creating new one
Using the same "constants" string in c++. PR-URL: https://github.com/nodejs/node/pull/23894 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Diffstat (limited to 'src/pipe_wrap.cc')
-rw-r--r--src/pipe_wrap.cc2
1 files changed, 1 insertions, 1 deletions
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<Object> 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();
}