-
Notifications
You must be signed in to change notification settings - Fork 207
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
Backport JNI error handling fixes to v4 #1127
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bdd9f8a
to
8a2fb77
Compare
Android notifier sizes
Generated by 🚫 Danger |
kstenerud
requested changes
Feb 16, 2021
kstenerud
approved these changes
Feb 16, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
Backports the following PRs to the v4 branch for use in bugsnag-unity: #1088 #1091 #1092 #1117
These enhance the error handling around JNI calls by ensuring that exceptions are checked and cleared.
Changeset
The PR consists of 4 commits, which add the new
safejni.h
functions, then applies them to the source files in the NDK module.Broadly speaking this was mostly a case of just copying functions over. There were a few structs that were renamed between v4 and v5 (e.g.
bsg_metadata_t
tobugsnag_metadata
) that required alterations, and some method names on theNativeInterface
class were renamed. Thebugsnag_notify_env
andbugsnag_populate_crumb_metadata
functions have also been split into multiple functions in v5 - this change has been carried across.Testing
Performed a smoke test by comparing an NDK error report from the Unity app before and after these changes. Full regression testing will be carried out before release.