diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-28 22:13:05 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-29 03:24:54 +0200 |
commit | d54ba587f3d4c33b7bbe1a6c7bdc5da124a566c5 (patch) | |
tree | 9c04236050f61a0366171759eeb4aede202e72fa | |
parent | 49fd92d92a8673f5fa45049ffd5c2d3f7c5ec5ff (diff) | |
download | serenity-d54ba587f3d4c33b7bbe1a6c7bdc5da124a566c5.zip |
LibJS: Make Heap a friend of everyone who uses JS_CELL
This will allow Heap to invoke non-public constructors when allocating
new cells.
-rw-r--r-- | Userland/Libraries/LibJS/Heap/Cell.h | 3 |
1 files changed, 2 insertions, 1 deletions
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); |