aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2014-04-04 19:53:14 +0100
committerSimon Sapin <simon.sapin@exyr.org>2014-04-04 19:53:14 +0100
commitac2b7c67002da047624c76bc56f49f783f7b9abb (patch)
tree8763d1689308fbf287460a6528f01bb714ca887d /src
parent7ece5f92dbd82bae1ef4862497c8f1bc810c6c55 (diff)
downloadservo-ac2b7c67002da047624c76bc56f49f783f7b9abb.tar.gz
servo-ac2b7c67002da047624c76bc56f49f783f7b9abb.zip
Fix the silencing of CSS errors in the UA stylesheet.
Diffstat (limited to 'src')
-rw-r--r--src/components/style/errors.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/style/errors.rs b/src/components/style/errors.rs
index f62520065a0..d07b7e84e5f 100644
--- a/src/components/style/errors.rs
+++ b/src/components/style/errors.rs
@@ -22,7 +22,10 @@ impl<T, I: Iterator<Result<T, SyntaxError>>> Iterator<T> for ErrorLoggerIterator
}
-local_data_key!(silence_errors: ())
+// FIXME: go back to `()` instead of `bool` after upgrading Rust
+// past 898669c4e203ae91e2048fb6c0f8591c867bccc6
+// Using bool is a work-around for https://github.com/mozilla/rust/issues/13322
+local_data_key!(silence_errors: bool)
pub fn log_css_error(location: SourceLocation, message: &str) {
// TODO eventually this will got into a "web console" or something.
@@ -33,7 +36,7 @@ pub fn log_css_error(location: SourceLocation, message: &str) {
pub fn with_errors_silenced<T>(f: || -> T) -> T {
- local_data::set(silence_errors, ());
+ local_data::set(silence_errors, true);
let result = f();
local_data::pop(silence_errors);
result