tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 975e3fec8d22f809bdbf74e43221676f457c9978
parent ff2376c18bda1dcf77bd0adf8c4d869ebfd76cec
Author: Bob Owen <bobowencode@gmail.com>
Date:   Thu,  2 Oct 2025 15:54:05 +0000

Bug 1991854 - Add crash annotation when we run out of space for config rules for user fonts. r=gsvelto

Differential Revision: https://phabricator.services.mozilla.com/D266974

Diffstat:
Msecurity/sandbox/win/src/sandboxbroker/ConfigHelpers.cpp | 5+++++
Mtoolkit/crashreporter/CrashAnnotations.yaml | 7+++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/security/sandbox/win/src/sandboxbroker/ConfigHelpers.cpp b/security/sandbox/win/src/sandboxbroker/ConfigHelpers.cpp @@ -10,6 +10,7 @@ #include "mozilla/Logging.h" #include "mozilla/Vector.h" +#include "nsExceptionHandler.h" #include "nsStringFwd.h" #include "nsUnicharUtils.h" #include "sandbox/win/src/policy_engine_opcodes.h" @@ -195,6 +196,8 @@ void UserFontConfigHelper::AddRules(SizeTrackingConfig& aConfig) const { NS_WARNING("Failed to add specific user font policy rule."); LOG_W("Failed (ResultCode %d) to add read access to: %S", result, data); if (result == sandbox::SBOX_ERROR_NO_SPACE) { + CrashReporter::RecordAnnotationCString( + CrashReporter::Annotation::UserFontRulesExhausted, "inside"); return; } } @@ -210,6 +213,8 @@ void UserFontConfigHelper::AddRules(SizeTrackingConfig& aConfig) const { LOG_W("Failed (ResultCode %d) to add read access to: %S", result, fontPath.getW()); if (result == sandbox::SBOX_ERROR_NO_SPACE) { + CrashReporter::RecordAnnotationCString( + CrashReporter::Annotation::UserFontRulesExhausted, "outside"); return; } } diff --git a/toolkit/crashreporter/CrashAnnotations.yaml b/toolkit/crashreporter/CrashAnnotations.yaml @@ -1187,6 +1187,13 @@ useragent_locale: type: string scope: report +UserFontRulesExhausted: + description: > + Set to "inside" if rules exhausted while adding fonts inside the user's dir, + set to "outside" if adding for fonts outside the user's dir. + type: string + scope: report + UtilityProcessStatus: description: > Status of the Utility process, can be set to "Running" or "Destroyed"