Skip to content

Commit 08a32fb

Browse files
Jayasankar-mBethGriggs
authored andcommitted
src: elevate v8 namespaces for node_process.cc
Elevate namespace for repeated entities. Resolved conflicts. PR-URL: #24578 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5ffe047 commit 08a32fb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/node_process.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ using v8::Integer;
5454
using v8::Isolate;
5555
using v8::Local;
5656
using v8::Name;
57+
using v8::NewStringType;
5758
using v8::PropertyCallbackInfo;
5859
using v8::String;
5960
using v8::Uint32;
@@ -129,7 +130,7 @@ void Cwd(const FunctionCallbackInfo<Value>& args) {
129130

130131
Local<String> cwd = String::NewFromUtf8(env->isolate(),
131132
buf,
132-
v8::NewStringType::kNormal,
133+
NewStringType::kNormal,
133134
cwd_len).ToLocalChecked();
134135
args.GetReturnValue().Set(cwd);
135136
}
@@ -577,7 +578,7 @@ void ProcessTitleGetter(Local<Name> property,
577578
char buffer[512];
578579
uv_get_process_title(buffer, sizeof(buffer));
579580
info.GetReturnValue().Set(String::NewFromUtf8(info.GetIsolate(), buffer,
580-
v8::NewStringType::kNormal).ToLocalChecked());
581+
NewStringType::kNormal).ToLocalChecked());
581582
}
582583

583584

@@ -602,7 +603,7 @@ void EnvGetter(Local<Name> property,
602603
const char* val = getenv(*key);
603604
if (val) {
604605
return info.GetReturnValue().Set(String::NewFromUtf8(isolate, val,
605-
v8::NewStringType::kNormal).ToLocalChecked());
606+
NewStringType::kNormal).ToLocalChecked());
606607
}
607608
#else // _WIN32
608609
node::TwoByteValue key(isolate, property);
@@ -618,7 +619,7 @@ void EnvGetter(Local<Name> property,
618619
result < arraysize(buffer)) {
619620
const uint16_t* two_byte_buffer = reinterpret_cast<const uint16_t*>(buffer);
620621
v8::MaybeLocal<String> rc = String::NewFromTwoByte(
621-
isolate, two_byte_buffer, v8::NewStringType::kNormal);
622+
isolate, two_byte_buffer, NewStringType::kNormal);
622623
if (rc.IsEmpty()) {
623624
isolate->ThrowException(ERR_STRING_TOO_LONG(isolate));
624625
return;
@@ -734,7 +735,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
734735
const int length = s ? s - var : strlen(var);
735736
argv[idx] = String::NewFromUtf8(isolate,
736737
var,
737-
v8::NewStringType::kNormal,
738+
NewStringType::kNormal,
738739
length).ToLocalChecked();
739740
if (++idx >= arraysize(argv)) {
740741
fn->Call(ctx, envarr, idx, argv).ToLocalChecked();
@@ -767,7 +768,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
767768
v8::MaybeLocal<String> rc =
768769
String::NewFromTwoByte(isolate,
769770
two_byte_buffer,
770-
v8::NewStringType::kNormal,
771+
NewStringType::kNormal,
771772
two_byte_buffer_len);
772773
if (rc.IsEmpty()) {
773774
isolate->ThrowException(ERR_STRING_TOO_LONG(isolate));

0 commit comments

Comments
 (0)