diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-12-06 10:17:42 -1000 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-12-06 13:15:09 -1000 |
commit | e8c9c12b6ef39e66173bd5c5f4b88e7e22b97edb (patch) | |
tree | 68005aae4f39fbf04183c3a54f4d2dd1443a1464 /components/script/devtools.rs | |
parent | 58919f17a628e7fcf2d3217ae7f84ba8a866b534 (diff) | |
download | servo-e8c9c12b6ef39e66173bd5c5f4b88e7e22b97edb.tar.gz servo-e8c9c12b6ef39e66173bd5c5f4b88e7e22b97edb.zip |
Remove usage of FnBox for animation frame callbacks (fixes #14416)
Diffstat (limited to 'components/script/devtools.rs')
-rw-r--r-- | components/script/devtools.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/components/script/devtools.rs b/components/script/devtools.rs index 9e6a0f1e528..1b1ef4596d6 100644 --- a/components/script/devtools.rs +++ b/components/script/devtools.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use devtools_traits::{AutoMargins, CONSOLE_API, CachedConsoleMessage, CachedConsoleMessageTypes}; -use devtools_traits::{ComputedNodeLayout, ConsoleAPI, PageError, ScriptToDevtoolsControlMsg}; +use devtools_traits::{ComputedNodeLayout, ConsoleAPI, PageError}; use devtools_traits::{EvaluateJSReply, Modification, NodeInfo, PAGE_ERROR, TimelineMarker}; use devtools_traits::TimelineMarkerType; use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::CSSStyleDeclarationMethods; @@ -17,6 +17,7 @@ use dom::bindings::inheritance::Castable; use dom::bindings::js::Root; use dom::bindings::reflector::Reflectable; use dom::bindings::str::DOMString; +use dom::document::AnimationFrameCallback; use dom::element::Element; use dom::globalscope::GlobalScope; use dom::node::{Node, window_from_node}; @@ -253,11 +254,7 @@ pub fn handle_request_animation_frame(documents: &Documents, id: PipelineId, actor_name: String) { if let Some(doc) = documents.find_document(id) { - let devtools_sender = doc.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(); - }); + doc.request_animation_frame(AnimationFrameCallback::DevtoolsFramerateTick { actor_name }); } } |