summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-06 23:53:22 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-07 00:23:36 +0200
commitcb696eff089b1526dc5f043122c1873c961688e7 (patch)
tree4795b151e54f309221262144cd48f29e60f9033b /Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h
parent6ef5464015b5d188c19e107826482096abe21dd8 (diff)
downloadserenity-cb696eff089b1526dc5f043122c1873c961688e7.zip
LibJS: Make Environment::has_binding() optionally return binding index
If the caller wants to use the binding index for anything, if there is such a thing, it can now be obtained via an optional out-parameter.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h b/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h
index a3a313018d..c1e789e7ac 100644
--- a/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h
+++ b/Userland/Libraries/LibJS/Runtime/GlobalEnvironment.h
@@ -19,7 +19,7 @@ public:
virtual bool has_this_binding() const final { return true; }
virtual Value get_this_binding(GlobalObject&) const final;
- virtual bool has_binding(FlyString const& name) const override;
+ virtual bool has_binding(FlyString const& name, Optional<size_t>* = nullptr) const override;
virtual void create_mutable_binding(GlobalObject&, FlyString const& name, bool can_be_deleted) override;
virtual void create_immutable_binding(GlobalObject&, FlyString const& name, bool strict) override;
virtual void initialize_binding(GlobalObject&, FlyString const& name, Value) override;