mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #2548 : ebalint/servo/master, r=Ms2ger
This commit is contained in:
commit
8c73f252ca
1 changed files with 8 additions and 0 deletions
|
@ -166,6 +166,14 @@ impl<T: Reflectable> JS<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Assignable<U>, U: Reflectable> JS<U> {
|
||||
pub fn from_rooted(root: T) -> JS<U> {
|
||||
unsafe {
|
||||
root.get_js()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//XXXjdm This is disappointing. This only gets called from trace hooks, in theory,
|
||||
// so it's safe to assume that self is rooted and thereby safe to access.
|
||||
impl<T: Reflectable> Reflectable for JS<T> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue