mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Extract panic-catching for JS engine callbacks into a separate function All of our generated code for script contains inline code like this: ``` let result = panic::catch_unwind(AssertUnwindSafe(|| { ... }; match result { Ok(result) => result, Err(error) => { store_panic_result(error); return false; } } ``` This PR change it to something like this: ``` wrap_panic(|| { ... }, false) ``` --- - [X] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [X] These changes fix #13377 - [ ] There are tests for these changes <!-- 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/13406) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
codegen | ||
callback.rs | ||
constant.rs | ||
conversions.rs | ||
error.rs | ||
global.rs | ||
guard.rs | ||
inheritance.rs | ||
interface.rs | ||
iterable.rs | ||
js.rs | ||
mod.rs | ||
mozmap.rs | ||
namespace.rs | ||
num.rs | ||
proxyhandler.rs | ||
refcounted.rs | ||
reflector.rs | ||
str.rs | ||
structuredclone.rs | ||
trace.rs | ||
utils.rs | ||
weakref.rs | ||
xmlname.rs |