Make async XMLHttpRequest requests use async network events.

This commit is contained in:
Josh Matthews 2015-01-26 11:56:46 +00:00
parent 7517aac9e9
commit 5c7be5c9c3
4 changed files with 283 additions and 13 deletions

View file

@ -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<()>>>