mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:37:34 +00:00
LibJS: Allow pre-allocating DeclarativeEnvironment's bindings list
This commit is contained in:
parent
435f49d98e
commit
f56bf610c4
1 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,11 @@ public:
|
||||||
ThrowCompletionOr<Value> get_binding_value_direct(GlobalObject&, size_t index, bool strict);
|
ThrowCompletionOr<Value> get_binding_value_direct(GlobalObject&, size_t index, bool strict);
|
||||||
ThrowCompletionOr<void> set_mutable_binding_direct(GlobalObject&, size_t index, Value, bool strict);
|
ThrowCompletionOr<void> set_mutable_binding_direct(GlobalObject&, size_t index, Value, bool strict);
|
||||||
|
|
||||||
|
void ensure_capacity(size_t capacity)
|
||||||
|
{
|
||||||
|
m_bindings.ensure_capacity(capacity);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void visit_edges(Visitor&) override;
|
virtual void visit_edges(Visitor&) override;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue