diff options
author | Ouyang Yadong <oyydoibh@gmail.com> | 2018-10-25 14:05:41 +0800 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2018-10-30 13:24:24 -0400 |
commit | 2cab511d956145579049a5183b5c05fd50fee412 (patch) | |
tree | 8faa6b1b51cce7d69e66d7fff650f60c54093c6d /src/tcp_wrap.cc | |
parent | bd8c1078941a7a6de93892fe529868adee357917 (diff) | |
download | android-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/tcp_wrap.cc')
-rw-r--r-- | src/tcp_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index cda30d8410..d462eff15d 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -124,7 +124,7 @@ void TCPWrap::Initialize(Local<Object> target, NODE_DEFINE_CONSTANT(constants, SOCKET); NODE_DEFINE_CONSTANT(constants, SERVER); target->Set(context, - FIXED_ONE_BYTE_STRING(env->isolate(), "constants"), + env->constants_string(), constants).FromJust(); } |