Make Reflector #[must_root], propagate to non-HTMLElements

This commit is contained in:
Manish Goregaokar 2014-09-17 00:51:20 +05:30
parent f0b8391762
commit 30014c3919
40 changed files with 53 additions and 12 deletions

View file

@ -10,6 +10,7 @@ use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::window::Window;
#[deriving(Encodable)]
#[must_root]
pub struct PerformanceTiming {
reflector_: Reflector,
navigationStart: u64,
@ -26,6 +27,7 @@ impl PerformanceTiming {
}
}
#[allow(unrooted_must_root)]
pub fn new(window: &JSRef<Window>) -> Temporary<PerformanceTiming> {
let timing = PerformanceTiming::new_inherited(window.navigationStart,
window.navigationStartPrecise);