aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-23 15:22:57 -0500
committerGitHub <noreply@github.com>2016-07-23 15:22:57 -0500
commit62f1873349395c290fc8f542196e7e02d49a5ac5 (patch)
tree772d78535399e840f78cb5a3ab86e9ee5de86f07
parent8e79709ed1770f66a00c01341a00241bd3c4b386 (diff)
parent8a05e7a41300f598a0859c2522157f20d3249b26 (diff)
downloadservo-62f1873349395c290fc8f542196e7e02d49a5ac5.tar.gz
servo-62f1873349395c290fc8f542196e7e02d49a5ac5.zip
Auto merge of #12570 - cynicaldevil:impl-websockets, r=SimonSapin
Implemented name for Runnable trait in WebSocket Runnables <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12551 - [X] These changes do not require tests <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12570) <!-- Reviewable:end -->
-rw-r--r--components/script/dom/websocket.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs
index 1a34096f26b..3b3652040e9 100644
--- a/components/script/dom/websocket.rs
+++ b/components/script/dom/websocket.rs
@@ -461,6 +461,8 @@ struct ConnectionEstablishedTask {
}
impl Runnable for ConnectionEstablishedTask {
+ fn name(&self) -> &'static str { "ConnectionEstablishedTask" }
+
fn handler(self: Box<Self>) {
let ws = self.address.root();
let global = ws.r().global();
@@ -510,6 +512,8 @@ impl Runnable for BufferedAmountTask {
// To be compliant with standards, we need to reset bufferedAmount only when the event loop
// reaches step 1. In our implementation, the bytes will already have been sent on a background
// thread.
+ fn name(&self) -> &'static str { "BufferedAmountTask" }
+
fn handler(self: Box<Self>) {
let ws = self.address.root();
@@ -526,6 +530,8 @@ struct CloseTask {
}
impl Runnable for CloseTask {
+ fn name(&self) -> &'static str { "CloseTask" }
+
fn handler(self: Box<Self>) {
let ws = self.address.root();
let ws = ws.r();
@@ -568,6 +574,8 @@ struct MessageReceivedTask {
}
impl Runnable for MessageReceivedTask {
+ fn name(&self) -> &'static str { "MessageReceivedTask" }
+
#[allow(unsafe_code)]
fn handler(self: Box<Self>) {
let ws = self.address.root();