diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2014-09-24 01:15:57 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2014-09-24 02:35:40 +0530 |
commit | 85f79290a67afb25369a9a48ee9a389ee32fd20e (patch) | |
tree | 24cd0f67de641a3bf2aed8601f2504dba06d69bb /components/script/dom/macros.rs | |
parent | 3b7e07699e060887c1254228a7d8307da0ae0e14 (diff) | |
download | servo-85f79290a67afb25369a9a48ee9a389ee32fd20e.tar.gz servo-85f79290a67afb25369a9a48ee9a389ee32fd20e.zip |
Add untraceable! macro
Diffstat (limited to 'components/script/dom/macros.rs')
-rw-r--r-- | components/script/dom/macros.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs index c9d7550b7ea..dba18808c65 100644 --- a/components/script/dom/macros.rs +++ b/components/script/dom/macros.rs @@ -42,3 +42,19 @@ macro_rules! make_uint_getter( } ); ) + + +/// For use on non-jsmanaged types +/// Use #[jstraceable] on JS managed types +macro_rules! untraceable( + ($($ty:ident),+) => ( + $( + impl JSTraceable for $ty { + #[inline] + fn trace(&self, _: *mut JSTracer) { + // Do nothing + } + } + )+ + ); +)
\ No newline at end of file |