Skip to content

Commit

Permalink
now panics on integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkisquared committed Dec 30, 2015
1 parent 773a15d commit b95af75
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/script/dom/websocket.rs
Expand Up @@ -300,10 +300,9 @@ impl WebSocket {
let address = Trusted::new(self, chan.clone());

match data_byte_len.checked_add(self.buffered_amount.get()) {
None => return Ok(false),
None => panic!(),
Some(new_amount) => self.buffered_amount.set(new_amount)
};
// self.buffered_amount.set(self.buffered_amount.get() + data_byte_len);

if return_after_buffer {
return Ok(false);
Expand Down

0 comments on commit b95af75

Please sign in to comment.