mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
src: use ToLocal in node_os.cc
PR-URL: https://github.com/nodejs/node/pull/33939 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
committed by
James M Snell
parent
5ef5116311
commit
4438852aa1
@@ -268,10 +268,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;
|
||||
|
||||
Reference in New Issue
Block a user