-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: improve error handling in multiple files #56962
base: main
Are you sure you want to change the base?
src: improve error handling in multiple files #56962
Conversation
info.GetReturnValue().Set( | ||
String::NewFromUtf8(isolate, out.str().c_str()).ToLocalChecked()); | ||
Local<Value> ret; | ||
if (ToV8Value(env->context(), out.str(), env->isolate()).ToLocal(&ret)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this Pr, but we should definitely rewrite this function to avoid calling std::ostringstream
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as outdated.
This comment was marked as outdated.
FIXED_ONE_BYTE_STRING(isolate, "execArgv"), | ||
ToV8Value(context, env->exec_argv()) | ||
.ToLocalChecked()).Check(); | ||
if (!ToV8Value(context, env->exec_argv()).ToLocal(&val) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth to keep the comment.
if (!ToV8Value(context, env->exec_argv()).ToLocal(&val) || | |
// process.execArgv | |
if (!ToV8Value(context, env->exec_argv()).ToLocal(&val) || |
env->exec_path().size()) | ||
.ToLocalChecked()) | ||
.Check(); | ||
if (!ToV8Value(context, env->exec_path(), isolate).ToLocal(&val) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, better to keep the comment for searching.
if (!ToV8Value(context, env->exec_path(), isolate).ToLocal(&val) || | |
// process.execPath | |
if (!ToV8Value(context, env->exec_path(), isolate).ToLocal(&val) || |
Replace multiple uses of ToLocalChecked