mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
auto merge of #5389 : Manishearth/servo/trace_raw, r=jdm
This commit is contained in:
commit
5dd43bf84c
1 changed files with 20 additions and 0 deletions
|
@ -137,6 +137,26 @@ impl<T: JSTraceable> JSTraceable for Box<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: JSTraceable> JSTraceable for *const T {
|
||||
fn trace(&self, trc: *mut JSTracer) {
|
||||
if !self.is_null() {
|
||||
unsafe {
|
||||
(**self).trace(trc)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: JSTraceable> JSTraceable for *mut T {
|
||||
fn trace(&self, trc: *mut JSTracer) {
|
||||
if !self.is_null() {
|
||||
unsafe {
|
||||
(**self).trace(trc)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: JSTraceable+Copy> JSTraceable for Cell<T> {
|
||||
fn trace(&self, trc: *mut JSTracer) {
|
||||
self.get().trace(trc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue