From ac2b7c67002da047624c76bc56f49f783f7b9abb Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 4 Apr 2014 19:53:14 +0100 Subject: [PATCH] Fix the silencing of CSS errors in the UA stylesheet. --- src/components/style/errors.rs | 7 +++++-- 1 file 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>> Iterator 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(f: || -> T) -> T { - local_data::set(silence_errors, ()); + local_data::set(silence_errors, true); let result = f(); local_data::pop(silence_errors); result