From c8af5b68faa80967284fbc457643b68eece9cfa2 Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Tue, 10 Nov 2015 17:06:37 -0600 Subject: [PATCH] Made DOMString implement !Send. This change makes DOMStrings only accessible from the main JS thread. --- components/util/str.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/util/str.rs b/components/util/str.rs index 7606cde47a4..180d834a05e 100644 --- a/components/util/str.rs +++ b/components/util/str.rs @@ -26,6 +26,8 @@ use std::str::{CharIndices, FromStr, Split, from_utf8}; #[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Deserialize, Serialize, Hash, Debug)] pub struct DOMString(pub String); +impl !Send for DOMString {} + impl DOMString { pub fn new() -> DOMString { DOMString(String::new())