1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

LibJS: Make Value::as_cell() return a Cell&

This commit is contained in:
Andreas Kling 2021-05-25 18:48:11 +02:00
parent 0de954e86b
commit 47a4b2ba9f
3 changed files with 7 additions and 7 deletions

View file

@ -222,10 +222,10 @@ public:
return *m_value.as_symbol;
}
Cell* as_cell()
Cell& as_cell()
{
VERIFY(is_cell());
return m_value.as_cell;
return *m_value.as_cell;
}
Accessor& as_accessor()
@ -330,7 +330,7 @@ inline Value js_negative_infinity()
inline void Cell::Visitor::visit(Value value)
{
if (value.is_cell())
visit_impl(*value.as_cell());
visit_impl(value.as_cell());
}
Value greater_than(GlobalObject&, Value lhs, Value rhs);