diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:18:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-08 15:18:07 +0000 |
commit | 328078c4d259e52db1a4848c00ee0b420775c91c (patch) | |
tree | ca9b0e61a1c03f0246b0371423bbbe570193e2f1 /xpcom | |
parent | Adding upstream version 115.8.0esr. (diff) | |
download | firefox-esr-ee8d6df309c66e86e06bdd39a2d6cfa78c39d7ca.tar.xz firefox-esr-ee8d6df309c66e86e06bdd39a2d6cfa78c39d7ca.zip |
Adding upstream version 115.9.0esr.upstream/115.9.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom')
-rw-r--r-- | xpcom/build/XPCOMInit.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xpcom/build/XPCOMInit.cpp b/xpcom/build/XPCOMInit.cpp index cd6c7f7052..61e29ababd 100644 --- a/xpcom/build/XPCOMInit.cpp +++ b/xpcom/build/XPCOMInit.cpp @@ -164,11 +164,19 @@ class ICUReporter final : public nsIMemoryReporter, NS_DECL_ISUPPORTS static void* Alloc(const void*, size_t aSize) { - return CountingMalloc(aSize); + void* result = CountingMalloc(aSize); + if (result == nullptr) { + MOZ_CRASH("Ran out of memory while allocating for ICU"); + } + return result; } static void* Realloc(const void*, void* aPtr, size_t aSize) { - return CountingRealloc(aPtr, aSize); + void* result = CountingRealloc(aPtr, aSize); + if (result == nullptr) { + MOZ_CRASH("Ran out of memory while reallocating for ICU"); + } + return result; } static void Free(const void*, void* aPtr) { return CountingFree(aPtr); } |