Skip to content

Commit

Permalink
src: use ToLocal in node_os.cc
Browse files Browse the repository at this point in the history
PR-URL: #33939
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
wenningplus authored and codebytere committed Jul 14, 2020
1 parent 46dce9b commit d30e820
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/node_os.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ static void GetUserInfo(const FunctionCallbackInfo<Value>& args) {
Local<Object> options = args[0].As<Object>();
MaybeLocal<Value> maybe_encoding = options->Get(env->context(),
env->encoding_string());
if (maybe_encoding.IsEmpty())
return;
Local<Value> encoding_opt;
if (!maybe_encoding.ToLocal(&encoding_opt))
return;

Local<Value> encoding_opt = maybe_encoding.ToLocalChecked();
encoding = ParseEncoding(env->isolate(), encoding_opt, UTF8);
} else {
encoding = UTF8;
Expand Down

0 comments on commit d30e820

Please sign in to comment.