Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate runnable variants on DOMManipulationTask into a single Runnable variant. #12292

Merged
merged 2 commits into from Jul 7, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Add name method to Runnable trait

  • Loading branch information
cbrewster committed Jul 6, 2016
commit 54cf3afe3022b1aa7e01ac6c33383d1bb810bb20
@@ -181,6 +181,8 @@ impl StorageEventRunnable {
}

impl Runnable for StorageEventRunnable {
fn name(&self) -> &'static str { "StorageEventRunnable" }

fn main_thread_handler(self: Box<StorageEventRunnable>, script_thread: &ScriptThread) {
let this = *self;
let storage_root = this.element.root();
@@ -200,6 +200,7 @@ impl<T: Runnable + Send> Runnable for CancellableRunnable<T> {

pub trait Runnable {
fn is_cancelled(&self) -> bool { false }
fn name(&self) -> &'static str { "generic runnable" }
fn handler(self: Box<Self>) {}
fn main_thread_handler(self: Box<Self>, _script_thread: &ScriptThread) { self.handler(); }
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.