mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Don't try to send a message in WebSocket#close if the sender isn't present.
This commit is contained in:
parent
072fdf695b
commit
b467f3e9d6
6 changed files with 3 additions and 16 deletions
|
@ -200,7 +200,9 @@ impl<'a> WebSocketMethods for &'a WebSocket {
|
||||||
|
|
||||||
let mut sender = this.sender.borrow_mut();
|
let mut sender = this.sender.borrow_mut();
|
||||||
//TODO: Also check if the buffer is full
|
//TODO: Also check if the buffer is full
|
||||||
let _ = sender.as_mut().unwrap().send_message(Message::Close(None));
|
if let Some(sender) = sender.as_mut() {
|
||||||
|
let _ = sender.send_message(Message::Close(None));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[close-basic.html]
|
|
||||||
type: testharness
|
|
||||||
expected: CRASH
|
|
|
@ -1,3 +0,0 @@
|
||||||
[close-multiple.html]
|
|
||||||
type: testharness
|
|
||||||
expected: CRASH
|
|
|
@ -1,3 +0,0 @@
|
||||||
[close-nested.html]
|
|
||||||
type: testharness
|
|
||||||
expected: CRASH
|
|
|
@ -1,3 +0,0 @@
|
||||||
[close-return.html]
|
|
||||||
type: testharness
|
|
||||||
expected: CRASH
|
|
|
@ -1,3 +0,0 @@
|
||||||
[003.html]
|
|
||||||
type: testharness
|
|
||||||
expected: CRASH
|
|
Loading…
Add table
Add a link
Reference in a new issue