Merge pull request #13 from rrebelo62/trunk
Resolves #12. Avoid Segmentation Fault, retains the body of a message from a webpage to a webview
This commit is contained in:
commit
1e132d9080
|
@ -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