diff options
author | Jayasankar <jayasankar.m@gmail.com> | 2018-11-23 13:09:20 +0300 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2019-06-25 18:47:55 +0300 |
commit | 08a32fbf57a1d8735a1e50888ce3cde8f4089f23 (patch) | |
tree | b10e43006587dbcc64275a6c5e2790cae96832a8 /src | |
parent | 5ffe04753e372c06826c76b57ece2888fbd05208 (diff) |
src: elevate v8 namespaces for node_process.cc
Elevate namespace for repeated entities.
Resolved conflicts.
PR-URL: https://github.com/nodejs/node/pull/24578
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_process.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/node_process.cc b/src/node_process.cc index 58f446aa794..e008d2a9a67 100644 --- a/src/node_process.cc +++ b/src/node_process.cc @@ -54,6 +54,7 @@ using v8::Integer; using v8::Isolate; using v8::Local; using v8::Name; +using v8::NewStringType; using v8::PropertyCallbackInfo; using v8::String; using v8::Uint32; @@ -129,7 +130,7 @@ void Cwd(const FunctionCallbackInfo<Value>& args) { Local<String> cwd = String::NewFromUtf8(env->isolate(), buf, - v8::NewStringType::kNormal, + NewStringType::kNormal, cwd_len).ToLocalChecked(); args.GetReturnValue().Set(cwd); } @@ -577,7 +578,7 @@ void ProcessTitleGetter(Local<Name> property, char buffer[512]; uv_get_process_title(buffer, sizeof(buffer)); info.GetReturnValue().Set(String::NewFromUtf8(info.GetIsolate(), buffer, - v8::NewStringType::kNormal).ToLocalChecked()); + NewStringType::kNormal).ToLocalChecked()); } @@ -602,7 +603,7 @@ void EnvGetter(Local<Name> property, const char* val = getenv(*key); if (val) { return info.GetReturnValue().Set(String::NewFromUtf8(isolate, val, - v8::NewStringType::kNormal).ToLocalChecked()); + NewStringType::kNormal).ToLocalChecked()); } #else // _WIN32 node::TwoByteValue key(isolate, property); @@ -618,7 +619,7 @@ void EnvGetter(Local<Name> property, result < arraysize(buffer)) { const uint16_t* two_byte_buffer = reinterpret_cast<const uint16_t*>(buffer); v8::MaybeLocal<String> rc = String::NewFromTwoByte( - isolate, two_byte_buffer, v8::NewStringType::kNormal); + isolate, two_byte_buffer, NewStringType::kNormal); if (rc.IsEmpty()) { isolate->ThrowException(ERR_STRING_TOO_LONG(isolate)); return; @@ -734,7 +735,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) { const int length = s ? s - var : strlen(var); argv[idx] = String::NewFromUtf8(isolate, var, - v8::NewStringType::kNormal, + NewStringType::kNormal, length).ToLocalChecked(); if (++idx >= arraysize(argv)) { fn->Call(ctx, envarr, idx, argv).ToLocalChecked(); @@ -767,7 +768,7 @@ void EnvEnumerator(const PropertyCallbackInfo<Array>& info) { v8::MaybeLocal<String> rc = String::NewFromTwoByte(isolate, two_byte_buffer, - v8::NewStringType::kNormal, + NewStringType::kNormal, two_byte_buffer_len); if (rc.IsEmpty()) { isolate->ThrowException(ERR_STRING_TOO_LONG(isolate)); |