Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid unwinding into C stack frames #11803

Merged
merged 3 commits into from Jun 22, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Add a manual test for panicking while JS stack frames exist.

  • Loading branch information
jdm committed Jun 22, 2016
commit fbf6c7fc2bcabc69c16e0006c0c37e27e505d64d
@@ -580,6 +580,8 @@ impl TestBindingMethods for TestBinding {
ptr::write_volatile(p, 0xbaadc0de);
}
}

fn Panic(&self) { panic!("explicit panic from script") }
}

impl TestBinding {
@@ -455,6 +455,8 @@ interface TestBinding {
static void funcControlledStaticMethodEnabled();
[Func="TestBinding::condition_satisfied"]
const unsigned short funcControlledConstEnabled = 0;

void panic();
};

partial interface TestBinding {
@@ -0,0 +1,16 @@
<!-- 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>-->
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.