mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Make Fetch take a &GlobalScope
This commit is contained in:
parent
144dc62575
commit
1f8bb3a89f
3 changed files with 10 additions and 11 deletions
|
@ -861,7 +861,7 @@ impl WindowMethods for Window {
|
|||
#[allow(unrooted_must_root)]
|
||||
// https://fetch.spec.whatwg.org/#fetch-method
|
||||
fn Fetch(&self, input: RequestOrUSVString, init: &RequestInit) -> Rc<Promise> {
|
||||
fetch::Fetch(self.global().r(), input, init)
|
||||
fetch::Fetch(&self.upcast(), input, init)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope {
|
|||
#[allow(unrooted_must_root)]
|
||||
// https://fetch.spec.whatwg.org/#fetch-method
|
||||
fn Fetch(&self, input: RequestOrUSVString, init: &RequestInit) -> Rc<Promise> {
|
||||
fetch::Fetch(self.global().r(), input, init)
|
||||
fetch::Fetch(self.upcast(), input, init)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue