aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/reporter.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/reporter.rs')
-rw-r--r--components/script/reporter.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/components/script/reporter.rs b/components/script/reporter.rs
index 16958201103..1ad6ee9987e 100644
--- a/components/script/reporter.rs
+++ b/components/script/reporter.rs
@@ -4,10 +4,13 @@
use cssparser::{Parser, SourcePosition};
use log;
-use style_traits::ParseErrorReporter;
+use msg::ParseErrorReporter;
+use msg::constellation_msg::PipelineId;
#[derive(JSTraceable, HeapSizeOf)]
-pub struct CSSErrorReporter;
+pub struct CSSErrorReporter {
+ pub pipelineid: PipelineId,
+}
impl ParseErrorReporter for CSSErrorReporter {
fn report_error(&self, input: &mut Parser, position: SourcePosition, message: &str) {
@@ -19,7 +22,10 @@ impl ParseErrorReporter for CSSErrorReporter {
}
fn clone(&self) -> Box<ParseErrorReporter + Send + Sync> {
- let error_reporter = box CSSErrorReporter;
+ let error_reporter = box CSSErrorReporter { pipelineid: self.pipelineid, } ;
return error_reporter;
}
+ fn pipeline(&self) -> PipelineId {
+ return self.pipelineid;
+ }
}