diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-07-15 16:38:00 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-07-22 20:28:15 +0200 |
commit | 78df6e8d3e59d14dfecdad81f1276f34de49cd61 (patch) | |
tree | c9d1da0b421cbabdceae0aa4ed8f47fa225a633a /components/script/dom/websocket.rs | |
parent | 56c660d4de9d9a077f3d28348e29bda0b3ac0ae6 (diff) | |
download | servo-78df6e8d3e59d14dfecdad81f1276f34de49cd61.tar.gz servo-78df6e8d3e59d14dfecdad81f1276f34de49cd61.zip |
Remove the receiver field from WebSocket.
The receiver will be used from another thread than the WebSocket object in
the future.
Diffstat (limited to 'components/script/dom/websocket.rs')
-rw-r--r-- | components/script/dom/websocket.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs index 2632d7838c5..aeb13ac4f95 100644 --- a/components/script/dom/websocket.rs +++ b/components/script/dom/websocket.rs @@ -46,7 +46,6 @@ enum WebSocketRequestState { } no_jsmanaged_fields!(Sender<WebSocketStream>); -no_jsmanaged_fields!(Receiver<WebSocketStream>); #[dom_struct] pub struct WebSocket { @@ -55,7 +54,6 @@ pub struct WebSocket { global: GlobalField, ready_state: Cell<WebSocketRequestState>, sender: RefCell<Option<Sender<WebSocketStream>>>, - receiver: RefCell<Option<Receiver<WebSocketStream>>>, failed: Cell<bool>, //Flag to tell if websocket was closed due to failure full: Cell<bool>, //Flag to tell if websocket queue is full clean_close: Cell<bool>, //Flag to tell if the websocket closed cleanly (not due to full or fail) @@ -86,7 +84,6 @@ impl WebSocket { ready_state: Cell::new(WebSocketRequestState::Connecting), failed: Cell::new(false), sender: RefCell::new(None), - receiver: RefCell::new(None), full: Cell::new(false), clean_close: Cell::new(true), code: Cell::new(0), @@ -136,7 +133,7 @@ impl WebSocket { WebSocketBinding::Wrap); let channel = establish_a_websocket_connection(url, global.get_url().serialize()); - let (temp_sender, temp_receiver) = match channel { + let (temp_sender, _temp_receiver) = match channel { Ok(channel) => channel, Err(e) => { debug!("Failed to establish a WebSocket connection: {:?}", e); @@ -151,7 +148,6 @@ impl WebSocket { }; *ws.r().sender.borrow_mut() = Some(temp_sender); - *ws.r().receiver.borrow_mut() = Some(temp_receiver); //Create everything necessary for starting the open asynchronous task, then begin the task. let global_root = ws.r().global.root(); |