Describe the bug
The mechanism driving handleRequest on android has an unsafe impl Sync bound that allows it to be called from shouldInterceptRequest.
However, this is wrong, since shouldInterceptRequest is not called from the main thread:
Note: This method is called on a thread other than the UI thread so clients should exercise caution when accessing private data or the view system.
https://developer.android.com/reference/android/webkit/WebViewClient#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)
This is causing dioxus to segfault, locks to fail, RC to double-drop, etc.
This function should instead use a channel to block until the response is ready from the main thread.
It's likely there are more functions being called from not-the-main-thread.
Describe the bug
The mechanism driving handleRequest on android has an
unsafe impl Syncbound that allows it to be called fromshouldInterceptRequest.However, this is wrong, since
shouldInterceptRequestis not called from the main thread:https://developer.android.com/reference/android/webkit/WebViewClient#shouldInterceptRequest(android.webkit.WebView,%20android.webkit.WebResourceRequest)
This is causing dioxus to segfault, locks to fail, RC to double-drop, etc.
This function should instead use a channel to block until the response is ready from the main thread.
It's likely there are more functions being called from not-the-main-thread.