aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorMs2ger <Ms2ger@gmail.com>2016-05-24 14:41:38 +0200
committerMs2ger <Ms2ger@gmail.com>2016-05-24 14:41:38 +0200
commita5139787deea92fab1c60c46c3abda4ef49a78e7 (patch)
tree77703ce0720a726bf894daf00cbffb4b15193b14 /components/script/script_thread.rs
parente18bf819059e4439d276b02083a60f6353aaa359 (diff)
downloadservo-a5139787deea92fab1c60c46c3abda4ef49a78e7.tar.gz
servo-a5139787deea92fab1c60c46c3abda4ef49a78e7.zip
Stop storing CSS errors on the Document.
They are never read.
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs28
1 files changed, 13 insertions, 15 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 330eebafdfe..0a4f3d6fb3b 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -1971,29 +1971,27 @@ impl ScriptThread {
fn handle_css_error_reporting(&self, pipeline_id: PipelineId, filename: String,
line: usize, column: usize, msg: String) {
+ let sender = match self.devtools_chan {
+ Some(ref sender) => sender,
+ None => return,
+ };
+
let parent_context = self.root_browsing_context();
let context = match parent_context.find(pipeline_id) {
Some(context) => context,
None => return,
};
- let document = context.active_document();
- let css_error = CSSError {
- filename: filename,
- line: line,
- column: column,
- msg: msg
- };
-
- document.report_css_error(css_error.clone());
let window = context.active_window();
-
if window.live_devtools_updates() {
- if let Some(ref chan) = self.devtools_chan {
- chan.send(ScriptToDevtoolsControlMsg::ReportCSSError(
- pipeline_id,
- css_error)).unwrap();
- }
+ let css_error = CSSError {
+ filename: filename,
+ line: line,
+ column: column,
+ msg: msg
+ };
+ let message = ScriptToDevtoolsControlMsg::ReportCSSError(pipeline_id, css_error);
+ sender.send(message).unwrap();
}
}
}