summaryrefslogtreecommitdiffstats
path: root/xpcom/base/AvailableMemoryWatcherMac.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /xpcom/base/AvailableMemoryWatcherMac.cpp
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'xpcom/base/AvailableMemoryWatcherMac.cpp')
-rw-r--r--xpcom/base/AvailableMemoryWatcherMac.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/xpcom/base/AvailableMemoryWatcherMac.cpp b/xpcom/base/AvailableMemoryWatcherMac.cpp
index d6f2d16b30..de6901f8d5 100644
--- a/xpcom/base/AvailableMemoryWatcherMac.cpp
+++ b/xpcom/base/AvailableMemoryWatcherMac.cpp
@@ -95,11 +95,11 @@ class nsAvailableMemoryWatcher final : public nsITimerCallback,
void AddParentAnnotation(CrashReporter::Annotation aAnnotation,
nsAutoCString aString) {
- CrashReporter::AnnotateCrashReport(aAnnotation, aString);
+ CrashReporter::RecordAnnotationNSCString(aAnnotation, aString);
}
void AddParentAnnotation(CrashReporter::Annotation aAnnotation,
uint32_t aData) {
- CrashReporter::AnnotateCrashReport(aAnnotation, aData);
+ CrashReporter::RecordAnnotationU32(aAnnotation, aData);
}
void LowMemoryResponse();
@@ -251,18 +251,18 @@ nsresult nsAvailableMemoryWatcher::Init() {
// Set the initial state of all annotations for parent crash reports.
// Content process crash reports are set when a crash occurs and
// AddChildAnnotations() is called.
- CrashReporter::AnnotateCrashReport(
+ CrashReporter::RecordAnnotationNSCString(
CrashReporter::Annotation::MacMemoryPressure, mLevelStr);
- CrashReporter::AnnotateCrashReport(
+ CrashReporter::RecordAnnotationNSCString(
CrashReporter::Annotation::MacMemoryPressureNormalTime, mNormalTimeStr);
- CrashReporter::AnnotateCrashReport(
+ CrashReporter::RecordAnnotationNSCString(
CrashReporter::Annotation::MacMemoryPressureWarningTime, mWarningTimeStr);
- CrashReporter::AnnotateCrashReport(
+ CrashReporter::RecordAnnotationNSCString(
CrashReporter::Annotation::MacMemoryPressureCriticalTime,
mCriticalTimeStr);
- CrashReporter::AnnotateCrashReport(
+ CrashReporter::RecordAnnotationU32(
CrashReporter::Annotation::MacMemoryPressureSysctl, mLevelSysctl);
- CrashReporter::AnnotateCrashReport(
+ CrashReporter::RecordAnnotationU32(
CrashReporter::Annotation::MacAvailableMemorySysctl, mAvailMemSysctl);
// To support running experiments, handle pref
@@ -441,18 +441,18 @@ void nsAvailableMemoryWatcher::OnMemoryPressureChangedInternal(
// Add all annotations to the provided crash reporter instance.
void nsAvailableMemoryWatcher::AddChildAnnotations(
const UniquePtr<ipc::CrashReporterHost>& aCrashReporter) {
- aCrashReporter->AddAnnotation(CrashReporter::Annotation::MacMemoryPressure,
- mLevelStr);
- aCrashReporter->AddAnnotation(
+ aCrashReporter->AddAnnotationNSCString(
+ CrashReporter::Annotation::MacMemoryPressure, mLevelStr);
+ aCrashReporter->AddAnnotationNSCString(
CrashReporter::Annotation::MacMemoryPressureNormalTime, mNormalTimeStr);
- aCrashReporter->AddAnnotation(
+ aCrashReporter->AddAnnotationNSCString(
CrashReporter::Annotation::MacMemoryPressureWarningTime, mWarningTimeStr);
- aCrashReporter->AddAnnotation(
+ aCrashReporter->AddAnnotationNSCString(
CrashReporter::Annotation::MacMemoryPressureCriticalTime,
mCriticalTimeStr);
- aCrashReporter->AddAnnotation(
+ aCrashReporter->AddAnnotationU32(
CrashReporter::Annotation::MacMemoryPressureSysctl, mLevelSysctl);
- aCrashReporter->AddAnnotation(
+ aCrashReporter->AddAnnotationU32(
CrashReporter::Annotation::MacAvailableMemorySysctl, mAvailMemSysctl);
}