Skip to content

Commit

Permalink
Remove Traceable/Untraceable from xmlhttprequest.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Oct 5, 2014
1 parent 87df84f commit 5c8a45d
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 152 deletions.
23 changes: 8 additions & 15 deletions components/script/dom/bindings/trace.rs
Expand Up @@ -45,6 +45,10 @@ use std::comm::{Receiver, Sender};
use hubbub::hubbub::QuirksMode;
use string_cache::{Atom, Namespace};
use js::rust::Cx;
use http::headers::response::HeaderCollection as ResponseHeaderCollection;
use http::headers::request::HeaderCollection as RequestHeaderCollection;
use http::method::Method;
use std::io::timer::Timer;

impl<T: Reflectable> JSTraceable for JS<T> {
fn trace(&self, trc: *mut JSTracer) {
Expand Down Expand Up @@ -227,14 +231,17 @@ untraceable!(bool, f32, f64, String, Url)
untraceable!(uint, u8, u16, u32, u64)
untraceable!(int, i8, i16, i32, i64)
untraceable!(Untraceable<T>)
untraceable!(Sender<T>)
untraceable!(Receiver<T>)
untraceable!(ImageCacheTask, ScriptControlChan)
untraceable!(Atom, Namespace)
untraceable!(Atom, Namespace, Timer)
untraceable!(PropertyDeclarationBlock)
// These three are interdependent, if you plan to put jsmanaged data
// in one of these make sure it is propagated properly to containing structs
untraceable!(SubpageId, WindowSizeData, PipelineId)
untraceable!(QuirksMode)
untraceable!(Cx)
untraceable!(ResponseHeaderCollection, RequestHeaderCollection, Method)

impl<'a> JSTraceable for &'a str {
#[inline]
Expand All @@ -243,20 +250,6 @@ impl<'a> JSTraceable for &'a str {
}
}

impl<T> JSTraceable for Sender<T> {
#[inline]
fn trace(&self, _: *mut JSTracer) {
// Do nothing
}
}

impl<T> JSTraceable for Receiver<T> {
#[inline]
fn trace(&self, _: *mut JSTracer) {
// Do nothing
}
}

impl<A,B> JSTraceable for fn(A) -> B {
#[inline]
fn trace(&self, _: *mut JSTracer) {
Expand Down

0 comments on commit 5c8a45d

Please sign in to comment.