Bug 1941846, don't assert but return early if MaplikeHelpers::Get fails, r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D236484
This commit is contained in:
Olli Pettay
2025-02-03 09:51:25 +00:00
parent 2504ff7b8e
commit b092375268

View File

@@ -604,13 +604,14 @@ void PerformanceMainThread::IncEventCount(const nsAtom* aType) {
return;
}
ErrorResult rv;
IgnoredErrorResult rv;
uint64_t count = EventCounts_Binding::MaplikeHelpers::Get(
mEventCounts, nsDependentAtomString(aType), rv);
MOZ_ASSERT(!rv.Failed());
if (rv.Failed()) {
return;
}
EventCounts_Binding::MaplikeHelpers::Set(
mEventCounts, nsDependentAtomString(aType), ++count, rv);
MOZ_ASSERT(!rv.Failed());
}
size_t PerformanceMainThread::SizeOfEventEntries(