mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Use NonZeroUsize in script_layout_interface
This commit is contained in:
parent
ff23a8536e
commit
7ebedd02a9
8 changed files with 38 additions and 13 deletions
|
@ -7,12 +7,11 @@
|
|||
//! to depend on script.
|
||||
|
||||
#![deny(unsafe_code)]
|
||||
#![feature(nonzero)]
|
||||
#![cfg_attr(feature = "unstable", feature(nonzero))]
|
||||
|
||||
extern crate app_units;
|
||||
extern crate atomic_refcell;
|
||||
extern crate canvas_traits;
|
||||
extern crate core;
|
||||
extern crate cssparser;
|
||||
extern crate euclid;
|
||||
extern crate gfx_traits;
|
||||
|
@ -26,6 +25,7 @@ extern crate log;
|
|||
extern crate metrics;
|
||||
extern crate msg;
|
||||
extern crate net_traits;
|
||||
extern crate nonzero;
|
||||
extern crate profile_traits;
|
||||
extern crate range;
|
||||
extern crate script_traits;
|
||||
|
@ -43,12 +43,13 @@ pub mod wrapper_traits;
|
|||
|
||||
use atomic_refcell::AtomicRefCell;
|
||||
use canvas_traits::canvas::CanvasMsg;
|
||||
use core::nonzero::NonZero;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use libc::c_void;
|
||||
use net_traits::image_cache::PendingImageId;
|
||||
use nonzero::NonZeroUsize;
|
||||
use script_traits::UntrustedNodeAddress;
|
||||
use servo_url::ServoUrl;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::atomic::AtomicIsize;
|
||||
use style::data::ElementData;
|
||||
|
||||
|
@ -78,7 +79,8 @@ pub struct OpaqueStyleAndLayoutData {
|
|||
// NB: We really store a `StyleAndLayoutData` here, so be careful!
|
||||
#[ignore_heap_size_of = "TODO(#6910) Box value that should be counted but \
|
||||
the type lives in layout"]
|
||||
pub ptr: NonZero<*mut StyleData>
|
||||
pub ptr: NonZeroUsize,
|
||||
pub phantom: PhantomData<*mut StyleData>,
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue