aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Zbarsky <dzbarsky@gmail.com>2015-07-31 16:27:35 -0400
committerDavid Zbarsky <dzbarsky@gmail.com>2015-08-20 13:27:11 -0400
commitb77698a649984d870cdbe638e381cc89c68f530f (patch)
treeddd00bffe589ba3c601db3c561467f75ca18832c
parent5bab439ab6c58a5b78a6c2f69d6e93ad80da560f (diff)
downloadservo-b77698a649984d870cdbe638e381cc89c68f530f.tar.gz
servo-b77698a649984d870cdbe638e381cc89c68f530f.zip
Don't try to unwrap the result of requestAnimationFrame callback
-rw-r--r--components/script/dom/window.rs3
-rw-r--r--tests/wpt/metadata/html/dom/interfaces.html.ini1
-rw-r--r--tests/wpt/metadata/websockets/interfaces.html.ini1
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json6
-rw-r--r--tests/wpt/mozilla/meta/mozilla/window_requestAnimationFrame2.html.ini6
-rw-r--r--tests/wpt/mozilla/tests/mozilla/window_requestAnimationFrame2.html23
6 files changed, 39 insertions, 1 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index ae9a0500c9e..bfac8638c90 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -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))
diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini
index 6ea3142c9f4..1514bbfb9e2 100644
--- a/tests/wpt/metadata/html/dom/interfaces.html.ini
+++ b/tests/wpt/metadata/html/dom/interfaces.html.ini
@@ -8978,3 +8978,4 @@
[HTMLOptionElement interface: new Option() must inherit property "index" with the proper type (7)]
expected: FAIL
+
diff --git a/tests/wpt/metadata/websockets/interfaces.html.ini b/tests/wpt/metadata/websockets/interfaces.html.ini
index 1b501d09ec2..2082bc52dff 100644
--- a/tests/wpt/metadata/websockets/interfaces.html.ini
+++ b/tests/wpt/metadata/websockets/interfaces.html.ini
@@ -56,3 +56,4 @@
[CloseEvent interface: existence and properties of interface prototype object]
expected: FAIL
+
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 9308a6c527a..3fc164eea30 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -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",
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 @@
+<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>