1
0
Fork 0
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:
Linus Groh 2021-06-06 23:08:15 +01:00
parent 7700ee2722
commit e7bfd34ea7
Notes: sideshowbarker 2024-07-18 12:43:45 +09:00

View file

@ -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();
}