mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Use fn pipeline_id consistently, not fn pipeline
Consistently use the name 'pipeline_id' to refer to a function that returns an (optional) PipelineId. This was prompted by discovering both fn pipeline and fn pipeline_id doing the same job in htmliframeelement.rs. Note that there is fn pipeline in components/compositing/compositor.rs, but that actually returns an Option<&CompositionPipeline>, not any kind of PipelineId.
This commit is contained in:
parent
bb53da6957
commit
9d097e7d15
20 changed files with 50 additions and 51 deletions
|
@ -238,7 +238,7 @@ impl LoadOrigin for WorkerGlobalScope {
|
|||
None
|
||||
}
|
||||
fn pipeline_id(&self) -> Option<PipelineId> {
|
||||
Some(self.pipeline())
|
||||
Some(self.pipeline_id())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -410,13 +410,13 @@ impl WorkerGlobalScope {
|
|||
FileReadingTaskSource(self.script_chan())
|
||||
}
|
||||
|
||||
pub fn pipeline(&self) -> PipelineId {
|
||||
pub fn pipeline_id(&self) -> PipelineId {
|
||||
let dedicated = self.downcast::<DedicatedWorkerGlobalScope>();
|
||||
let service_worker = self.downcast::<ServiceWorkerGlobalScope>();
|
||||
if let Some(dedicated) = dedicated {
|
||||
return dedicated.pipeline();
|
||||
return dedicated.pipeline_id();
|
||||
} else if let Some(service_worker) = service_worker {
|
||||
return service_worker.pipeline();
|
||||
return service_worker.pipeline_id();
|
||||
} else {
|
||||
panic!("need to implement a sender for SharedWorker")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue