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

Fix cookie creation for trait struct in Kotlin #729

Merged

Conversation

emarteca
Copy link
Contributor

Cookie creating was previously done on an object passed by value to native code -- this didn't cause a crash previously, because the validity of the JObject GlobalRef::new(..) was being called on was not being checked, however it wasn't working properly. This does result in a crash on Android, where the JObject is actually checked.

This PR fixes this issue, and sets the cookie to a real JObject (the trait object itself, instead of the underlying native struct).

@emarteca emarteca marked this pull request as ready for review November 13, 2024 23:32
@Manishearth Manishearth merged commit ccde69e into rust-diplomat:main Nov 14, 2024
20 checks passed
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