You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
I'm getting a panic when running examples/webview2.rs because environment still has a strong ref count of 2 at the point of calling try_unwrap on it, despite the explicit call to drop(handler_class) earlier. The first line in the below output is a debug println! that I added to display Arc::strong_count(&environment) and Arc::weak_count(&environment) just before the try_unwrap call and after the drop(handler_class) call.
Strong: 2 Weak: 0
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Mutex { data: None }'
Although I'm generally calling the real WebView2Loader.dll in my code, the error repros without it. I still get it when I comment out the whole call to CreateCoreWebView2Environment on line 77, and that's why data == None in the above output rather than an actual object.
Is this a bug in the generated Drop implementation for CreateCoreWebView2EnvironmentCompletedHandler? It's also possible that I'm just missing something that should be reasonably obvious because I'm still very new to Rust.