mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove extraneous script_chan parameter from Trusted::new
This commit is contained in:
parent
fbc575407d
commit
33acb1937c
15 changed files with 38 additions and 62 deletions
|
@ -245,7 +245,7 @@ impl WebSocket {
|
|||
|
||||
// Step 7.
|
||||
let ws = WebSocket::new(global, resource_url.clone());
|
||||
let address = Trusted::new(ws.r(), global.networking_task_source());
|
||||
let address = Trusted::new(ws.r());
|
||||
|
||||
let connect_data = WebSocketConnectData {
|
||||
resource_url: resource_url.clone(),
|
||||
|
@ -314,9 +314,7 @@ impl WebSocket {
|
|||
WebSocketRequestState::Closing | WebSocketRequestState::Closed => true,
|
||||
};
|
||||
|
||||
let global = self.global();
|
||||
let chan = global.r().networking_task_source();
|
||||
let address = Trusted::new(self, chan.clone());
|
||||
let address = Trusted::new(self);
|
||||
|
||||
match data_byte_len.checked_add(self.buffered_amount.get()) {
|
||||
None => panic!(),
|
||||
|
@ -334,7 +332,8 @@ impl WebSocket {
|
|||
address: address,
|
||||
};
|
||||
|
||||
chan.send(CommonScriptMsg::RunnableMsg(WebSocketEvent, task)).unwrap();
|
||||
let global = self.global();
|
||||
global.r().script_chan().send(CommonScriptMsg::RunnableMsg(WebSocketEvent, task)).unwrap();
|
||||
}
|
||||
|
||||
Ok(true)
|
||||
|
@ -440,9 +439,8 @@ impl WebSocketMethods for WebSocket {
|
|||
will abort connecting the websocket*/
|
||||
self.ready_state.set(WebSocketRequestState::Closing);
|
||||
|
||||
let global = self.global();
|
||||
let sender = global.r().networking_task_source();
|
||||
let address = Trusted::new(self, sender.clone());
|
||||
let address = Trusted::new(self);
|
||||
let sender = self.global().r().networking_task_source();
|
||||
fail_the_websocket_connection(address, sender);
|
||||
}
|
||||
WebSocketRequestState::Open => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue