diff options
author | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-04-29 13:22:48 -0500 |
---|---|---|
committer | Alan Jeffrey <ajeffrey@mozilla.com> | 2016-04-29 13:22:48 -0500 |
commit | bd09f3148e22a6c4534e8f4ba8ff0765b5de92ec (patch) | |
tree | 5abe51e402665b7d7820ef69143f007c4becea99 /components/compositing/constellation.rs | |
parent | 990dd72da7d69ffa98a5d1b266f48d14d24852aa (diff) | |
download | servo-bd09f3148e22a6c4534e8f4ba8ff0765b5de92ec.tar.gz servo-bd09f3148e22a6c4534e8f4ba8ff0765b5de92ec.zip |
Send the panic reason and backtrace in mozbrowsererror.
Diffstat (limited to 'components/compositing/constellation.rs')
-rw-r--r-- | components/compositing/constellation.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs index 531a589c6aa..1c4f6544ddc 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -873,7 +873,7 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF> let window_size = self.pipelines.get(&pipeline_id).and_then(|pipeline| pipeline.size); // Notify the browser chrome that the pipeline has failed - self.trigger_mozbrowsererror(pipeline_id); + self.trigger_mozbrowsererror(pipeline_id, reason, backtrace); self.close_pipeline(pipeline_id, ExitPipelineMode::Force); @@ -1966,8 +1966,7 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF> // https://developer.mozilla.org/en-US/docs/Web/Events/mozbrowsererror // Note that this does not require the pipeline to be an immediate child of the root - // TODO: propagate more error information, e.g. a backtrace - fn trigger_mozbrowsererror(&self, pipeline_id: PipelineId) { + fn trigger_mozbrowsererror(&self, pipeline_id: PipelineId, reason: String, backtrace: String) { if !prefs::get_pref("dom.mozbrowser.enabled").as_boolean().unwrap_or(false) { return; } if let Some(pipeline) = self.pipelines.get(&pipeline_id) { @@ -1980,7 +1979,7 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF> None => return warn!("Mozbrowsererror via closed pipeline {:?}.", ancestor_info.0), }; } - let event = MozBrowserEvent::Error(MozBrowserErrorType::Fatal, None, None); + let event = MozBrowserEvent::Error(MozBrowserErrorType::Fatal, Some(reason), Some(backtrace)); ancestor.trigger_mozbrowser_event(ancestor_info.1, event); } } |