mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Pass a &GlobalScope to WebIDL static methods and constructors
This commit is contained in:
parent
1fd470889d
commit
19108aa330
56 changed files with 198 additions and 245 deletions
|
@ -5,7 +5,6 @@
|
|||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods, HeadersWrap};
|
||||
use dom::bindings::error::{Error, ErrorResult, Fallible};
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::iterable::Iterable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
|
@ -49,9 +48,9 @@ impl Headers {
|
|||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-headers
|
||||
pub fn Constructor(global: GlobalRef, init: Option<HeadersInit>)
|
||||
pub fn Constructor(global: &GlobalScope, init: Option<HeadersInit>)
|
||||
-> Fallible<Root<Headers>> {
|
||||
let dom_headers_new = Headers::new(global.as_global_scope());
|
||||
let dom_headers_new = Headers::new(global);
|
||||
try!(dom_headers_new.fill(init));
|
||||
Ok(dom_headers_new)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue