summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.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/PropertyDescriptor.h
parent1df3652e272e1aa69b3a1f8d1730ec464242ada9 (diff)
downloadserenity-7c0c1c8f4969abeec1436346f29081b3afbcdeab.zip
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/PropertyDescriptor.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/PropertyDescriptor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.h b/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.h
index a395340258..3fc549d9c5 100644
--- a/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.h
+++ b/Userland/Libraries/LibJS/Runtime/PropertyDescriptor.h
@@ -35,8 +35,8 @@ public:
}
Optional<Value> value {};
- Optional<FunctionObject*> get {};
- Optional<FunctionObject*> set {};
+ Optional<GCPtr<FunctionObject>> get {};
+ Optional<GCPtr<FunctionObject>> set {};
Optional<bool> writable {};
Optional<bool> enumerable {};
Optional<bool> configurable {};
@@ -54,9 +54,9 @@ struct Formatter<JS::PropertyDescriptor> : Formatter<StringView> {
if (property_descriptor.value.has_value())
TRY(parts.try_append(TRY(String::formatted("[[Value]]: {}", TRY(property_descriptor.value->to_string_without_side_effects())))));
if (property_descriptor.get.has_value())
- TRY(parts.try_append(TRY(String::formatted("[[Get]]: JS::Function* @ {:p}", *property_descriptor.get))));
+ TRY(parts.try_append(TRY(String::formatted("[[Get]]: JS::Function* @ {:p}", property_descriptor.get->ptr()))));
if (property_descriptor.set.has_value())
- TRY(parts.try_append(TRY(String::formatted("[[Set]]: JS::Function* @ {:p}", *property_descriptor.set))));
+ TRY(parts.try_append(TRY(String::formatted("[[Set]]: JS::Function* @ {:p}", property_descriptor.set->ptr()))));
if (property_descriptor.writable.has_value())
TRY(parts.try_append(TRY(String::formatted("[[Writable]]: {}", *property_descriptor.writable))));
if (property_descriptor.enumerable.has_value())