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_url.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_url.cc')
-rw-r--r-- | src/node_url.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/node_url.cc b/src/node_url.cc index b1b21a8ad3c..a4549ea4b8c 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -2175,9 +2175,7 @@ void Parse(Environment* env, Local<Value> argv[2] = { undef, undef }; argv[ERR_ARG_FLAGS] = Integer::NewFromUnsigned(isolate, url.flags); argv[ERR_ARG_INPUT] = - String::NewFromUtf8(env->isolate(), - input, - NewStringType::kNormal).ToLocalChecked(); + String::NewFromUtf8(env->isolate(), input).ToLocalChecked(); error_cb.As<Function>()->Call(context, recv, arraysize(argv), argv) .FromMaybe(Local<Value>()); } @@ -2225,9 +2223,7 @@ void EncodeAuthSet(const FunctionCallbackInfo<Value>& args) { AppendOrEscape(&output, ch, USERINFO_ENCODE_SET); } args.GetReturnValue().Set( - String::NewFromUtf8(env->isolate(), - output.c_str(), - NewStringType::kNormal).ToLocalChecked()); + String::NewFromUtf8(env->isolate(), output.c_str()).ToLocalChecked()); } void ToUSVString(const FunctionCallbackInfo<Value>& args) { @@ -2279,9 +2275,7 @@ void DomainToASCII(const FunctionCallbackInfo<Value>& args) { } std::string out = host.ToStringMove(); args.GetReturnValue().Set( - String::NewFromUtf8(env->isolate(), - out.c_str(), - NewStringType::kNormal).ToLocalChecked()); + String::NewFromUtf8(env->isolate(), out.c_str()).ToLocalChecked()); } void DomainToUnicode(const FunctionCallbackInfo<Value>& args) { @@ -2299,9 +2293,7 @@ void DomainToUnicode(const FunctionCallbackInfo<Value>& args) { } std::string out = host.ToStringMove(); args.GetReturnValue().Set( - String::NewFromUtf8(env->isolate(), - out.c_str(), - NewStringType::kNormal).ToLocalChecked()); + String::NewFromUtf8(env->isolate(), out.c_str()).ToLocalChecked()); } void SetURLConstructor(const FunctionCallbackInfo<Value>& args) { |