Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 592f5bd

Browse filesBrowse files
oyydMylesBorins
authored andcommitted
src: use "constants" string instead of creating new one
Using the same "constants" string in c++. PR-URL: #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>
1 parent ff59c1c commit 592f5bd
Copy full SHA for 592f5bd

File tree

Expand file treeCollapse file tree

3 files changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎src/node_http2.cc‎

Copy file name to clipboardExpand all lines: src/node_http2.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3114,7 +3114,7 @@ HTTP_STATUS_CODES(V)
31143114
env->SetMethod(target, "packSettings", PackSettings);
31153115

31163116
target->Set(context,
3117-
FIXED_ONE_BYTE_STRING(isolate, "constants"),
3117+
env->constants_string(),
31183118
constants).FromJust();
31193119
target->Set(context,
31203120
FIXED_ONE_BYTE_STRING(isolate, "nameForErrorCode"),
Collapse file

‎src/pipe_wrap.cc‎

Copy file name to clipboardExpand all lines: src/pipe_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void PipeWrap::Initialize(Local<Object> target,
109109
NODE_DEFINE_CONSTANT(constants, UV_READABLE);
110110
NODE_DEFINE_CONSTANT(constants, UV_WRITABLE);
111111
target->Set(context,
112-
FIXED_ONE_BYTE_STRING(env->isolate(), "constants"),
112+
env->constants_string(),
113113
constants).FromJust();
114114
}
115115

Collapse file

‎src/tcp_wrap.cc‎

Copy file name to clipboardExpand all lines: src/tcp_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void TCPWrap::Initialize(Local<Object> target,
124124
NODE_DEFINE_CONSTANT(constants, SOCKET);
125125
NODE_DEFINE_CONSTANT(constants, SERVER);
126126
target->Set(context,
127-
FIXED_ONE_BYTE_STRING(env->isolate(), "constants"),
127+
env->constants_string(),
128128
constants).FromJust();
129129
}
130130

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.