Remove extraneous script_chan parameter from Trusted::new

This commit is contained in:
Keith Yeung 2016-04-26 16:40:40 -04:00 committed by Ms2ger
parent fbc575407d
commit 33acb1937c
15 changed files with 38 additions and 62 deletions

View file

@ -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,