mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Rename PrivateStyleData to PersistentStyleData and use AtomicRefCell instead of RefCell as a container.
This allows us to eliminate the unsafe borrows. \o/ MozReview-Commit-ID: 29hpGaWUFQz
This commit is contained in:
parent
5bcc4192bf
commit
687e1f701c
12 changed files with 96 additions and 142 deletions
|
@ -52,11 +52,11 @@ use core::nonzero::NonZero;
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use libc::c_void;
|
||||
use restyle_damage::RestyleDamage;
|
||||
use style::data::PrivateStyleData;
|
||||
use style::refcell::RefCell;
|
||||
use style::atomic_refcell::AtomicRefCell;
|
||||
use style::data::PersistentStyleData;
|
||||
|
||||
pub struct PartialStyleAndLayoutData {
|
||||
pub style_data: PrivateStyleData,
|
||||
pub struct PartialPersistentLayoutData {
|
||||
pub style_data: PersistentStyleData,
|
||||
pub restyle_damage: RestyleDamage,
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ pub struct PartialStyleAndLayoutData {
|
|||
pub struct OpaqueStyleAndLayoutData {
|
||||
#[ignore_heap_size_of = "TODO(#6910) Box value that should be counted but \
|
||||
the type lives in layout"]
|
||||
pub ptr: NonZero<*mut RefCell<PartialStyleAndLayoutData>>
|
||||
pub ptr: NonZero<*mut AtomicRefCell<PartialPersistentLayoutData>>
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue