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:
parent
1dd31fe1aa
commit
94e980c9d3
@ -945,7 +945,8 @@ void Init(int* argc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (per_process::cli_options->print_v8_help) {
|
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();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1002,7 +1003,8 @@ InitializationResult InitializeOncePerProcess(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (per_process::cli_options->print_v8_help) {
|
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();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ void UpdateHeapCodeStatisticsArrayBuffer(
|
|||||||
void SetFlagsFromString(const FunctionCallbackInfo<Value>& args) {
|
void SetFlagsFromString(const FunctionCallbackInfo<Value>& args) {
|
||||||
CHECK(args[0]->IsString());
|
CHECK(args[0]->IsString());
|
||||||
String::Utf8Value flags(args.GetIsolate(), args[0]);
|
String::Utf8Value flags(args.GetIsolate(), args[0]);
|
||||||
V8::SetFlagsFromString(*flags, flags.length());
|
V8::SetFlagsFromString(*flags, static_cast<size_t>(flags.length()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user