diff options
author | Keith Yeung <kungfukeith11@gmail.com> | 2016-04-26 16:40:40 -0400 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-04-28 10:52:44 +0200 |
commit | 33acb1937cb65643fc23365998d47846c2f46478 (patch) | |
tree | ef018d11af50bea792a5abe06e6b0473a49c292d /components/script/dom/xmlhttprequest.rs | |
parent | fbc575407d68a516a2b15a0d1c74150a9011aa9c (diff) | |
download | servo-33acb1937cb65643fc23365998d47846c2f46478.tar.gz servo-33acb1937cb65643fc23365998d47846c2f46478.zip |
Remove extraneous script_chan parameter from Trusted::new
Diffstat (limited to 'components/script/dom/xmlhttprequest.rs')
-rw-r--r-- | components/script/dom/xmlhttprequest.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 574de7b8e8b..a061230898b 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -1079,11 +1079,11 @@ impl XMLHttpRequest { fn set_timeout(&self, duration_ms: u32) { // Sets up the object to timeout in a given number of milliseconds // This will cancel all previous timeouts - let global = self.global(); let callback = OneshotTimerCallback::XhrTimeout(XHRTimeoutCallback { - xhr: Trusted::new(self, global.r().networking_task_source()), + xhr: Trusted::new(self), generation_id: self.generation_id.get(), }); + let global = self.global(); let duration = Length::new(duration_ms as u64); *self.timeout_cancel.borrow_mut() = Some(global.r().schedule_callback(callback, duration)); } @@ -1300,7 +1300,7 @@ impl XMLHttpRequest { Ok(req) => req, }; - let xhr = Trusted::new(self, global.networking_task_source()); + let xhr = Trusted::new(self); let context = Arc::new(Mutex::new(XHRContext { xhr: xhr, |