Skip to content

Commit

Permalink
Cherry pick PR #3176: Fix JNI cleanup on ATV for posix threads. (#3180)
Browse files Browse the repository at this point in the history
Refer to the original PR: #3176

b/339018103

Change-Id: I45d941655a03824591af47ba70bc2be78b8bb95e

Co-authored-by: Yavor Goulishev <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and y4vor committed May 7, 2024
1 parent 6282cc1 commit f41cbf1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions starboard/android/shared/jni_env_ext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ jobject g_application_class_loader = NULL;
jobject g_starboard_bridge = NULL;

void Destroy(void* value) {
// OnThreadShutdown() must be called on each thread before it is destroyed.
SB_DCHECK(value == NULL);
if (value != NULL) {
starboard::android::shared::JniEnvExt::OnThreadShutdown();
}
}

} // namespace
Expand Down

0 comments on commit f41cbf1

Please sign in to comment.