diff options
author | Ujjwal Sharma <usharma1998@gmail.com> | 2018-07-21 22:09:45 +0530 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-07-29 16:59:31 +0200 |
commit | 35ec9b247e25b997bd4150897f15f5e76cf01779 (patch) | |
tree | c9c346951961a7f59185797565b7048c039cad86 /src/node_os.cc | |
parent | 51812ff12b9e10549725bcda57167148428e256c (diff) | |
download | android-node-v8-35ec9b247e25b997bd4150897f15f5e76cf01779.tar.gz android-node-v8-35ec9b247e25b997bd4150897f15f5e76cf01779.tar.bz2 android-node-v8-35ec9b247e25b997bd4150897f15f5e76cf01779.zip |
src: remove calls to deprecated v8 functions (NewFromUtf8)
Remove all calls to deprecated v8 functions (here: String::NewFromUtf8) inside
the code (src directory only).
PR-URL: https://github.com/nodejs/node/pull/21926
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_os.cc')
-rw-r--r-- | src/node_os.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/node_os.cc b/src/node_os.cc index 6698531998..e0ea7e7b82 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -261,7 +261,8 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) { // contain non-ASCII characters. On UNIX, it's just a binary string with // no particular encoding but we treat it as a one-byte Latin-1 string. #ifdef _WIN32 - name = String::NewFromUtf8(env->isolate(), raw_name); + name = String::NewFromUtf8(env->isolate(), raw_name, + v8::NewStringType::kNormal).ToLocalChecked(); #else name = OneByteString(env->isolate(), raw_name); #endif @@ -335,8 +336,8 @@ static void GetHomeDirectory(const FunctionCallbackInfo<Value>& args) { Local<String> home = String::NewFromUtf8(env->isolate(), buf, - String::kNormalString, - len); + v8::NewStringType::kNormal, + len).ToLocalChecked(); args.GetReturnValue().Set(home); } |