Reformat WorkerGlobalScope::new_inherited

This commit is contained in:
Anthony Ramine 2017-09-13 10:01:21 +02:00
parent 71df1d5d9b
commit 3764217ca6

View file

@ -98,34 +98,35 @@ pub struct WorkerGlobalScope {
} }
impl WorkerGlobalScope { impl WorkerGlobalScope {
pub fn new_inherited(init: WorkerGlobalScopeInit, pub fn new_inherited(
worker_url: ServoUrl, init: WorkerGlobalScopeInit,
runtime: Runtime, worker_url: ServoUrl,
from_devtools_receiver: Receiver<DevtoolScriptControlMsg>, runtime: Runtime,
timer_event_chan: IpcSender<TimerEvent>, from_devtools_receiver: Receiver<DevtoolScriptControlMsg>,
closing: Option<Arc<AtomicBool>>) timer_event_chan: IpcSender<TimerEvent>,
-> WorkerGlobalScope { closing: Option<Arc<AtomicBool>>,
WorkerGlobalScope { ) -> Self {
globalscope: Self {
GlobalScope::new_inherited( globalscope: 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,
init.time_profiler_chan, init.time_profiler_chan,
init.script_to_constellation_chan, init.script_to_constellation_chan,
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(),
} }