From d54ba587f3d4c33b7bbe1a6c7bdc5da124a566c5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 28 Aug 2022 22:13:05 +0200 Subject: [PATCH] LibJS: Make Heap a friend of everyone who uses JS_CELL This will allow Heap to invoke non-public constructors when allocating new cells. --- Userland/Libraries/LibJS/Heap/Cell.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Heap/Cell.h b/Userland/Libraries/LibJS/Heap/Cell.h index 65170c018e..3660b0dd2a 100644 --- a/Userland/Libraries/LibJS/Heap/Cell.h +++ b/Userland/Libraries/LibJS/Heap/Cell.h @@ -20,7 +20,8 @@ public: \ virtual StringView class_name() const override \ { \ return #class_##sv; \ - } + } \ + friend class JS::Heap; class Cell { AK_MAKE_NONCOPYABLE(Cell);