Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphofmann committed Nov 29, 2022
1 parent 5a9358b commit 61948d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,12 @@ setEnabled(bool isEnabled)
sentrycrashid_generate(g_secondaryEventID);
g_isEnabled = installExceptionHandler();
}

// We don't call uninstallExceptionHandler by intention. Instead of canceling the exception
// handler threads and restarting them, we let them run. They won't do anything in
// handleExceptions when g_isEnabled is false. Trying to clean them up lead to weird crashes in
// tests cause sentrycrashmc_suspendEnvironment and sentrycrashmc_resumeEnvironment call
// sentrycrashcm_isReservedThread. Instead of fixing that, we let them run.
}

static bool
Expand Down
4 changes: 3 additions & 1 deletion Sources/SentryCrash/Recording/SentryCrash.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ static NSString *const SENTRYCRASH_REPORT_ATTACHMENTS_ITEM = @"attachments";
/**
* It's not really possible to completely uninstall SentryCrash. The best we can do is to deactivate
* all the monitors, keep track of the already installed monitors to install them again if someone
* calls install, clear the `onCrash` callback, and stop the SentryCrashCachedData.
* calls install, clear the `onCrash` callback, and stop the SentryCrashCachedData. For the
* ``SentryCrashMonitorTypeMachException`` we let the exception threads running, but they don't
* report anything.
*/
- (void)uninstall;

Expand Down

0 comments on commit 61948d6

Please sign in to comment.