We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Request
1 parent 60dba38 commit 35022faCopy full SHA for 35022fa
src/wkwebview/class/wry_web_view_delegate.rs
@@ -58,7 +58,12 @@ define_class!(
58
CStr::from_ptr(url_utf8).to_str(),
59
CStr::from_ptr(js_utf8).to_str(),
60
) {
61
- ipc_handler(Request::builder().uri(url).body(js.to_string()).unwrap());
+ if let Ok(r) = Request::builder().uri(url).body(js.to_string()) {
62
+ ipc_handler(r);
63
+ } else {
64
+ #[cfg(feature = "tracing")]
65
+ tracing::warn!("WebView received invalid IPC request: {}", js);
66
+ }
67
return;
68
}
69
0 commit comments