diff options
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/domrectlist.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/components/script/dom/domrectlist.rs b/components/script/dom/domrectlist.rs index ebf227bb35d..eeb95cd9e3f 100644 --- a/components/script/dom/domrectlist.rs +++ b/components/script/dom/domrectlist.rs @@ -14,22 +14,20 @@ use dom::window::Window; pub struct DOMRectList { reflector_: Reflector, rects: Vec<JS<DOMRect>>, - window: JS<Window>, } impl DOMRectList { - fn new_inherited<T>(window: &Window, rects: T) -> DOMRectList + fn new_inherited<T>(rects: T) -> DOMRectList where T: Iterator<Item=Root<DOMRect>> { DOMRectList { reflector_: Reflector::new(), rects: rects.map(|r| JS::from_rooted(&r)).collect(), - window: JS::from_ref(window), } } pub fn new<T>(window: &Window, rects: T) -> Root<DOMRectList> where T: Iterator<Item=Root<DOMRect>> { - reflect_dom_object(box DOMRectList::new_inherited(window, rects), + reflect_dom_object(box DOMRectList::new_inherited(rects), GlobalRef::Window(window), DOMRectListBinding::Wrap) } } |