Move DOMRefCell to style.

This commit is contained in:
Simon Sapin 2016-08-30 17:23:21 +02:00
parent ec723057b2
commit c87180a2fb
5 changed files with 16 additions and 17 deletions

View file

@ -88,6 +88,7 @@ use std::sync::mpsc::{Receiver, Sender};
use std::time::SystemTime;
use string_cache::{Atom, Namespace, QualName};
use style::attr::{AttrIdentifier, AttrValue, LengthOrPercentageOrAuto};
use style::domrefcell::DOMRefCell;
use style::element_state::*;
use style::properties::PropertyDeclarationBlock;
use style::selector_impl::{PseudoElement, ElementSnapshot};
@ -172,6 +173,13 @@ impl<T: JSTraceable> JSTraceable for UnsafeCell<T> {
}
}
impl<T: JSTraceable> JSTraceable for DOMRefCell<T> {
fn trace(&self, trc: *mut JSTracer) {
unsafe {
(*self).borrow_for_gc_trace().trace(trc)
}
}
}
impl JSTraceable for Heap<*mut JSObject> {
fn trace(&self, trc: *mut JSTracer) {