mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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,34 +98,35 @@ pub struct WorkerGlobalScope {
|
|||
}
|
||||
|
||||
impl WorkerGlobalScope {
|
||||
pub fn new_inherited(init: WorkerGlobalScopeInit,
|
||||
worker_url: ServoUrl,
|
||||
runtime: Runtime,
|
||||
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
||||
timer_event_chan: IpcSender<TimerEvent>,
|
||||
closing: Option<Arc<AtomicBool>>)
|
||||
-> WorkerGlobalScope {
|
||||
WorkerGlobalScope {
|
||||
globalscope:
|
||||
GlobalScope::new_inherited(
|
||||
init.pipeline_id,
|
||||
init.to_devtools_sender,
|
||||
init.mem_profiler_chan,
|
||||
init.time_profiler_chan,
|
||||
init.script_to_constellation_chan,
|
||||
init.scheduler_chan,
|
||||
init.resource_threads,
|
||||
timer_event_chan,
|
||||
MutableOrigin::new(init.origin)),
|
||||
pub fn new_inherited(
|
||||
init: WorkerGlobalScopeInit,
|
||||
worker_url: ServoUrl,
|
||||
runtime: Runtime,
|
||||
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
|
||||
timer_event_chan: IpcSender<TimerEvent>,
|
||||
closing: Option<Arc<AtomicBool>>,
|
||||
) -> Self {
|
||||
Self {
|
||||
globalscope: GlobalScope::new_inherited(
|
||||
init.pipeline_id,
|
||||
init.to_devtools_sender,
|
||||
init.mem_profiler_chan,
|
||||
init.time_profiler_chan,
|
||||
init.script_to_constellation_chan,
|
||||
init.scheduler_chan,
|
||||
init.resource_threads,
|
||||
timer_event_chan,
|
||||
MutableOrigin::new(init.origin),
|
||||
),
|
||||
worker_id: init.worker_id,
|
||||
worker_url: worker_url,
|
||||
closing: closing,
|
||||
runtime: runtime,
|
||||
worker_url,
|
||||
closing,
|
||||
runtime,
|
||||
location: Default::default(),
|
||||
navigator: Default::default(),
|
||||
from_devtools_sender: init.from_devtools_sender,
|
||||
from_devtools_receiver: from_devtools_receiver,
|
||||
microtask_queue: MicrotaskQueue::default(),
|
||||
from_devtools_receiver,
|
||||
microtask_queue: Default::default(),
|
||||
navigation_start_precise: precise_time_ns() as f64,
|
||||
performance: Default::default(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue