Skip to content

Commit

Permalink
fix(macos): fix crash on calling custom protocol handler, closes #813 (
Browse files Browse the repository at this point in the history
…#814)

* fix(macos): fix crash on calling custom protocol handler

this bug was caused by change at #796 due to mismatch of function
signature

* Delete fix-wkwebview-crash.md

Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
  • Loading branch information
rhysd and amrbashir committed Dec 14, 2022
1 parent 45f2b21 commit d7dc184
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/webview/wkwebview/mod.rs
Expand Up @@ -113,7 +113,7 @@ impl InnerWebView {
let function = this.get_ivar::<*mut c_void>("function");
if !function.is_null() {
let function = &mut *(*function
as *mut Box<dyn for<'s> Fn(&'s Request<Vec<u8>>) -> Result<Response<Vec<u8>>>>);
as *mut Box<dyn Fn(&Request<Vec<u8>>) -> Result<Response<Cow<'static, [u8]>>>>);

// Get url request
let request: id = msg_send![task, request];
Expand Down

0 comments on commit d7dc184

Please sign in to comment.