Resolves #12. To avoid a Segmentation Fault retains the body of a message from a webpate to a webview
This commit is contained in:
parent
aba18412cd
commit
2f7ebbf2ad
|
@ -49,7 +49,7 @@ extern fn on_message<T: WebViewDelegate>(this: &Object, _: Sel, _: id, script_me
|
|||
|
||||
unsafe {
|
||||
let name = NSString::from_retained(msg_send![script_message, name]);
|
||||
let body = NSString::from_retained(msg_send![script_message, body]);
|
||||
let body = NSString::retain(msg_send![script_message, body]);
|
||||
delegate.on_message(name.to_str(), body.to_str());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue