src: use non-deprecated overload of V8::SetFlagsFromString

PR-URL: https://github.com/nodejs/node/pull/28016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
This commit is contained in:
Michaël Zasso 2019-07-20 13:35:59 +02:00
parent 1dd31fe1aa
commit 94e980c9d3
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600
2 changed files with 5 additions and 3 deletions

View File

@ -945,7 +945,8 @@ void Init(int* argc,
}
if (per_process::cli_options->print_v8_help) {
V8::SetFlagsFromString("--help", 6); // Doesn't return.
// Doesn't return.
V8::SetFlagsFromString("--help", static_cast<size_t>(6));
UNREACHABLE();
}
@ -1002,7 +1003,8 @@ InitializationResult InitializeOncePerProcess(int argc, char** argv) {
}
if (per_process::cli_options->print_v8_help) {
V8::SetFlagsFromString("--help", 6); // Doesn't return.
// Doesn't return.
V8::SetFlagsFromString("--help", static_cast<size_t>(6));
UNREACHABLE();
}

View File

@ -139,7 +139,7 @@ void UpdateHeapCodeStatisticsArrayBuffer(
void SetFlagsFromString(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsString());
String::Utf8Value flags(args.GetIsolate(), args[0]);
V8::SetFlagsFromString(*flags, flags.length());
V8::SetFlagsFromString(*flags, static_cast<size_t>(flags.length()));
}