From e6ea16cf5b46812ec0919c60549583f553330be1 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 4 Dec 2025 17:14:54 -0800 Subject: [PATCH 1/2] [Crashlytics] Sync signal/exception handler installation --- Crashlytics/CHANGELOG.md | 5 +++++ .../Crashlytics/Components/FIRCLSContext.m | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Crashlytics/CHANGELOG.md b/Crashlytics/CHANGELOG.md index 5f1d6c961df..756254ae255 100644 --- a/Crashlytics/CHANGELOG.md +++ b/Crashlytics/CHANGELOG.md @@ -1,3 +1,8 @@ +# Unreleased +- [fixed] Installed Crashlytics signal and mach exception handlers synchronously to + improve compatibility with other crash reporters and runtime environments (like + Mono/Xamarin). (#15383) + # 12.4.0 - [fixed] Make set development platform APIs to chain on Crashlytics context init promise. diff --git a/Crashlytics/Crashlytics/Components/FIRCLSContext.m b/Crashlytics/Crashlytics/Components/FIRCLSContext.m index 3242a08e884..6e7185b37ad 100644 --- a/Crashlytics/Crashlytics/Components/FIRCLSContext.m +++ b/Crashlytics/Crashlytics/Components/FIRCLSContext.m @@ -1,3 +1,4 @@ + // Copyright 2019 Google // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -172,21 +173,17 @@ // simulator to crash. if (!_firclsContext.readonly->debuggerAttached) { #if CLS_SIGNAL_SUPPORTED - dispatch_group_async(group, queue, ^{ - _firclsContext.readonly->signal.path = - FIRCLSContextAppendToRoot(rootPath, FIRCLSReportSignalFile); + _firclsContext.readonly->signal.path = + FIRCLSContextAppendToRoot(rootPath, FIRCLSReportSignalFile); - FIRCLSSignalInitialize(&_firclsContext.readonly->signal); - }); + FIRCLSSignalInitialize(&_firclsContext.readonly->signal); #endif #if CLS_MACH_EXCEPTION_SUPPORTED - dispatch_group_async(group, queue, ^{ - _firclsContext.readonly->machException.path = - FIRCLSContextAppendToRoot(rootPath, FIRCLSReportMachExceptionFile); + _firclsContext.readonly->machException.path = + FIRCLSContextAppendToRoot(rootPath, FIRCLSReportMachExceptionFile); - FIRCLSMachExceptionInit(&_firclsContext.readonly->machException); - }); + FIRCLSMachExceptionInit(&_firclsContext.readonly->machException); #endif dispatch_group_async(group, queue, ^{ From 952336236a04d92f2d00f92743e4019ba9d88c52 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 4 Dec 2025 17:24:20 -0800 Subject: [PATCH 2/2] remove blank line --- Crashlytics/Crashlytics/Components/FIRCLSContext.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Crashlytics/Crashlytics/Components/FIRCLSContext.m b/Crashlytics/Crashlytics/Components/FIRCLSContext.m index 6e7185b37ad..b34f98362ba 100644 --- a/Crashlytics/Crashlytics/Components/FIRCLSContext.m +++ b/Crashlytics/Crashlytics/Components/FIRCLSContext.m @@ -1,4 +1,3 @@ - // Copyright 2019 Google // // Licensed under the Apache License, Version 2.0 (the "License");