LibJS: Expose const prototype getter in Object

This is used in the temporal proposal in an assertion.
This commit is contained in:
Shannon Booth 2024-01-05 21:18:55 +13:00 committed by Andrew Kaster
parent 9f7e27564c
commit 23c5a7a0a3
Notes: sideshowbarker 2024-07-17 17:49:11 +09:00

View file

@ -229,6 +229,8 @@ public:
[[nodiscard]] bool is_typed_array() const { return m_is_typed_array; }
void set_is_typed_array() { m_is_typed_array = true; }
Object const* prototype() const { return shape().prototype(); }
protected:
enum class GlobalObjectTag { Tag };
enum class ConstructWithoutPrototypeTag { Tag };
@ -254,7 +256,6 @@ private:
void set_shape(Shape& shape) { m_shape = &shape; }
Object* prototype() { return shape().prototype(); }
Object const* prototype() const { return shape().prototype(); }
bool m_may_interfere_with_indexed_property_access { false };