Add unrooted_must_root lint for usages of JS<T> in let/for bindings

This commit is contained in:
Manish Goregaokar 2014-09-16 22:35:41 +05:30
parent 12dc54d238
commit bded5c3703
11 changed files with 55 additions and 15 deletions

View file

@ -133,7 +133,7 @@ pub struct XMLHttpRequest {
impl XMLHttpRequest {
pub fn new_inherited(global: &GlobalRef) -> XMLHttpRequest {
let xhr = XMLHttpRequest {
XMLHttpRequest {
eventtarget: XMLHttpRequestEventTarget::new_inherited(XMLHttpRequestTypeId),
ready_state: Traceable::new(Cell::new(Unsent)),
timeout: Traceable::new(Cell::new(0u32)),
@ -163,8 +163,7 @@ impl XMLHttpRequest {
fetch_time: Traceable::new(Cell::new(0)),
timeout_pinned: Traceable::new(Cell::new(false)),
terminate_sender: Untraceable::new(RefCell::new(None)),
};
xhr
}
}
pub fn new(global: &GlobalRef) -> Temporary<XMLHttpRequest> {
reflect_dom_object(box XMLHttpRequest::new_inherited(global),