diff options
author | Josh Matthews <josh@joshmatthews.net> | 2015-01-26 11:56:46 +0000 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2015-04-16 11:46:39 -0400 |
commit | 5c7be5c9c3f593fac14b9eec85b9d697528c78f4 (patch) | |
tree | ffee8ff67f96185c474a3aeadb44702a7dba97a7 /components/script/dom/bindings/trace.rs | |
parent | 7517aac9e989dd9a9795f809a5d489b224f50868 (diff) | |
download | servo-5c7be5c9c3f593fac14b9eec85b9d697528c78f4.tar.gz servo-5c7be5c9c3f593fac14b9eec85b9d697528c78f4.zip |
Make async XMLHttpRequest requests use async network events.
Diffstat (limited to 'components/script/dom/bindings/trace.rs')
-rw-r--r-- | components/script/dom/bindings/trace.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs index 1695f16ead7..3d32abb610a 100644 --- a/components/script/dom/bindings/trace.rs +++ b/components/script/dom/bindings/trace.rs @@ -207,6 +207,16 @@ impl<T: JSTraceable> JSTraceable for Option<T> { } } +impl<T: JSTraceable, U: JSTraceable> JSTraceable for Result<T, U> { + #[inline] + fn trace(&self, trc: *mut JSTracer) { + match *self { + Ok(ref inner) => inner.trace(trc), + Err(ref inner) => inner.trace(trc), + } + } +} + impl<K,V,S> JSTraceable for HashMap<K, V, S> where K: Hash + Eq + JSTraceable, V: JSTraceable, @@ -297,6 +307,12 @@ impl JSTraceable for Box<LayoutRPC+'static> { } } +impl JSTraceable for () { + #[inline] + fn trace(&self, _trc: *mut JSTracer) { + } +} + /// Holds a set of vectors that need to be rooted pub struct RootedCollectionSet { set: Vec<HashSet<*const RootedVec<()>>> |