From 54cf3afe3022b1aa7e01ac6c33383d1bb810bb20 Mon Sep 17 00:00:00 2001 From: Connor Brewster Date: Wed, 6 Jul 2016 10:47:23 -0600 Subject: [PATCH] Add name method to Runnable trait --- components/script/dom/storage.rs | 2 ++ components/script/script_thread.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs index 65824532209..d927c5ba213 100644 --- a/components/script/dom/storage.rs +++ b/components/script/dom/storage.rs @@ -181,6 +181,8 @@ impl StorageEventRunnable { } impl Runnable for StorageEventRunnable { + fn name(&self) -> &'static str { "StorageEventRunnable" } + fn main_thread_handler(self: Box, script_thread: &ScriptThread) { let this = *self; let storage_root = this.element.root(); diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 788a40532aa..8a7fc82f52e 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -200,6 +200,7 @@ impl Runnable for CancellableRunnable { pub trait Runnable { fn is_cancelled(&self) -> bool { false } + fn name(&self) -> &'static str { "generic runnable" } fn handler(self: Box) {} fn main_thread_handler(self: Box, _script_thread: &ScriptThread) { self.handler(); } }