Rename Runnable to Task

The changes are:
 * `*Runnable` -> `*Task`;
 * `RunnableMsg` -> `Task`;
 * `RunnableWrapper` -> `TaskCanceller`;
 * `MainThreadRunnable` -> `MainThreadTask`;
 * `wrap_runnable` -> `wrap_task`;
 * `get_runnable_wrapper` -> `task_canceller`;
 * `handler` -> `run`;
 * `main_thread_handler` -> `run_with_script_thread`.
This commit is contained in:
Anthony Ramine 2017-09-16 02:09:26 +02:00
parent 52a6f63608
commit 56117d3185
38 changed files with 370 additions and 332 deletions

View file

@ -16,7 +16,7 @@ use dom::eventtarget::EventTarget;
use dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{HandleValue, JSContext};
use script_thread::Runnable;
use script_thread::Task;
use script_traits::{ScriptMsg, DOMMessage};
use servo_url::ServoUrl;
use std::cell::Cell;
@ -104,9 +104,9 @@ impl ServiceWorkerMethods for ServiceWorker {
event_handler!(statechange, GetOnstatechange, SetOnstatechange);
}
impl Runnable for SimpleWorkerErrorHandler<ServiceWorker> {
impl Task for SimpleWorkerErrorHandler<ServiceWorker> {
#[allow(unrooted_must_root)]
fn handler(self: Box<SimpleWorkerErrorHandler<ServiceWorker>>) {
fn run(self: Box<Self>) {
let this = *self;
ServiceWorker::dispatch_simple_error(this.addr);
}