summaryrefslogtreecommitdiffstats
path: root/xpcom/build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:18:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 15:18:54 +0000
commita5f28e22cc28ca53d092f6545bc924ee43a8bbe4 (patch)
tree7e02d01734d97de08bdeed66d2d5185f8e4f0a61 /xpcom/build
parentReleasing progress-linux version 115.8.0esr-1~deb12u1progress7u1. (diff)
downloadfirefox-esr-a5f28e22cc28ca53d092f6545bc924ee43a8bbe4.tar.xz
firefox-esr-a5f28e22cc28ca53d092f6545bc924ee43a8bbe4.zip
Merging upstream version 115.9.0esr.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom/build')
-rw-r--r--xpcom/build/XPCOMInit.cpp12
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); }