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
commit 80170887db
Notes: sideshowbarker 2024-07-18 11:09:02 +09:00
7 changed files with 10 additions and 9 deletions

View file

@ -47,9 +47,10 @@ Optional<Variable> DeclarativeEnvironment::get_from_environment(FlyString const&
return m_variables.get(name);
}
void DeclarativeEnvironment::put_into_environment(FlyString const& name, Variable variable)
bool DeclarativeEnvironment::put_into_environment(FlyString const& name, Variable variable)
{
m_variables.set(name, variable);
return true;
}
bool DeclarativeEnvironment::delete_from_environment(FlyString const& name)