aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/macros.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2014-09-24 03:01:03 +0530
committerManish Goregaokar <manishsmail@gmail.com>2014-09-24 05:44:49 +0530
commitcc44a3b0641d94908b2b2e01bec440f64f89f8be (patch)
treea4b70f846ee51abd5b413c6875ef1bc24449c8b9 /components/script/dom/macros.rs
parent85f79290a67afb25369a9a48ee9a389ee32fd20e (diff)
downloadservo-cc44a3b0641d94908b2b2e01bec440f64f89f8be.tar.gz
servo-cc44a3b0641d94908b2b2e01bec440f64f89f8be.zip
Use JSTraceable everywhere
Diffstat (limited to 'components/script/dom/macros.rs')
-rw-r--r--components/script/dom/macros.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs
index dba18808c65..6e52b4f763f 100644
--- a/components/script/dom/macros.rs
+++ b/components/script/dom/macros.rs
@@ -2,8 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#![macro_escape]
-
#[macro_export]
macro_rules! make_getter(
( $attr:ident ) => (
@@ -48,7 +46,7 @@ macro_rules! make_uint_getter(
/// Use #[jstraceable] on JS managed types
macro_rules! untraceable(
($($ty:ident),+) => (
- $(
+ $(
impl JSTraceable for $ty {
#[inline]
fn trace(&self, _: *mut JSTracer) {
@@ -57,4 +55,12 @@ macro_rules! untraceable(
}
)+
);
+ ($ty:ident<$($gen:ident),+>) => (
+ impl<$($gen),+> JSTraceable for $ty<$($gen),+> {
+ #[inline]
+ fn trace(&self, _: *mut JSTracer) {
+ // Do nothing
+ }
+ }
+ );
) \ No newline at end of file