mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Reformat DissimilarOriginWindow::new
This commit is contained in:
parent
b8ae82ffb8
commit
1c46135c75
1 changed files with 17 additions and 12 deletions
|
@ -45,22 +45,27 @@ pub struct DissimilarOriginWindow {
|
||||||
|
|
||||||
impl DissimilarOriginWindow {
|
impl DissimilarOriginWindow {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
pub fn new(global_to_clone_from: &GlobalScope, window_proxy: &WindowProxy) -> Root<DissimilarOriginWindow> {
|
pub fn new(
|
||||||
|
global_to_clone_from: &GlobalScope,
|
||||||
|
window_proxy: &WindowProxy,
|
||||||
|
) -> Root<Self> {
|
||||||
let cx = global_to_clone_from.get_cx();
|
let cx = global_to_clone_from.get_cx();
|
||||||
// Any timer events fired on this window are ignored.
|
// Any timer events fired on this window are ignored.
|
||||||
let (timer_event_chan, _) = ipc::channel().unwrap();
|
let (timer_event_chan, _) = ipc::channel().unwrap();
|
||||||
let win = box DissimilarOriginWindow {
|
let win = box Self {
|
||||||
globalscope: GlobalScope::new_inherited(PipelineId::new(),
|
globalscope: GlobalScope::new_inherited(
|
||||||
global_to_clone_from.devtools_chan().cloned(),
|
PipelineId::new(),
|
||||||
global_to_clone_from.mem_profiler_chan().clone(),
|
global_to_clone_from.devtools_chan().cloned(),
|
||||||
global_to_clone_from.time_profiler_chan().clone(),
|
global_to_clone_from.mem_profiler_chan().clone(),
|
||||||
global_to_clone_from.script_to_constellation_chan().clone(),
|
global_to_clone_from.time_profiler_chan().clone(),
|
||||||
global_to_clone_from.scheduler_chan().clone(),
|
global_to_clone_from.script_to_constellation_chan().clone(),
|
||||||
global_to_clone_from.resource_threads().clone(),
|
global_to_clone_from.scheduler_chan().clone(),
|
||||||
timer_event_chan,
|
global_to_clone_from.resource_threads().clone(),
|
||||||
global_to_clone_from.origin().clone()),
|
timer_event_chan,
|
||||||
|
global_to_clone_from.origin().clone(),
|
||||||
|
),
|
||||||
window_proxy: JS::from_ref(window_proxy),
|
window_proxy: JS::from_ref(window_proxy),
|
||||||
location: MutNullableJS::new(None),
|
location: Default::default(),
|
||||||
};
|
};
|
||||||
unsafe { DissimilarOriginWindowBinding::Wrap(cx, win) }
|
unsafe { DissimilarOriginWindowBinding::Wrap(cx, win) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue