aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/root.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-10-16 17:07:50 -0500
committerGitHub <noreply@github.com>2017-10-16 17:07:50 -0500
commite8a6f2862c2a6084e4f4e64ab466c89ae83cff59 (patch)
tree645db1e37eceef034743c28f9af1544a3fff6d8d /components/script/dom/bindings/root.rs
parent3209d22968046b5c3d29a37b79a655497db2050a (diff)
parent49e4540ece8641afcb6534a9c3b74e88895f5447 (diff)
downloadservo-e8a6f2862c2a6084e4f4e64ab466c89ae83cff59.tar.gz
servo-e8a6f2862c2a6084e4f4e64ab466c89ae83cff59.zip
Auto merge of #18875 - servo:stable-js, r=nox,jdm
Remove the need for rust-mozjs to use unstable Rust features <!-- 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/18875) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/root.rs')
-rw-r--r--components/script/dom/bindings/root.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs
index 5aaa806ceaf..87525900448 100644
--- a/components/script/dom/bindings/root.rs
+++ b/components/script/dom/bindings/root.rs
@@ -24,7 +24,6 @@
//! originating `DomRoot<T>`.
//!
-use core::nonzero::NonZero;
use dom::bindings::conversions::DerivedFrom;
use dom::bindings::inheritance::Castable;
use dom::bindings::reflector::{DomObject, Reflector};
@@ -35,12 +34,11 @@ use heapsize::HeapSizeOf;
use js::jsapi::{JSObject, JSTracer, Heap};
use js::rust::GCMethods;
use mitochondria::OnceCell;
+use nonzero::NonZero;
use script_layout_interface::TrustedNodeAddress;
use std::cell::{Cell, UnsafeCell};
use std::default::Default;
use std::hash::{Hash, Hasher};
-#[cfg(debug_assertions)]
-use std::intrinsics::type_name;
use std::marker::PhantomData;
use std::mem;
use std::ops::Deref;
@@ -359,11 +357,11 @@ impl<T: DomObject> Deref for Dom<T> {
unsafe impl<T: DomObject> JSTraceable for Dom<T> {
unsafe fn trace(&self, trc: *mut JSTracer) {
- #[cfg(debug_assertions)]
- let trace_str = format!("for {} on heap", type_name::<T>());
- #[cfg(debug_assertions)]
+ #[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(debug_assertions))]
+ #[cfg(not(all(feature = "unstable", debug_assertions)))]
let trace_info = "for DOM object on heap";
trace_reflector(trc,