refactor: return-braced-init-list pt 2 of 2 (#44891)
* refactor: more return-braced-init-list, this time for v8 and gin objects Co-authored-by: Charles Kerr <charles@charleskerr.com> * refactor: more return-braced-init-list, this time for v8, gin, std, and base objects Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
dc0c6c6f3f
commit
c63613f290
35 changed files with 64 additions and 64 deletions
|
@ -415,7 +415,7 @@ gin::Handle<UtilityProcessWrapper> UtilityProcessWrapper::Create(
|
|||
gin_helper::Dictionary dict;
|
||||
if (!args->GetNext(&dict)) {
|
||||
args->ThrowTypeError("Options must be an object.");
|
||||
return gin::Handle<UtilityProcessWrapper>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::u16string display_name;
|
||||
|
@ -429,19 +429,19 @@ gin::Handle<UtilityProcessWrapper> UtilityProcessWrapper::Create(
|
|||
dict.Get("modulePath", ¶ms->script);
|
||||
if (dict.Has("args") && !dict.Get("args", ¶ms->args)) {
|
||||
args->ThrowTypeError("Invalid value for args");
|
||||
return gin::Handle<UtilityProcessWrapper>();
|
||||
return {};
|
||||
}
|
||||
|
||||
gin_helper::Dictionary opts;
|
||||
if (dict.Get("options", &opts)) {
|
||||
if (opts.Has("env") && !opts.Get("env", &env_map)) {
|
||||
args->ThrowTypeError("Invalid value for env");
|
||||
return gin::Handle<UtilityProcessWrapper>();
|
||||
return {};
|
||||
}
|
||||
|
||||
if (opts.Has("execArgv") && !opts.Get("execArgv", ¶ms->exec_args)) {
|
||||
args->ThrowTypeError("Invalid value for execArgv");
|
||||
return gin::Handle<UtilityProcessWrapper>();
|
||||
return {};
|
||||
}
|
||||
|
||||
opts.Get("serviceName", &display_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue