1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

LibJS: Make Environment::put_into_environment() return a success bool

This code is non-conforming and will eventually get cleaned out once
we implement proper variable bindings. However, this will aid us in
improving other parts of the code right now.
This commit is contained in:
Andreas Kling 2021-07-02 00:14:38 +02:00
parent 57db058652
commit 80170887db
7 changed files with 10 additions and 9 deletions

View file

@ -31,9 +31,9 @@ Optional<Variable> ObjectEnvironment::get_from_environment(FlyString const& name
return Variable { value, DeclarationKind::Var };
}
void ObjectEnvironment::put_into_environment(FlyString const& name, Variable variable)
bool ObjectEnvironment::put_into_environment(FlyString const& name, Variable variable)
{
m_binding_object.put(name, variable.value);
return m_binding_object.put(name, variable.value);
}
bool ObjectEnvironment::delete_from_environment(FlyString const& name)