diff options
author | Connor Brewster <connor.brewster@eagles.oc.edu> | 2016-07-13 11:10:13 -0600 |
---|---|---|
committer | Connor Brewster <connor.brewster@eagles.oc.edu> | 2016-07-13 11:10:23 -0600 |
commit | ad30275d04d9d814da86f985d252f2b78fccfcd0 (patch) | |
tree | cde94d268b32a2b5ff9f51f93c062829c5b97bd8 /components/script/task_source/user_interaction.rs | |
parent | 5f7324a9a5fbc5ecf8a348a5e9e238aacfd6f3d9 (diff) | |
download | servo-ad30275d04d9d814da86f985d252f2b78fccfcd0.tar.gz servo-ad30275d04d9d814da86f985d252f2b78fccfcd0.zip |
Move boxing to runnable initialization
Diffstat (limited to 'components/script/task_source/user_interaction.rs')
-rw-r--r-- | components/script/task_source/user_interaction.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<MainThreadScriptMsg>); impl TaskSource for UserInteractionTaskSource { - fn queue<T: Runnable + Send + 'static>(&self, msg: T, window: &Window) -> Result<(), ()> { + fn queue<T: Runnable + Send + 'static>(&self, msg: Box<T>, 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, |