Encapsulate CSS error reporter creation for stylo.

This commit is contained in:
Josh Matthews 2017-04-18 19:10:21 +10:00
parent fd6e54d9e3
commit 3773a4d499
4 changed files with 20 additions and 8 deletions

View file

@ -124,3 +124,15 @@ impl ParseErrorReporter for NullReporter {
// do nothing
}
}
/// Create an instance of the default error reporter for Servo.
#[cfg(feature = "servo")]
pub fn create_error_reporter() -> RustLogReporter {
RustLogReporter
}
/// Create an instance of the default error reporter for Stylo.
#[cfg(feature = "gecko")]
pub fn create_error_reporter() -> RustLogReporter {
RustLogReporter
}