mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
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>
This commit is contained in:
1 parent
fa12532000
commit
e8dbd09414
3 files changed
+3
-3
No files matched your search
+1
-1
@@ -3289,7 +3289,7 @@ HTTP_STATUS_CODES(V)
|
||||
env->SetMethod(target, "packSettings", PackSettings);
|
||||
|
||||
target->Set(context,
|
||||
FIXED_ONE_BYTE_STRING(isolate, "constants"),
|
||||
env->constants_string(),
|
||||
constants).FromJust();
|
||||
target->Set(context,
|
||||
FIXED_ONE_BYTE_STRING(isolate, "nameForErrorCode"),
|
||||
|
||||
+1
-1
@@ -117,7 +117,7 @@ void PipeWrap::Initialize(Local<Object> target,
|
||||
NODE_DEFINE_CONSTANT(constants, SERVER);
|
||||
NODE_DEFINE_CONSTANT(constants, IPC);
|
||||
target->Set(context,
|
||||
FIXED_ONE_BYTE_STRING(env->isolate(), "constants"),
|
||||
env->constants_string(),
|
||||
constants).FromJust();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -132,7 +132,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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user