Implement cancellable runnables.

Additionally, make image load events cancellable. Resolves #7731.
This commit is contained in:
Josh Matthews 2015-10-21 16:42:30 -04:00
parent 9fea6d2e46
commit 989e80036e
4 changed files with 62 additions and 8 deletions

View file

@ -79,6 +79,7 @@ use std::mem;
use std::ops::{Deref, DerefMut};
use std::rc::Rc;
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use std::sync::mpsc::{Receiver, Sender};
use string_cache::{Atom, Namespace};
use style::properties::PropertyDeclarationBlock;
@ -246,7 +247,7 @@ impl<A: JSTraceable, B: JSTraceable> JSTraceable for (A, B) {
}
no_jsmanaged_fields!(bool, f32, f64, String, Url);
no_jsmanaged_fields!(bool, f32, f64, String, Url, AtomicBool);
no_jsmanaged_fields!(usize, u8, u16, u32, u64);
no_jsmanaged_fields!(isize, i8, i16, i32, i64);
no_jsmanaged_fields!(Sender<T>);