Skip to content

Commit

Permalink
src: use "constants" string instead of creating new one
Browse files Browse the repository at this point in the history
Using the same "constants" string in c++.

PR-URL: #23894
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
  • Loading branch information
oyyd authored and MylesBorins committed Nov 29, 2018
1 parent c5577c1 commit d82e818
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3114,7 +3114,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"),
Expand Down
2 changes: 1 addition & 1 deletion src/pipe_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/tcp_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit d82e818

Please sign in to comment.