diff options
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r-- | components/script_traits/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 00a60d1f3e8..eba51e6ae75 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -22,6 +22,7 @@ pub mod webdriver_msg; use bluetooth_traits::BluetoothRequest; use canvas_traits::webgl::WebGLPipeline; use crate::webdriver_msg::{LoadStatus, WebDriverScriptCommand}; +use crossbeam_channel::{Receiver, RecvTimeoutError, Sender}; use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId}; use euclid::{Length, Point2D, Rect, TypedScale, TypedSize2D, Vector2D}; use gfx_traits::Epoch; @@ -42,7 +43,6 @@ use profile_traits::mem; use profile_traits::time as profile_time; use serde::{Deserialize, Deserializer, Serialize, Serializer}; use servo_atoms::Atom; -use servo_channel::{Receiver, Sender}; use servo_url::ImmutableOrigin; use servo_url::ServoUrl; use std::collections::HashMap; @@ -828,6 +828,12 @@ pub enum PaintWorkletError { WorkletNotFound, } +impl From<RecvTimeoutError> for PaintWorkletError { + fn from(_: RecvTimeoutError) -> PaintWorkletError { + PaintWorkletError::Timeout + } +} + /// Execute paint code in the worklet thread pool. pub trait Painter: SpeculativePainter { /// <https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image> |