mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:17:44 +00:00
LibJS: Resolve a circular include problem between HeapBlock and Cell
Cell::heap() and Cell::vm() needed to access member functions from HeapBlock, and wanted to be inline, so they were moved to VM.h. That approach will no longer work with VM.h not being included in every file (starting from the next commit), so this commit fixes that circular import issue by introducing secondary base classes to host the references to Heap and VM, respectively.
This commit is contained in:
parent
41f9dcd89b
commit
392b5c3b19
7 changed files with 64 additions and 25 deletions
|
@ -32,7 +32,7 @@ NonnullOwnPtr<HeapBlock> HeapBlock::create_with_cell_size(Heap& heap, size_t cel
|
|||
}
|
||||
|
||||
HeapBlock::HeapBlock(Heap& heap, size_t cell_size)
|
||||
: m_heap(heap)
|
||||
: HeapBlockBase(heap)
|
||||
, m_cell_size(cell_size)
|
||||
{
|
||||
VERIFY(cell_size >= sizeof(FreelistEntry));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue