From ad30275d04d9d814da86f985d252f2b78fccfcd0 Mon Sep 17 00:00:00 2001 From: Connor Brewster Date: Wed, 13 Jul 2016 11:10:13 -0600 Subject: Move boxing to runnable initialization --- components/script/task_source/user_interaction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/script/task_source/user_interaction.rs') diff --git a/components/script/task_source/user_interaction.rs b/components/script/task_source/user_interaction.rs index 7bd8f58b006..2f4c0923801 100644 --- a/components/script/task_source/user_interaction.rs +++ b/components/script/task_source/user_interaction.rs @@ -16,7 +16,7 @@ use task_source::TaskSource; pub struct UserInteractionTaskSource(pub Sender); impl TaskSource for UserInteractionTaskSource { - fn queue(&self, msg: T, window: &Window) -> Result<(), ()> { + fn queue(&self, msg: Box, window: &Window) -> Result<(), ()> { let msg = UserInteractionTask(window.get_runnable_wrapper().wrap_runnable(msg)); self.0.send(MainThreadScriptMsg::UserInteraction(msg)).map_err(|_| ()) } @@ -30,7 +30,7 @@ impl UserInteractionTaskSource { cancelable: EventCancelable, window: &Window) { let target = Trusted::new(target); - let runnable = EventRunnable { + let runnable = box EventRunnable { target: target, name: name, bubbles: bubbles, -- cgit v1.2.3