mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibJS: Convert Object::set() to ThrowCompletionOr
This commit is contained in:
parent
b7e5f08e56
commit
1d45541278
18 changed files with 89 additions and 188 deletions
|
@ -201,8 +201,8 @@ void GlobalEnvironment::create_global_function_binding(FlyString const& name, Va
|
|||
global_object.define_property_or_throw(name, desc);
|
||||
if (vm.exception())
|
||||
return;
|
||||
global_object.set(name, value, Object::ShouldThrowExceptions::Yes);
|
||||
if (vm.exception())
|
||||
auto result_or_error = global_object.set(name, value, Object::ShouldThrowExceptions::Yes);
|
||||
if (result_or_error.is_error())
|
||||
return;
|
||||
if (!m_var_names.contains_slow(name))
|
||||
m_var_names.append(name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue