Pass a &GlobalScope to WebIDL static methods and constructors

This commit is contained in:
Anthony Ramine 2016-10-04 00:54:05 +02:00
parent 1fd470889d
commit 19108aa330
56 changed files with 198 additions and 245 deletions

View file

@ -206,8 +206,8 @@ impl XMLHttpRequest {
}
// https://xhr.spec.whatwg.org/#constructors
pub fn Constructor(global: GlobalRef) -> Fallible<Root<XMLHttpRequest>> {
Ok(XMLHttpRequest::new(global.as_global_scope()))
pub fn Constructor(global: &GlobalScope) -> Fallible<Root<XMLHttpRequest>> {
Ok(XMLHttpRequest::new(global))
}
fn sync_in_window(&self) -> bool {