mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #8853 - KiChjang:generic-task-sources, r=jdm
Split fn script_chan into 5 different task channel fn Partial #7959. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8853) <!-- Reviewable:end -->
This commit is contained in:
commit
ef000a458a
11 changed files with 98 additions and 39 deletions
|
@ -984,7 +984,7 @@ impl XMLHttpRequest {
|
|||
// This will cancel all previous timeouts
|
||||
let global = self.global.root();
|
||||
let callback = ScheduledXHRTimeout {
|
||||
xhr: Trusted::new(global.r().get_cx(), self, global.r().script_chan()),
|
||||
xhr: Trusted::new(global.r().get_cx(), self, global.r().networking_task_source()),
|
||||
generation_id: self.generation_id.get(),
|
||||
};
|
||||
let duration = Length::new(duration_ms as u64);
|
||||
|
@ -1056,7 +1056,7 @@ impl XMLHttpRequest {
|
|||
Ok(req) => req,
|
||||
};
|
||||
|
||||
let xhr = Trusted::new(global.get_cx(), self, global.script_chan());
|
||||
let xhr = Trusted::new(global.get_cx(), self, global.networking_task_source());
|
||||
|
||||
let context = Arc::new(Mutex::new(XHRContext {
|
||||
xhr: xhr,
|
||||
|
@ -1070,7 +1070,7 @@ impl XMLHttpRequest {
|
|||
let (tx, rx) = global.new_script_pair();
|
||||
(tx, Some(rx))
|
||||
} else {
|
||||
(global.script_chan(), None)
|
||||
(global.networking_task_source(), None)
|
||||
};
|
||||
|
||||
let resource_task = global.resource_task();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue