mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Remove usage of the deprecated box () (expr)
syntax.
This commit is contained in:
parent
6737be1fb1
commit
2b62041997
2 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ impl Pipeline {
|
||||||
new_pipeline_id: id,
|
new_pipeline_id: id,
|
||||||
subpage_id: subpage_id,
|
subpage_id: subpage_id,
|
||||||
load_data: load_data.clone(),
|
load_data: load_data.clone(),
|
||||||
paint_chan: box() (paint_chan.clone()) as Box<Any + Send>,
|
paint_chan: box paint_chan.clone() as Box<Any + Send>,
|
||||||
failure: failure,
|
failure: failure,
|
||||||
pipeline_port: mem::replace(&mut pipeline_port, None).unwrap(),
|
pipeline_port: mem::replace(&mut pipeline_port, None).unwrap(),
|
||||||
layout_shutdown_chan: layout_shutdown_chan.clone(),
|
layout_shutdown_chan: layout_shutdown_chan.clone(),
|
||||||
|
|
|
@ -381,8 +381,8 @@ pub type ProtoOrIfaceArray = [*mut JSObject; PrototypeList::ID::Count as usize];
|
||||||
/// Construct and cache the ProtoOrIfaceArray for the given global.
|
/// Construct and cache the ProtoOrIfaceArray for the given global.
|
||||||
/// Fails if the argument is not a DOM global.
|
/// Fails if the argument is not a DOM global.
|
||||||
pub fn initialize_global(global: *mut JSObject) {
|
pub fn initialize_global(global: *mut JSObject) {
|
||||||
let proto_array: Box<ProtoOrIfaceArray> = box ()
|
let proto_array: Box<ProtoOrIfaceArray> =
|
||||||
([0 as *mut JSObject; PrototypeList::ID::Count as usize]);
|
box [0 as *mut JSObject; PrototypeList::ID::Count as usize];
|
||||||
unsafe {
|
unsafe {
|
||||||
assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
assert!(((*JS_GetClass(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
|
||||||
let box_ = Box::into_raw(proto_array);
|
let box_ = Box::into_raw(proto_array);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue