mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Split fn script_chan into 5 different task channel fn
This commit is contained in:
parent
368dd1dc53
commit
8d90034d29
11 changed files with 98 additions and 39 deletions
|
@ -254,10 +254,10 @@ impl WebSocket {
|
|||
|
||||
// Step 7.
|
||||
let ws = WebSocket::new(global, resource_url.clone());
|
||||
let address = Trusted::new(global.get_cx(), ws.r(), global.script_chan());
|
||||
let address = Trusted::new(global.get_cx(), ws.r(), global.networking_task_source());
|
||||
|
||||
let origin = global.get_url().serialize();
|
||||
let sender = global.script_chan();
|
||||
let sender = global.networking_task_source();
|
||||
spawn_named(format!("WebSocket connection to {}", ws.Url()), move || {
|
||||
// Step 8: Protocols.
|
||||
|
||||
|
@ -328,7 +328,7 @@ impl WebSocket {
|
|||
};
|
||||
|
||||
let global = self.global.root();
|
||||
let chan = global.r().script_chan();
|
||||
let chan = global.r().networking_task_source();
|
||||
let address = Trusted::new(global.r().get_cx(), self, chan.clone());
|
||||
|
||||
let new_buffer_amount = (self.buffered_amount.get() as u64) + data_byte_len;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue