mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Rename Reflectable::global_scope to global
This commit is contained in:
parent
b6bbd41e11
commit
d8e92bb271
37 changed files with 151 additions and 151 deletions
|
@ -76,7 +76,7 @@ pub fn Fetch(global: &GlobalScope, input: RequestOrUSVString, init: &RequestInit
|
|||
// Step 2
|
||||
let request = match Request::Constructor(global, input, init) {
|
||||
Err(e) => {
|
||||
promise.reject_error(promise.global_scope().get_cx(), e);
|
||||
promise.reject_error(promise.global().get_cx(), e);
|
||||
return promise;
|
||||
},
|
||||
Ok(r) => r.get_request(),
|
||||
|
@ -124,13 +124,13 @@ impl FetchResponseListener for FetchContext {
|
|||
|
||||
// JSAutoCompartment needs to be manually made.
|
||||
// Otherwise, Servo will crash.
|
||||
let promise_cx = promise.global_scope().get_cx();
|
||||
let promise_cx = promise.global().get_cx();
|
||||
let _ac = JSAutoCompartment::new(promise_cx, promise.reflector().get_jsobject().get());
|
||||
match fetch_metadata {
|
||||
// Step 4.1
|
||||
Err(_) => {
|
||||
promise.reject_error(
|
||||
promise.global_scope().get_cx(),
|
||||
promise.global().get_cx(),
|
||||
Error::Type("Network error occurred".to_string()));
|
||||
self.fetch_promise = Some(TrustedPromise::new(promise));
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue