mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
script: further use of safe to jsval (#38099)
Remove size bound from safe to jsval trait, apply to script/dom, with the exception of windowproxy. Second part of https://github.com/servo/servo/issues/37951 Signed-off-by: gterzian <2792687+gterzian@users.noreply.github.com> *Describe the changes that this pull request makes here. This will be the commit message.* Testing: *Describe how this pull request is tested or why it doesn't require tests* Fixes: *Link to an issue this pull requests fixes or remove this line if there is no issue*
This commit is contained in:
parent
72a9f36c43
commit
b821377771
10 changed files with 114 additions and 128 deletions
|
@ -41,7 +41,7 @@ pub trait SafeToJSValConvertible {
|
|||
fn safe_to_jsval(&self, cx: SafeJSContext, rval: MutableHandleValue);
|
||||
}
|
||||
|
||||
impl<T: ToJSValConvertible> SafeToJSValConvertible for T {
|
||||
impl<T: ToJSValConvertible + ?Sized> SafeToJSValConvertible for T {
|
||||
fn safe_to_jsval(&self, cx: SafeJSContext, rval: MutableHandleValue) {
|
||||
unsafe { self.to_jsval(*cx, rval) };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue