summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Heap/Heap.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-06-06 23:08:15 +0100
committerLinus Groh <mail@linusgroh.de>2021-06-06 23:08:15 +0100
commite7bfd34ea722a3aef2d3d099b1e3b36d261059d4 (patch)
treee90ee6af393d15fd9ee55f837334e291d503edab /Userland/Libraries/LibJS/Heap/Heap.cpp
parent7700ee2722ac89ef44112b235c53d291002bc71b (diff)
downloadserenity-e7bfd34ea722a3aef2d3d099b1e3b36d261059d4.zip
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Heap/Heap.cpp')
-rw-r--r--Userland/Libraries/LibJS/Heap/Heap.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp
index 0f9501ee44..5d54058689 100644
--- a/Userland/Libraries/LibJS/Heap/Heap.cpp
+++ b/Userland/Libraries/LibJS/Heap/Heap.cpp
@@ -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();
}