diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-07-07 23:03:17 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-07-14 16:13:34 +0300 |
commit | a038199265519fa4db88a639b0e438675d23c4d1 (patch) | |
tree | 66b40d0be7e8c67e9d69593d6e00d8fd2b2ca319 /src/node_os.cc | |
parent | 2a29650eb328417de68beb617b22e83810e9296a (diff) |
src,doc,test: remove String::New default parameter
`kNormal` has been the implicit default for a while now (since V8 7.6).
Refs: https://github.com/v8/v8/commit/e0d7f816990ada28ebe1281ca9431236ef8c6e4f
PR-URL: https://github.com/nodejs/node/pull/34248
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_os.cc')
-rw-r--r-- | src/node_os.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/node_os.cc b/src/node_os.cc index 085fb1aef01..2e151ac4f89 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -71,8 +71,7 @@ static void GetHostname(const FunctionCallbackInfo<Value>& args) { } args.GetReturnValue().Set( - String::NewFromUtf8(env->isolate(), buf, NewStringType::kNormal) - .ToLocalChecked()); + String::NewFromUtf8(env->isolate(), buf).ToLocalChecked()); } static void GetOSInformation(const FunctionCallbackInfo<Value>& args) { @@ -192,8 +191,7 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo<Value>& args) { // to assume UTF8 as the default as well. It’s what people will expect if // they name the interface from any input that uses UTF-8, which should be // the most frequent case by far these days.) - name = String::NewFromUtf8(isolate, raw_name, - NewStringType::kNormal).ToLocalChecked(); + name = String::NewFromUtf8(isolate, raw_name).ToLocalChecked(); snprintf(mac.data(), mac.size(), |