summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/WrappedFunction.h
diff options
context:
space:
mode:
authorMatthew Olsson <matthewcolsson@gmail.com>2023-02-26 16:09:02 -0700
committerAndreas Kling <kling@serenityos.org>2023-03-15 08:48:49 +0100
commit7c0c1c8f4969abeec1436346f29081b3afbcdeab (patch)
tree985c294882161720a82dc54c70d0680e29700ec9 /Userland/Libraries/LibJS/Runtime/WrappedFunction.h
parent1df3652e272e1aa69b3a1f8d1730ec464242ada9 (diff)
downloadserenity-7c0c1c8f4969abeec1436346f29081b3afbcdeab.zip
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/WrappedFunction.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/WrappedFunction.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/WrappedFunction.h b/Userland/Libraries/LibJS/Runtime/WrappedFunction.h
index 9d8e67bb63..a0696163df 100644
--- a/Userland/Libraries/LibJS/Runtime/WrappedFunction.h
+++ b/Userland/Libraries/LibJS/Runtime/WrappedFunction.h
@@ -22,9 +22,9 @@ public:
virtual ThrowCompletionOr<Value> internal_call(Value this_argument, MarkedVector<Value> arguments_list) override;
// FIXME: Remove this (and stop inventing random internal slots that shouldn't exist, jeez)
- virtual DeprecatedFlyString const& name() const override { return m_wrapped_target_function.name(); }
+ virtual DeprecatedFlyString const& name() const override { return m_wrapped_target_function->name(); }
- virtual Realm* realm() const override { return &m_realm; }
+ virtual Realm* realm() const override { return m_realm; }
FunctionObject const& wrapped_target_function() const { return m_wrapped_target_function; }
FunctionObject& wrapped_target_function() { return m_wrapped_target_function; }
@@ -35,8 +35,8 @@ private:
virtual void visit_edges(Visitor&) override;
// Internal Slots of Wrapped Function Exotic Objects, https://tc39.es/proposal-shadowrealm/#table-internal-slots-of-wrapped-function-exotic-objects
- FunctionObject& m_wrapped_target_function; // [[WrappedTargetFunction]]
- Realm& m_realm; // [[Realm]]
+ NonnullGCPtr<FunctionObject> m_wrapped_target_function; // [[WrappedTargetFunction]]
+ NonnullGCPtr<Realm> m_realm; // [[Realm]]
};
ThrowCompletionOr<Value> ordinary_wrapped_function_call(WrappedFunction const&, Value this_argument, MarkedVector<Value> const& arguments_list);