aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-01-18 21:29:59 -0800
committerGitHub <noreply@github.com>2017-01-18 21:29:59 -0800
commitb8df502491b880cb942badee4ddbf7ec65b174fb (patch)
treeb1f686744f317933e2838db11e3f465fc86b25dd /components/script/dom
parent5e888b5504a9daad86663837ca9e996d63a48821 (diff)
parent94f0ceb4aa42c5a493523cb2f0a79d511b2b9caf (diff)
downloadservo-b8df502491b880cb942badee4ddbf7ec65b174fb.tar.gz
servo-b8df502491b880cb942badee4ddbf7ec65b174fb.zip
Auto merge of #15107 - DexterHaslem:15100-convert-debug-to-traces, r=cbrewster
convert less interesting debug! logs to traces <!-- Please describe your changes on the following line: --> converted some debug! invocations to trace! --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15100 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because only logging changed <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15107) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/conversions.rs14
-rw-r--r--components/script/dom/bindings/trace.rs8
-rw-r--r--components/script/dom/bindings/weakref.rs4
3 files changed, 13 insertions, 13 deletions
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<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(())
}
}
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<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);
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<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);