mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
b6061f6085
Fix the biggest cause of #6462 by wrapping lots of JS->Rust transitions in catch_panic, and calling resume_panic after all Rust->JS transitions return. Known issue: * Finalizers can be called in response to any JS engine allocation that triggers a GC, so it's possible for a Rust object's Drop implementation that panics to leave an interrupted panic in TLS. This is why 30d8009 is part of this PR; the underlying problem is that there's no clear place to resume the panic after it is interrupted. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #6462 (github issue number if applicable). - [X] There are tests for these changes OR Source-Repo: https://github.com/servo/servo Source-Revision: 87d991ebd24886051ad1131bdbe3b9019cb1c4b3
17 lines
651 B
HTML
17 lines
651 B
HTML
<!-- To exercise these tests, set the `dom.testbinding.enabled` to true.
|
|
It is expected that the browser will not abort due to failed JS engine assertions. -->
|
|
|
|
<!-- Straightforward test - invoking a panic from a toplevel script execution -->
|
|
<script>
|
|
(new TestBinding()).panic();
|
|
</script>
|
|
|
|
<!-- invoking a panic from an event handler which is invoked by native code -->
|
|
<!--<iframe src="data:,hi there" onload="(new TestBinding()).panic()"></iframe>-->
|
|
|
|
<!-- invoking a panic from an event handler which is invoked by script -->
|
|
<!--<div onclick="(new TestBinding()).panic()"></div>
|
|
<script>
|
|
document.querySelector('div').click();
|
|
</script>-->
|