mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Make DOM own the style and layout data, in an UnsafeCell
The previous Cell was a lie.
This commit is contained in:
parent
516e8e0aa6
commit
185a402d9c
17 changed files with 74 additions and 180 deletions
|
@ -23,7 +23,6 @@ extern crate profile_traits;
|
|||
|
||||
mod dom_wrapper;
|
||||
|
||||
use crate::dom_wrapper::drop_style_and_layout_data;
|
||||
use crate::dom_wrapper::{ServoLayoutDocument, ServoLayoutElement, ServoLayoutNode};
|
||||
use app_units::Au;
|
||||
use crossbeam_channel::{unbounded, Receiver, Sender};
|
||||
|
@ -692,7 +691,6 @@ impl LayoutThread {
|
|||
Msg::GetRPC(..) => LayoutHangAnnotation::GetRPC,
|
||||
Msg::TickAnimations(..) => LayoutHangAnnotation::TickAnimations,
|
||||
Msg::AdvanceClockMs(..) => LayoutHangAnnotation::AdvanceClockMs,
|
||||
Msg::ReapStyleAndLayoutData(..) => LayoutHangAnnotation::ReapStyleAndLayoutData,
|
||||
Msg::CollectReports(..) => LayoutHangAnnotation::CollectReports,
|
||||
Msg::PrepareToExit(..) => LayoutHangAnnotation::PrepareToExit,
|
||||
Msg::ExitNow => LayoutHangAnnotation::ExitNow,
|
||||
|
@ -833,9 +831,6 @@ impl LayoutThread {
|
|||
webrender_api::ScrollClamping::ToContentBounds,
|
||||
);
|
||||
},
|
||||
Msg::ReapStyleAndLayoutData(dead_data) => unsafe {
|
||||
drop_style_and_layout_data(dead_data)
|
||||
},
|
||||
Msg::CollectReports(reports_chan) => {
|
||||
self.collect_reports(reports_chan, possibly_locked_rw_data);
|
||||
},
|
||||
|
@ -967,9 +962,6 @@ impl LayoutThread {
|
|||
response_chan.send(()).unwrap();
|
||||
loop {
|
||||
match self.port.recv().unwrap() {
|
||||
Msg::ReapStyleAndLayoutData(dead_data) => unsafe {
|
||||
drop_style_and_layout_data(dead_data)
|
||||
},
|
||||
Msg::ExitNow => {
|
||||
debug!("layout thread is exiting...");
|
||||
self.exit_now();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue