mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibJS: Convert has_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
617d3cd3d3
commit
fbb176c926
11 changed files with 50 additions and 29 deletions
|
@ -35,7 +35,7 @@ void DeclarativeEnvironment::visit_edges(Visitor& visitor)
|
|||
}
|
||||
|
||||
// 9.1.1.1.1 HasBinding ( N ), https://tc39.es/ecma262/#sec-declarative-environment-records-hasbinding-n
|
||||
bool DeclarativeEnvironment::has_binding(FlyString const& name, Optional<size_t>* out_index) const
|
||||
ThrowCompletionOr<bool> DeclarativeEnvironment::has_binding(FlyString const& name, Optional<size_t>* out_index) const
|
||||
{
|
||||
auto it = m_names.find(name);
|
||||
if (it == m_names.end())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue