Skip to content

Added panic message to failures. - #10587

Merged
bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:add-failure-panic-message
Apr 14, 2016
Merged

bors-servo merged 1 commit into
servo:masterfrom
asajeffrey:add-failure-panic-message

Conversation

@asajeffrey

Copy link
Copy Markdown
Contributor

Added the panic message to failures. This is a step towards #10334, since it gives us access to the panic error message when we fire a mozbrowsererror event. The remaining steps are also to record the backtrace, and to report the failure in the event.


This change is Reviewable

@highfive

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @KiChjang: components/script_traits/script_msg.rs, components/script_traits/script_msg.rs, components/script/script_thread.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 13, 2016
@highfive

Copy link
Copy Markdown

warning Warning warning

  • These commits modify gfx, layout, and script code, but no tests are modified. Please consider adding a test!

@asajeffrey

Copy link
Copy Markdown
Contributor Author

This will need rebased after #10572 lands. r? @Manishearth

@highfive highfive assigned Manishearth and unassigned jdm Apr 13, 2016
Comment thread components/util/thread.rs
fn send_on_failure(&mut self, value: T) {
self.send(value).unwrap();
// Discard any errors to avoid double-panic
let _ = self.send(value);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warn!()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit worried about even putting a warn! here. Anything that panics in a panic handler takes the entire process down with it. If the send fails, chances are the entire constellation is shutting down.

@asajeffrey

Copy link
Copy Markdown
Contributor Author

#10572 is on hold, so I think we should move forward with this PR. @Manishearth?

@Manishearth

Copy link
Copy Markdown
Member

@bors-servo r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 8c0fa01 has been approved by Manishearth

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 14, 2016
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 8c0fa01 with merge 2b91067...

bors-servo pushed a commit that referenced this pull request Apr 14, 2016
…earth

Added panic message to failures.

Added the panic message to failures. This is a step towards #10334, since it gives us access to the panic error message when we fire a `mozbrowsererror` event. The remaining steps are also to record the backtrace, and to report the failure in the event.

<!-- 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/10587)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel, mac-dev-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 8c0fa01 into servo:master Apr 14, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 14, 2016
@asajeffrey
asajeffrey deleted the add-failure-panic-message branch April 14, 2016 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants