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

[PLAT-7915] Init JNI cache once, and don't store JNIEnv #1596

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

kstenerud
Copy link
Contributor

@kstenerud kstenerud commented Feb 2, 2022

Goal

JNIEnv is only valid for the current thread, so we shouldn't be permanently storing it as a global. Store JavaVM instead.

Complete the JNI cache fix by making the cache once again global, ensuring that all object references have been first made global.

Testing

Re-ran all automated tests, did manual testing using the example app.

@kstenerud kstenerud changed the title Init JNI cache once, and don't store JNIEnv [PLAT-7915] Init JNI cache once, and don't store JNIEnv Feb 2, 2022
@kstenerud kstenerud force-pushed the PLAT-7915-global-jni-cache branch 10 times, most recently from ac7911c to fd44ba1 Compare February 3, 2022 14:42
@kstenerud kstenerud marked this pull request as ready for review February 4, 2022 08:38
@kstenerud kstenerud requested review from lemnik and kattrali February 4, 2022 08:38
@kstenerud kstenerud force-pushed the PLAT-7915-global-jni-cache branch from 87e9db1 to fd44ba1 Compare February 4, 2022 15:23
@kstenerud kstenerud force-pushed the PLAT-7915-global-jni-cache branch from fd44ba1 to 6dc0433 Compare February 7, 2022 13:04
@kstenerud kstenerud requested a review from lemnik February 7, 2022 13:08
@kstenerud kstenerud force-pushed the PLAT-7915-global-jni-cache branch 2 times, most recently from c441bc0 to 1607458 Compare February 7, 2022 14:56
@kstenerud kstenerud requested a review from kattrali February 7, 2022 14:56
Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kstenerud kstenerud force-pushed the PLAT-7915-global-jni-cache branch from 1607458 to 6680da9 Compare February 7, 2022 16:17
@kstenerud kstenerud force-pushed the PLAT-7915-global-jni-cache branch from 6680da9 to d49b304 Compare February 8, 2022 08:21
@kstenerud kstenerud merged commit 28b2437 into next Feb 8, 2022
@kstenerud kstenerud deleted the PLAT-7915-global-jni-cache branch February 8, 2022 08:50
@lemnik lemnik mentioned this pull request Mar 10, 2022
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.

3 participants