diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-30 07:30:38 -0700 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-04-30 07:30:38 -0700 |
commit | d9dc6dd03cf9b8b0982b54d83dd0cdded059c3b6 (patch) | |
tree | 0d424c1c0b33fa1ddaa9a2746c9e097359aadb99 | |
parent | ca291927ed7d2a2e5107d9edb8289b74e267f0cf (diff) | |
parent | bd09f3148e22a6c4534e8f4ba8ff0765b5de92ec (diff) | |
download | servo-d9dc6dd03cf9b8b0982b54d83dd0cdded059c3b6.tar.gz servo-d9dc6dd03cf9b8b0982b54d83dd0cdded059c3b6.zip |
Auto merge of #10931 - asajeffrey:send-panic-backtrace-to-mozbrowser, r=jdm
Send the panic reason and backtrace in mozbrowsererror.
Closes #10334. Glues together PRs #10837 and #10824.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10931)
<!-- Reviewable:end -->
-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 0606aa14ffd..6e09fc4b15d 100644 --- a/components/compositing/constellation.rs +++ b/components/compositing/constellation.rs @@ -874,7 +874,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); @@ -1967,8 +1967,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) { @@ -1981,7 +1980,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); } } |