mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Reformat WorkerGlobalScope::new_inherited
This commit is contained in:
parent
71df1d5d9b
commit
3764217ca6
1 changed files with 25 additions and 24 deletions
|
@ -98,16 +98,16 @@ pub struct WorkerGlobalScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl WorkerGlobalScope {
|
impl WorkerGlobalScope {
|
||||||
pub fn new_inherited(init: WorkerGlobalScopeInit,
|
pub fn new_inherited(
|
||||||
|
init: WorkerGlobalScopeInit,
|
||||||
worker_url: ServoUrl,
|
worker_url: ServoUrl,
|
||||||
runtime: Runtime,
|
runtime: Runtime,
|
||||||
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
||||||
timer_event_chan: IpcSender<TimerEvent>,
|
timer_event_chan: IpcSender<TimerEvent>,
|
||||||
closing: Option<Arc<AtomicBool>>)
|
closing: Option<Arc<AtomicBool>>,
|
||||||
-> WorkerGlobalScope {
|
) -> Self {
|
||||||
WorkerGlobalScope {
|
Self {
|
||||||
globalscope:
|
globalscope: GlobalScope::new_inherited(
|
||||||
GlobalScope::new_inherited(
|
|
||||||
init.pipeline_id,
|
init.pipeline_id,
|
||||||
init.to_devtools_sender,
|
init.to_devtools_sender,
|
||||||
init.mem_profiler_chan,
|
init.mem_profiler_chan,
|
||||||
|
@ -116,16 +116,17 @@ impl WorkerGlobalScope {
|
||||||
init.scheduler_chan,
|
init.scheduler_chan,
|
||||||
init.resource_threads,
|
init.resource_threads,
|
||||||
timer_event_chan,
|
timer_event_chan,
|
||||||
MutableOrigin::new(init.origin)),
|
MutableOrigin::new(init.origin),
|
||||||
|
),
|
||||||
worker_id: init.worker_id,
|
worker_id: init.worker_id,
|
||||||
worker_url: worker_url,
|
worker_url,
|
||||||
closing: closing,
|
closing,
|
||||||
runtime: runtime,
|
runtime,
|
||||||
location: Default::default(),
|
location: Default::default(),
|
||||||
navigator: Default::default(),
|
navigator: Default::default(),
|
||||||
from_devtools_sender: init.from_devtools_sender,
|
from_devtools_sender: init.from_devtools_sender,
|
||||||
from_devtools_receiver: from_devtools_receiver,
|
from_devtools_receiver,
|
||||||
microtask_queue: MicrotaskQueue::default(),
|
microtask_queue: Default::default(),
|
||||||
navigation_start_precise: precise_time_ns() as f64,
|
navigation_start_precise: precise_time_ns() as f64,
|
||||||
performance: Default::default(),
|
performance: Default::default(),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue