From efad094b02c1677c05e1133b57ed54cdc55d4e5e Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sat, 21 Sep 2024 15:38:34 +0200 Subject: [PATCH] Make inaccurate GC stats reporting non-fatal in debug builds. Not sure why this was fatal as it only hinders being able to report memory issues to a debugging dev :P --- js/xpconnect/src/XPCJSContext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp index d45f9f49eb..168dd5bf13 100644 --- a/js/xpconnect/src/XPCJSContext.cpp +++ b/js/xpconnect/src/XPCJSContext.cpp @@ -2489,7 +2489,7 @@ ReportJSRuntimeExplicitTreeStats(const JS::RuntimeStats& rtStats, // gcTotal is the sum of everything we've reported for the GC heap. It // should equal rtStats.gcHeapChunkTotal. - MOZ_ASSERT(gcTotal == rtStats.gcHeapChunkTotal); + NS_WARN_IF(gcTotal != rtStats.gcHeapChunkTotal); } void @@ -2929,7 +2929,7 @@ JSReporter::CollectReports(WindowPaths* windowPaths, KIND_OTHER, rtStats.zTotals.regExpSharedsGCHeap, "Used regexpshared cells."); - MOZ_ASSERT(gcThingTotal == rtStats.gcHeapGCThings); + NS_WARN_IF(gcThingTotal == rtStats.gcHeapGCThings); // Report xpconnect.