mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Clean up ROOTED_TRACEABLES
This commit is contained in:
parent
1993b6e812
commit
62fb2074e1
1 changed files with 5 additions and 10 deletions
|
@ -82,7 +82,7 @@ use serde::{Deserialize, Serialize};
|
||||||
use servo_atoms::Atom;
|
use servo_atoms::Atom;
|
||||||
use servo_url::ServoUrl;
|
use servo_url::ServoUrl;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::cell::{Cell, UnsafeCell};
|
use std::cell::{Cell, RefCell, UnsafeCell};
|
||||||
use std::collections::{BTreeMap, HashMap, HashSet, VecDeque};
|
use std::collections::{BTreeMap, HashMap, HashSet, VecDeque};
|
||||||
use std::hash::{BuildHasher, Hash};
|
use std::hash::{BuildHasher, Hash};
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
@ -579,16 +579,11 @@ pub struct RootedTraceableSet {
|
||||||
set: Vec<TraceableInfo>,
|
set: Vec<TraceableInfo>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(missing_docs)] // FIXME
|
thread_local!(
|
||||||
mod dummy { // Attributes don’t apply through the macro.
|
|
||||||
use std::cell::RefCell;
|
|
||||||
use std::rc::Rc;
|
|
||||||
use super::RootedTraceableSet;
|
|
||||||
/// TLV Holds a set of JSTraceables that need to be rooted
|
/// TLV Holds a set of JSTraceables that need to be rooted
|
||||||
thread_local!(pub static ROOTED_TRACEABLES: Rc<RefCell<RootedTraceableSet>> =
|
static ROOTED_TRACEABLES: Rc<RefCell<RootedTraceableSet>> =
|
||||||
Rc::new(RefCell::new(RootedTraceableSet::new())));
|
Rc::new(RefCell::new(RootedTraceableSet::new()));
|
||||||
}
|
);
|
||||||
pub use self::dummy::ROOTED_TRACEABLES;
|
|
||||||
|
|
||||||
impl RootedTraceableSet {
|
impl RootedTraceableSet {
|
||||||
fn new() -> RootedTraceableSet {
|
fn new() -> RootedTraceableSet {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue