mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Introduce Reflectable::global_scope
This commit is contained in:
parent
27f100b1d4
commit
ae6af5172b
30 changed files with 116 additions and 120 deletions
|
@ -293,7 +293,7 @@ impl ResponseMethods for Response {
|
|||
|
||||
// https://fetch.spec.whatwg.org/#dom-response-headers
|
||||
fn Headers(&self) -> Root<Headers> {
|
||||
self.headers_reflector.or_init(|| Headers::for_response(self.global().r().as_global_scope()))
|
||||
self.headers_reflector.or_init(|| Headers::for_response(&self.global_scope()))
|
||||
}
|
||||
|
||||
// https://fetch.spec.whatwg.org/#dom-response-clone
|
||||
|
@ -302,7 +302,7 @@ impl ResponseMethods for Response {
|
|||
// TODO: This step relies on body and stream, which are still unimplemented.
|
||||
|
||||
// Step 2
|
||||
let new_response = Response::new(self.global().r().as_global_scope());
|
||||
let new_response = Response::new(&self.global_scope());
|
||||
new_response.Headers().set_guard(self.Headers().get_guard());
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-response-clone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue