Auto merge of #23983 - paulrouget:handlePanic, r=jdm

[hololens] Handle servo panic

Depends on #23981

Fix #23937

I've used a different approach than checking the return code of every single functions.
Basically calling a C function on panic.

That means the errors are not recoverable. I think it's fine for now.

I'm open to any other better approach.

@jdm what do you think?

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23983)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-08-21 00:50:45 -04:00 committed by GitHub
commit 5f89dc87bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 136 additions and 94 deletions

2
Cargo.lock generated
View file

@ -4567,8 +4567,10 @@ dependencies = [
name = "simpleservo_capi"
version = "0.0.1"
dependencies = [
"backtrace 0.3.26 (registry+https://github.com/rust-lang/crates.io-index)",
"cbindgen 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.53 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"simpleservo 0.0.1",