diff --git a/src/node_http2.cc b/src/node_http2.cc index f56489bc5a034e..ea94713ecbaefe 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -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"), diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 0f2259b789e464..9b1779b84561ad 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -117,7 +117,7 @@ void PipeWrap::Initialize(Local 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(); } diff --git a/src/tcp_wrap.cc b/src/tcp_wrap.cc index 3ad0eb4e0ce4fe..65d5adabd86663 100644 --- a/src/tcp_wrap.cc +++ b/src/tcp_wrap.cc @@ -132,7 +132,7 @@ void TCPWrap::Initialize(Local 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(); }