mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibJS: Don't use MarkedValueList in PromiseValueList
Instead, override visit_edges() and mark the values like any other Cell subclass would. This makes PromiseValueList play nice with zombification.
This commit is contained in:
parent
2253235a0f
commit
971dc44ed3
3 changed files with 19 additions and 15 deletions
|
@ -24,15 +24,19 @@ struct RemainingElements final : public Cell {
|
|||
u64 value { 0 };
|
||||
};
|
||||
|
||||
struct PromiseValueList final : public Cell {
|
||||
class PromiseValueList final : public Cell {
|
||||
public:
|
||||
PromiseValueList()
|
||||
: values(heap())
|
||||
{
|
||||
}
|
||||
|
||||
Vector<Value>& values() { return m_values; }
|
||||
Vector<Value> const& values() const { return m_values; }
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "PromiseValueList"; }
|
||||
|
||||
MarkedValueList values;
|
||||
Vector<Value> m_values;
|
||||
};
|
||||
|
||||
class PromiseResolvingElementFunction : public NativeFunction {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue