aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/fetch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/fetch.rs')
-rw-r--r--components/script/fetch.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/fetch.rs b/components/script/fetch.rs
index 75d6e3b0848..bc04a5ecd92 100644
--- a/components/script/fetch.rs
+++ b/components/script/fetch.rs
@@ -70,8 +70,9 @@ pub fn Fetch(global: GlobalRef, input: RequestOrUSVString, init: &RequestInit) -
let core_resource_thread = global.core_resource_thread();
// Step 1
- let promise = Promise::new(global);
- let response = Response::new(global.as_global_scope());
+ let global_scope = global.as_global_scope();
+ let promise = Promise::new(global_scope);
+ let response = Response::new(global_scope);
// Step 2
let request = match Request::Constructor(global, input, init) {