mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibJS: Remove the non-standard put helper and replace it's usages
This removes all usages of the non-standard put helper method and replaces all of it's usages with the specification required alternative or with define_direct_property where appropriate.
This commit is contained in:
parent
53f70e5208
commit
e3ef241108
15 changed files with 40 additions and 49 deletions
|
@ -160,7 +160,7 @@ void VM::set_variable(const FlyString& name, Value value, GlobalObject& global_o
|
|||
return;
|
||||
}
|
||||
|
||||
global_object.put(name, value);
|
||||
global_object.set(name, value, true);
|
||||
}
|
||||
|
||||
bool VM::delete_variable(FlyString const& name)
|
||||
|
@ -298,7 +298,7 @@ void VM::assign(const NonnullRefPtr<BindingPattern>& target, Value value, Global
|
|||
continue;
|
||||
if (seen_names.contains(object_property.key.to_display_string()))
|
||||
continue;
|
||||
rest_object->put(object_property.key, object->get(object_property.key));
|
||||
rest_object->set(object_property.key, object->get(object_property.key), true);
|
||||
if (exception())
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue