From 94f0ceb4aa42c5a493523cb2f0a79d511b2b9caf Mon Sep 17 00:00:00 2001 From: Dexter Haslem Date: Wed, 18 Jan 2017 22:10:59 -0700 Subject: squash: convert less interesting debug! logs to traces --- components/script/dom/bindings/conversions.rs | 14 +++++++------- components/script/dom/bindings/trace.rs | 8 ++++---- components/script/dom/bindings/weakref.rs | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) (limited to 'components/script/dom') diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs index 577cecb2fd4..f381d9c859c 100644 --- a/components/script/dom/bindings/conversions.rs +++ b/components/script/dom/bindings/conversions.rs @@ -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(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(()) } } diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 6f211f82bef..f796c87fb4b 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -129,7 +129,7 @@ pub fn trace_jsval(tracer: *mut JSTracer, description: &str, val: &Heap) 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) #[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); diff --git a/components/script/dom/bindings/weakref.rs b/components/script/dom/bindings/weakref.rs index 234fc58260e..e6201bf3141 100644 --- a/components/script/dom/bindings/weakref.rs +++ b/components/script/dom/bindings/weakref.rs @@ -55,7 +55,7 @@ pub trait WeakReferenceable: DomObject + Sized { DOM_WEAK_SLOT) .to_private() as *mut WeakBox; 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); -- cgit v1.2.3