Skip to content

Commit

Permalink
src: use non-deprecated overload of V8::SetFlagsFromString
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
targos committed Aug 1, 2019
1 parent 1dd31fe commit 94e980c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}

Expand Down
2 changes: 1 addition & 1 deletion src/node_v8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}


Expand Down

0 comments on commit 94e980c

Please sign in to comment.