mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
added pipelines to all task sources
changed task sources to accept pipeline ids
This commit is contained in:
parent
2ffbe53989
commit
52b63def44
20 changed files with 194 additions and 230 deletions
|
@ -359,7 +359,7 @@ impl DedicatedWorkerGlobalScope {
|
|||
#[allow(unsafe_code)]
|
||||
pub fn forward_error_to_worker_object(&self, error_info: ErrorInfo) {
|
||||
let worker = self.worker.borrow().as_ref().unwrap().clone();
|
||||
let pipeline_id = worker.clone().root().global().pipeline_id();
|
||||
let pipeline_id = self.upcast::<GlobalScope>().pipeline_id();
|
||||
let task = Box::new(task!(forward_error_to_worker_object: move || {
|
||||
let worker = worker.root();
|
||||
let global = worker.global();
|
||||
|
@ -406,7 +406,7 @@ impl DedicatedWorkerGlobalScopeMethods for DedicatedWorkerGlobalScope {
|
|||
unsafe fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
|
||||
let data = StructuredCloneData::write(cx, message)?;
|
||||
let worker = self.worker.borrow().as_ref().unwrap().clone();
|
||||
let pipeline_id = worker.clone().root().global().pipeline_id();
|
||||
let pipeline_id = self.upcast::<GlobalScope>().pipeline_id();
|
||||
let task = Box::new(task!(post_worker_message: move || {
|
||||
Worker::handle_message(worker, data);
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue