Bug 1858496 - Crash on OOM in ICU; r=jandem,platform-i18n-reviewers,gregtatum

This has been on Nightly for several cycles without serious problems, I think
it makes sense to let it ride the trains, and continue to keep an eye on
crash reports.

Differential Revision: https://phabricator.services.mozilla.com/D191892
This commit is contained in:
Dan Minor 2023-10-27 12:29:43 +00:00
Родитель 178e49d103
Коммит 73de873f4c
1 изменённых файлов: 0 добавлений и 8 удалений

Просмотреть файл

@ -166,27 +166,19 @@ class ICUReporter final : public nsIMemoryReporter,
NS_DECL_ISUPPORTS
static void* Alloc(const void*, size_t aSize) {
#ifdef NIGHTLY_BUILD
void* result = CountingMalloc(aSize);
if (result == nullptr) {
MOZ_CRASH("Ran out of memory while allocating for ICU");
}
return result;
#else
return CountingMalloc(aSize);
#endif
}
static void* Realloc(const void*, void* aPtr, size_t aSize) {
#ifdef NIGHTLY_BUILD
void* result = CountingRealloc(aPtr, aSize);
if (result == nullptr) {
MOZ_CRASH("Ran out of memory while reallocating for ICU");
}
return result;
#else
return CountingRealloc(aPtr, aSize);
#endif
}
static void Free(const void*, void* aPtr) { return CountingFree(aPtr); }