aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits/lib.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-11-18 14:39:57 -0500
committerGitHub <noreply@github.com>2018-11-18 14:39:57 -0500
commiteb3af18581f457a51b397aed198ce107255c3bd3 (patch)
tree127408c5b75c935552b80c7307f8086f176878ed /components/script_traits/lib.rs
parentac17f08d1972685726ef73956d91f01608127d38 (diff)
parent9a7eeb349a8aa657e063665ac92387ab8ef3ce28 (diff)
downloadservo-eb3af18581f457a51b397aed198ce107255c3bd3.tar.gz
servo-eb3af18581f457a51b397aed198ce107255c3bd3.zip
Auto merge of #22142 - Eijebong:crossbeamup, r=jdm
Update crossbeam-channel to 0.3 https://github.com/servo/ipc-channel/pull/210 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22142) <!-- Reviewable:end -->
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r--components/script_traits/lib.rs8
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>