diff --git a/Libraries/LibJS/Runtime/Iterator.h b/Libraries/LibJS/Runtime/Iterator.h index a972f9d884d..cbad51bdd75 100644 --- a/Libraries/LibJS/Runtime/Iterator.h +++ b/Libraries/LibJS/Runtime/Iterator.h @@ -23,20 +23,22 @@ class IteratorRecord final : public Cell { public: IteratorRecord(GC::Ptr iterator, Value next_method, bool done) - : iterator(iterator) + : done(done) + , iterator(iterator) , next_method(next_method) - , done(done) { } + bool done { false }; // [[Done]] GC::Ptr iterator; // [[Iterator]] Value next_method; // [[NextMethod]] - bool done { false }; // [[Done]] private: virtual void visit_edges(Cell::Visitor&) override; }; +static_assert(sizeof(IteratorRecord) == 32); + class Iterator : public Object { JS_OBJECT(Iterator, Object); GC_DECLARE_ALLOCATOR(Iterator);