mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Make TaskSource::queue take a &GlobalScope
This commit is contained in:
parent
514819f37a
commit
44ca9f3d71
9 changed files with 25 additions and 27 deletions
|
@ -8,7 +8,7 @@ pub mod history_traversal;
|
|||
pub mod networking;
|
||||
pub mod user_interaction;
|
||||
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::globalscope::GlobalScope;
|
||||
use script_thread::{Runnable, RunnableWrapper};
|
||||
use std::result::Result;
|
||||
|
||||
|
@ -18,7 +18,7 @@ pub trait TaskSource {
|
|||
wrapper: &RunnableWrapper)
|
||||
-> Result<(), ()>
|
||||
where T: Runnable + Send + 'static;
|
||||
fn queue<T: Runnable + Send + 'static>(&self, msg: Box<T>, global: GlobalRef) -> Result<(), ()> {
|
||||
self.queue_with_wrapper(msg, &global.as_global_scope().get_runnable_wrapper())
|
||||
fn queue<T: Runnable + Send + 'static>(&self, msg: Box<T>, global: &GlobalScope) -> Result<(), ()> {
|
||||
self.queue_with_wrapper(msg, &global.get_runnable_wrapper())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue