Make debug logging for tracing JS objects more informative.

This commit is contained in:
Josh Matthews 2016-05-10 12:12:10 -04:00
parent 835f443865
commit 293d465c59
6 changed files with 22 additions and 5 deletions

View file

@ -171,14 +171,14 @@ impl JSTraceable for Heap<*mut JSObject> {
if self.get().is_null() {
return;
}
trace_object(trc, "object", self);
trace_object(trc, "heap object", self);
}
}
impl JSTraceable for Heap<JSVal> {
fn trace(&self, trc: *mut JSTracer) {
trace_jsval(trc, "val", self);
trace_jsval(trc, "heap value", self);
}
}
@ -552,6 +552,7 @@ impl<A: JSTraceable + Reflectable> FromIterator<Root<A>> for RootedVec<JS<A>> {
/// SM Callback that traces the rooted traceables
pub unsafe fn trace_traceables(tracer: *mut JSTracer) {
debug!("tracing stack-rooted traceables");
ROOTED_TRACEABLES.with(|ref traceables| {
let traceables = traceables.borrow();
traceables.trace(tracer);