diff --git a/Libraries/LibJS/Runtime/Cell.cpp b/Libraries/LibJS/Runtime/Cell.cpp index 4c8cb69511..3b4f652d4a 100644 --- a/Libraries/LibJS/Runtime/Cell.cpp +++ b/Libraries/LibJS/Runtime/Cell.cpp @@ -51,6 +51,11 @@ Heap& Cell::heap() const return HeapBlock::from_cell(this)->heap(); } +VM& Cell::vm() const +{ + return heap().vm(); +} + Interpreter& Cell::interpreter() { return heap().interpreter(); diff --git a/Libraries/LibJS/Runtime/Cell.h b/Libraries/LibJS/Runtime/Cell.h index 70110f0d0d..0c1388924c 100644 --- a/Libraries/LibJS/Runtime/Cell.h +++ b/Libraries/LibJS/Runtime/Cell.h @@ -60,6 +60,7 @@ public: virtual void visit_children(Visitor&) { } Heap& heap() const; + VM& vm() const; Interpreter& interpreter(); Interpreter& interpreter() const;