Skip to content

Commit

Permalink
fix(android): make WryActivity.setWebView public (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed May 21, 2024
1 parent aa4bc60 commit 637289d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/setWebview-jni-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

On Android, make `WryActivity.setWebview` method public to prevent JNI crashes.
2 changes: 1 addition & 1 deletion src/android/kotlin/WryActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abstract class WryActivity : AppCompatActivity() {

open fun onWebViewCreate(webView: WebView) { }

private fun setWebView(webView: RustWebView) {
fun setWebView(webView: RustWebView) {
mWebView = webView
onWebViewCreate(webView)
}
Expand Down

0 comments on commit 637289d

Please sign in to comment.