aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/refcounted.rs
diff options
context:
space:
mode:
authorKeith Yeung <kungfukeith11@gmail.com>2016-04-26 16:40:40 -0400
committerMs2ger <Ms2ger@gmail.com>2016-04-28 10:52:44 +0200
commit33acb1937cb65643fc23365998d47846c2f46478 (patch)
treeef018d11af50bea792a5abe06e6b0473a49c292d /components/script/dom/bindings/refcounted.rs
parentfbc575407d68a516a2b15a0d1c74150a9011aa9c (diff)
downloadservo-33acb1937cb65643fc23365998d47846c2f46478.tar.gz
servo-33acb1937cb65643fc23365998d47846c2f46478.zip
Remove extraneous script_chan parameter from Trusted::new
Diffstat (limited to 'components/script/dom/bindings/refcounted.rs')
-rw-r--r--components/script/dom/bindings/refcounted.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs
index c01136cc735..c5d5be9bae9 100644
--- a/components/script/dom/bindings/refcounted.rs
+++ b/components/script/dom/bindings/refcounted.rs
@@ -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();