Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove static json thread data #727

Merged
merged 5 commits into from
Jun 30, 2020

Conversation

tomlongridge
Copy link
Contributor

@tomlongridge tomlongridge commented Jun 28, 2020

Goal

If we no longer suspend all threads for handled exceptions, the way we access thread data needs to be able to handle multi-threaded access.

Design

Replaced the static variable with local variables that are passed to the JSON codec via the userData param. Ensured this was freed after conversion to JSON.

Tests

Manual tests to ensure thread data was captured and symbolicated.

Bugsnag/Client/BugsnagClient.m Outdated Show resolved Hide resolved
Bugsnag/Client/BugsnagClient.m Outdated Show resolved Hide resolved
Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSCrash.h Outdated Show resolved Hide resolved
Bugsnag/KSCrash/Source/KSCrash/Recording/BSG_KSCrash.m Outdated Show resolved Hide resolved
Bugsnag/Payload/BugsnagError.h Outdated Show resolved Hide resolved
@tomlongridge tomlongridge force-pushed the tom/remove-static-json-thread-data branch from e6913cc to 34705b0 Compare June 29, 2020 15:37
@tomlongridge tomlongridge merged commit 96c780f into improve-thread-perf Jun 30, 2020
@tomlongridge tomlongridge deleted the tom/remove-static-json-thread-data branch June 30, 2020 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants