mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Don't try to unwrap the result of requestAnimationFrame callback
This commit is contained in:
parent
5bab439ab6
commit
b77698a649
6 changed files with 39 additions and 1 deletions
|
@ -531,7 +531,8 @@ impl<'a> WindowMethods for &'a Window {
|
|||
|
||||
let callback = move |now: f64| {
|
||||
// TODO: @jdm The spec says that any exceptions should be suppressed;
|
||||
callback.Call__(Finite::wrap(now), ExceptionHandling::Report).unwrap();
|
||||
// https://github.com/servo/servo/issues/6928
|
||||
let _ = callback.Call__(Finite::wrap(now), ExceptionHandling::Report);
|
||||
};
|
||||
|
||||
doc.r().request_animation_frame(Box::new(callback))
|
||||
|
|
|
@ -8978,3 +8978,4 @@
|
|||
|
||||
[HTMLOptionElement interface: new Option() must inherit property "index" with the proper type (7)]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -56,3 +56,4 @@
|
|||
|
||||
[CloseEvent interface: existence and properties of interface prototype object]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -773,6 +773,12 @@
|
|||
"url": "/_mozilla/mozilla/window_requestAnimationFrame.html"
|
||||
}
|
||||
],
|
||||
"mozilla/window_requestAnimationFrame2.html": [
|
||||
{
|
||||
"path": "mozilla/window_requestAnimationFrame2.html",
|
||||
"url": "/_mozilla/mozilla/window_requestAnimationFrame2.html"
|
||||
}
|
||||
],
|
||||
"mozilla/window_setInterval.html": [
|
||||
{
|
||||
"path": "mozilla/window_setInterval.html",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
[window_requestAnimationFrame2.html]
|
||||
type: testharness
|
||||
expected: TIMEOUT
|
||||
[Test throwing an error inside requestAnimationFrame callback]
|
||||
expected: NOTRUN
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Test throwing an error inside requestAnimationFrame callback</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
var stepCalled = false;
|
||||
function step() {
|
||||
if (stepCalled) {
|
||||
setTimeout(done, 0);
|
||||
} else {
|
||||
stepCalled = true;
|
||||
window.requestAnimationFrame(step);
|
||||
}
|
||||
throw new Error();
|
||||
}
|
||||
window.requestAnimationFrame(step);
|
||||
assert_equals(true, true, "rAF should not throw errors");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue