diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index ca642c8a2ed..c6bfcd2519e 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -530,7 +530,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)) diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 4aa52ae7eae..b0719a029b5 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -779,6 +779,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", diff --git a/tests/wpt/mozilla/meta/mozilla/window_requestAnimationFrame2.html.ini b/tests/wpt/mozilla/meta/mozilla/window_requestAnimationFrame2.html.ini new file mode 100644 index 00000000000..6dfbd043f37 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/window_requestAnimationFrame2.html.ini @@ -0,0 +1,6 @@ +[window_requestAnimationFrame2.html] + type: testharness + expected: TIMEOUT + [Test throwing an error inside requestAnimationFrame callback] + expected: NOTRUN + diff --git a/tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html b/tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html new file mode 100644 index 00000000000..237ef108c5c --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html @@ -0,0 +1,23 @@ + + + Test throwing an error inside requestAnimationFrame callback + + + + + + +