From 94e980c9d380fb4b63b175c3dd8ddaa7928b5747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sat, 20 Jul 2019 13:35:59 +0200 Subject: [PATCH] src: use non-deprecated overload of V8::SetFlagsFromString MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/28016 Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann (רפאל פלחי) Reviewed-By: Rich Trott Reviewed-By: Michael Dawson Reviewed-By: Jiawen Geng --- src/node.cc | 6 ++++-- src/node_v8.cc | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/node.cc b/src/node.cc index 6b6bacf5faa8f2..17963d0b11b297 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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(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(6)); UNREACHABLE(); } diff --git a/src/node_v8.cc b/src/node_v8.cc index 9644468c4f6315..ed2e71de1069bb 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -139,7 +139,7 @@ void UpdateHeapCodeStatisticsArrayBuffer( void SetFlagsFromString(const FunctionCallbackInfo& args) { CHECK(args[0]->IsString()); String::Utf8Value flags(args.GetIsolate(), args[0]); - V8::SetFlagsFromString(*flags, flags.length()); + V8::SetFlagsFromString(*flags, static_cast(flags.length())); }