aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/root.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-07-02 23:55:44 -0400
committerGitHub <noreply@github.com>2019-07-02 23:55:44 -0400
commit50033878a6d687a54ee5b3d1631cca2bcc32e508 (patch)
tree85ca839949d0c48cec32a486ca041fe7e6931b54 /components/script/dom/bindings/root.rs
parenta7ff87f0e97447fbe347fe0d188fad524c80ffa8 (diff)
parent6609b098d6f12e6ccaeb83783778efa80fd20271 (diff)
downloadservo-50033878a6d687a54ee5b3d1631cca2bcc32e508.tar.gz
servo-50033878a6d687a54ee5b3d1631cca2bcc32e508.zip
Auto merge of #23676 - servo:check, r=Manishearth
Share more `./mach build` logic with mach check, doc, test-unit Fixes #23659 <!-- 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/23676) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/root.rs')
-rw-r--r--components/script/dom/bindings/root.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs
index 228015b1275..c87c83a2469 100644
--- a/components/script/dom/bindings/root.rs
+++ b/components/script/dom/bindings/root.rs
@@ -330,13 +330,13 @@ impl<T: DomObject> Deref for Dom<T> {
unsafe impl<T: DomObject> JSTraceable for Dom<T> {
unsafe fn trace(&self, trc: *mut JSTracer) {
- #[cfg(all(feature = "unstable", debug_assertions))]
- let trace_str = format!("for {} on heap", ::std::intrinsics::type_name::<T>());
- #[cfg(all(feature = "unstable", debug_assertions))]
- let trace_info = &trace_str[..];
- #[cfg(not(all(feature = "unstable", debug_assertions)))]
- let trace_info = "for DOM object on heap";
-
+ let trace_string;
+ let trace_info = if cfg!(debug_assertions) {
+ trace_string = format!("for {} on heap", ::std::intrinsics::type_name::<T>());
+ &trace_string[..]
+ } else {
+ "for DOM object on heap"
+ };
trace_reflector(trc, trace_info, (*self.ptr.as_ptr()).reflector());
}
}