Introduce GlobalScope::devtools_chan

This commit is contained in:
Anthony Ramine 2016-10-01 03:44:05 +02:00
parent 14a0b8d88c
commit fe6fca9e1f
8 changed files with 33 additions and 38 deletions

View file

@ -272,7 +272,8 @@ pub fn handle_request_animation_frame(context: &BrowsingContext,
};
let doc = context.active_document();
let devtools_sender = context.active_window().devtools_chan().unwrap();
let devtools_sender =
context.active_window().upcast::<GlobalScope>().devtools_chan().unwrap().clone();
doc.request_animation_frame(box move |time| {
let msg = ScriptToDevtoolsControlMsg::FramerateTick(actor_name, time);
devtools_sender.send(msg).unwrap();