Remove extraneous script_chan parameter from Trusted::new

This commit is contained in:
Keith Yeung 2016-04-26 16:40:40 -04:00 committed by Ms2ger
parent fbc575407d
commit 33acb1937c
15 changed files with 38 additions and 62 deletions

View file

@ -72,7 +72,8 @@ impl<T: Reflectable> Trusted<T> {
/// Create a new `Trusted<T>` instance from an existing DOM pointer. The DOM object will
/// be prevented from being GCed for the duration of the resulting `Trusted<T>` object's
/// lifetime.
pub fn new(ptr: &T, script_chan: Box<ScriptChan + Send>) -> Trusted<T> {
pub fn new(ptr: &T) -> Trusted<T> {
let script_chan = ptr.global().r().script_chan();
LIVE_REFERENCES.with(|ref r| {
let r = r.borrow();
let live_references = r.as_ref().unwrap();