mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
squash: convert less interesting debug! logs to traces
This commit is contained in:
parent
5e888b5504
commit
94f0ceb4aa
5 changed files with 31 additions and 31 deletions
|
@ -362,7 +362,7 @@ pub unsafe fn get_dom_class(obj: *mut JSObject) -> Result<&'static DOMClass, ()>
|
|||
let dom_class: *const DOMClass = GetProxyHandlerExtra(obj) as *const DOMClass;
|
||||
return Ok(&*dom_class);
|
||||
}
|
||||
debug!("not a dom object");
|
||||
trace!("not a dom object");
|
||||
Err(())
|
||||
}
|
||||
|
||||
|
@ -380,27 +380,27 @@ pub unsafe fn private_from_proto_check<F>(mut obj: *mut JSObject,
|
|||
{
|
||||
let dom_class = try!(get_dom_class(obj).or_else(|_| {
|
||||
if IsWrapper(obj) {
|
||||
debug!("found wrapper");
|
||||
trace!("found wrapper");
|
||||
obj = UnwrapObject(obj, /* stopAtWindowProxy = */ 0);
|
||||
if obj.is_null() {
|
||||
debug!("unwrapping security wrapper failed");
|
||||
trace!("unwrapping security wrapper failed");
|
||||
Err(())
|
||||
} else {
|
||||
assert!(!IsWrapper(obj));
|
||||
debug!("unwrapped successfully");
|
||||
trace!("unwrapped successfully");
|
||||
get_dom_class(obj)
|
||||
}
|
||||
} else {
|
||||
debug!("not a dom wrapper");
|
||||
trace!("not a dom wrapper");
|
||||
Err(())
|
||||
}
|
||||
}));
|
||||
|
||||
if proto_check(dom_class) {
|
||||
debug!("good prototype");
|
||||
trace!("good prototype");
|
||||
Ok(private_from_object(obj))
|
||||
} else {
|
||||
debug!("bad prototype");
|
||||
trace!("bad prototype");
|
||||
Err(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: &Heap<JSVal>)
|
|||
return;
|
||||
}
|
||||
|
||||
debug!("tracing value {}", description);
|
||||
trace!("tracing value {}", description);
|
||||
CallValueTracer(tracer,
|
||||
val.ptr.get() as *mut _,
|
||||
GCTraceKindToAscii(val.get().trace_kind()));
|
||||
|
@ -140,7 +140,7 @@ pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: &Heap<JSVal>)
|
|||
#[allow(unrooted_must_root)]
|
||||
pub fn trace_reflector(tracer: *mut JSTracer, description: &str, reflector: &Reflector) {
|
||||
unsafe {
|
||||
debug!("tracing reflector {}", description);
|
||||
trace!("tracing reflector {}", description);
|
||||
CallUnbarrieredObjectTracer(tracer,
|
||||
reflector.rootable(),
|
||||
GCTraceKindToAscii(TraceKind::Object));
|
||||
|
@ -150,7 +150,7 @@ pub fn trace_reflector(tracer: *mut JSTracer, description: &str, reflector: &Ref
|
|||
/// Trace a `JSObject`.
|
||||
pub fn trace_object(tracer: *mut JSTracer, description: &str, obj: &Heap<*mut JSObject>) {
|
||||
unsafe {
|
||||
debug!("tracing {}", description);
|
||||
trace!("tracing {}", description);
|
||||
CallObjectTracer(tracer,
|
||||
obj.ptr.get() as *mut _,
|
||||
GCTraceKindToAscii(TraceKind::Object));
|
||||
|
@ -734,7 +734,7 @@ impl<'a, T: JSTraceable> DerefMut for RootedVec<'a, T> {
|
|||
|
||||
/// SM Callback that traces the rooted traceables
|
||||
pub unsafe fn trace_traceables(tracer: *mut JSTracer) {
|
||||
debug!("tracing stack-rooted traceables");
|
||||
trace!("tracing stack-rooted traceables");
|
||||
ROOTED_TRACEABLES.with(|ref traceables| {
|
||||
let traceables = traceables.borrow();
|
||||
traceables.trace(tracer);
|
||||
|
|
|
@ -55,7 +55,7 @@ pub trait WeakReferenceable: DomObject + Sized {
|
|||
DOM_WEAK_SLOT)
|
||||
.to_private() as *mut WeakBox<Self>;
|
||||
if ptr.is_null() {
|
||||
debug!("Creating new WeakBox holder for {:p}.", self);
|
||||
trace!("Creating new WeakBox holder for {:p}.", self);
|
||||
ptr = Box::into_raw(box WeakBox {
|
||||
count: Cell::new(1),
|
||||
value: Cell::new(Some(NonZero::new(self))),
|
||||
|
@ -65,7 +65,7 @@ pub trait WeakReferenceable: DomObject + Sized {
|
|||
let box_ = &*ptr;
|
||||
assert!(box_.value.get().is_some());
|
||||
let new_count = box_.count.get() + 1;
|
||||
debug!("Incrementing WeakBox refcount for {:p} to {}.",
|
||||
trace!("Incrementing WeakBox refcount for {:p} to {}.",
|
||||
self,
|
||||
new_count);
|
||||
box_.count.set(new_count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue