mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Mark JSTraceable and its method as unsafe
This commit is contained in:
parent
73b6e705b4
commit
620a67ff14
16 changed files with 191 additions and 185 deletions
|
@ -105,10 +105,10 @@ impl<T: Reflectable> Deref for JS<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: Reflectable> JSTraceable for JS<T> {
|
||||
fn trace(&self, trc: *mut JSTracer) {
|
||||
unsafe impl<T: Reflectable> JSTraceable for JS<T> {
|
||||
unsafe fn trace(&self, trc: *mut JSTracer) {
|
||||
#[cfg(debug_assertions)]
|
||||
let trace_str = format!("for {} on heap", unsafe { type_name::<T>() });
|
||||
let trace_str = format!("for {} on heap", type_name::<T>());
|
||||
#[cfg(debug_assertions)]
|
||||
let trace_info = &trace_str[..];
|
||||
#[cfg(not(debug_assertions))]
|
||||
|
@ -116,7 +116,7 @@ impl<T: Reflectable> JSTraceable for JS<T> {
|
|||
|
||||
trace_reflector(trc,
|
||||
trace_info,
|
||||
unsafe { (**self.ptr).reflector() });
|
||||
(**self.ptr).reflector());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue