diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-07-07 22:03:17 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-07-14 15:13:34 +0200 |
commit | a038199265519fa4db88a639b0e438675d23c4d1 (patch) | |
tree | 66b40d0be7e8c67e9d69593d6e00d8fd2b2ca319 /src/node_process_events.cc | |
parent | 2a29650eb328417de68beb617b22e83810e9296a (diff) | |
download | node-new-a038199265519fa4db88a639b0e438675d23c4d1.tar.gz |
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_process_events.cc')
-rw-r--r-- | src/node_process_events.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/node_process_events.cc b/src/node_process_events.cc index 1b902949e2..0c149b26e3 100644 --- a/src/node_process_events.cc +++ b/src/node_process_events.cc @@ -14,7 +14,6 @@ using v8::Just; using v8::Local; using v8::Maybe; using v8::MaybeLocal; -using v8::NewStringType; using v8::Nothing; using v8::Object; using v8::String; @@ -58,21 +57,18 @@ Maybe<bool> ProcessEmitWarningGeneric(Environment* env, // The caller has to be able to handle a failure anyway, so we might as well // do proper error checking for string creation. - if (!String::NewFromUtf8(env->isolate(), warning, NewStringType::kNormal) - .ToLocal(&args[argc++])) { + if (!String::NewFromUtf8(env->isolate(), warning).ToLocal(&args[argc++])) return Nothing<bool>(); - } + if (type != nullptr) { if (!String::NewFromOneByte(env->isolate(), - reinterpret_cast<const uint8_t*>(type), - NewStringType::kNormal) + reinterpret_cast<const uint8_t*>(type)) .ToLocal(&args[argc++])) { return Nothing<bool>(); } if (code != nullptr && !String::NewFromOneByte(env->isolate(), - reinterpret_cast<const uint8_t*>(code), - NewStringType::kNormal) + reinterpret_cast<const uint8_t*>(code)) .ToLocal(&args[argc++])) { return Nothing<bool>(); } |