mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.
This commit is contained in:
parent
65d4b12bf2
commit
5f15eb5fbf
140 changed files with 1420 additions and 1222 deletions
|
@ -32,6 +32,7 @@ use libc;
|
|||
use std::cell::RefCell;
|
||||
use std::collections::hash_map::HashMap;
|
||||
use std::collections::hash_map::Entry::{Vacant, Occupied};
|
||||
use std::marker::PhantomData;
|
||||
use std::rc::Rc;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
|
@ -53,6 +54,7 @@ pub struct Trusted<T> {
|
|||
refcount: Arc<Mutex<usize>>,
|
||||
script_chan: Box<ScriptChan + Send>,
|
||||
owner_thread: *const libc::c_void,
|
||||
phantom: PhantomData<T>,
|
||||
}
|
||||
|
||||
unsafe impl<T: Reflectable> Send for Trusted<T> {}
|
||||
|
@ -71,6 +73,7 @@ impl<T: Reflectable> Trusted<T> {
|
|||
refcount: refcount,
|
||||
script_chan: script_chan.clone(),
|
||||
owner_thread: (&*live_references) as *const _ as *const libc::c_void,
|
||||
phantom: PhantomData,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -102,6 +105,7 @@ impl<T: Reflectable> Clone for Trusted<T> {
|
|||
refcount: self.refcount.clone(),
|
||||
script_chan: self.script_chan.clone(),
|
||||
owner_thread: self.owner_thread,
|
||||
phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue