mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibJS: Add dbgln() to Heap::allocator_for_size() before crashing
If we can't get a CellAllocator for the requested cell size, at least print a debug message before dying.
This commit is contained in:
parent
7700ee2722
commit
e7bfd34ea7
Notes:
sideshowbarker
2024-07-18 12:43:45 +09:00
Author: https://github.com/linusg
Commit: e7bfd34ea7
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@ ALWAYS_INLINE CellAllocator& Heap::allocator_for_size(size_t cell_size)
|
|||
if (allocator->cell_size() >= cell_size)
|
||||
return *allocator;
|
||||
}
|
||||
dbgln("Cannot get CellAllocator for cell size {}, largest available is {}!", cell_size, m_allocators.last()->cell_size());
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue