mirror of
https://github.com/servo/servo.git
synced 2025-08-17 11:25:35 +01:00
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:
parent
52a6f63608
commit
56117d3185
38 changed files with 370 additions and 332 deletions
|
@ -190,7 +190,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
&init.resource_threads.sender()) {
|
||||
Err(_) => {
|
||||
println!("error loading script {}", serialized_worker_url);
|
||||
parent_sender.send(CommonScriptMsg::RunnableMsg(WorkerEvent,
|
||||
parent_sender.send(CommonScriptMsg::Task(WorkerEvent,
|
||||
box SimpleWorkerErrorHandler::new(worker))).unwrap();
|
||||
return;
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
let worker = self.worker.borrow().as_ref().unwrap().clone();
|
||||
// TODO: Should use the DOM manipulation task source.
|
||||
self.parent_sender
|
||||
.send(CommonScriptMsg::RunnableMsg(WorkerEvent,
|
||||
.send(CommonScriptMsg::Task(WorkerEvent,
|
||||
box WorkerErrorHandler::new(worker, error_info)))
|
||||
.unwrap();
|
||||
}
|
||||
|
@ -376,7 +376,7 @@ impl DedicatedWorkerGlobalScopeMethods for DedicatedWorkerGlobalScope {
|
|||
let data = StructuredCloneData::write(cx, message)?;
|
||||
let worker = self.worker.borrow().as_ref().unwrap().clone();
|
||||
self.parent_sender
|
||||
.send(CommonScriptMsg::RunnableMsg(WorkerEvent,
|
||||
.send(CommonScriptMsg::Task(WorkerEvent,
|
||||
box WorkerMessageHandler::new(worker, data)))
|
||||
.unwrap();
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue