gecko-dev/servo/components/script
Yati Sagade cda0c94d8c servo: Merge #19256 - Paint worklets: Implement timeout for worklet painter threads (from yati-sagade:master); r=asajeffrey
When a paint worklet thread takes too long, we would like to move on,
since we have a ~16ms budget for rendering at 60fps. At the moment, there
is no provision in the paintworklet spec to signal such timeouts to the
developer. ajeffrey opened an [issue][1] for this, but it got punted to
v2 of the spec. Hence we are silently timing out unresponsive paint
scripts.

The timeout value is chosen to be 10ms by default, and can be overridden
by setting the SERVO_PAINT_WORKLET_TIMEOUT_MS environment variable.

In the absence of such a timeout, the reftest in this commit would fail
by timing out the testrunner itself, since the paint script never
returns. From my discussions with ajeffrey, this should do until we spec
out a way to signal timeouts to the script developer.

This fixes #17370.

[1]: https://github.com/w3c/css-houdini-drafts/issues/507

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 54f8cc37c5a7874607128e3518fd0982f7065565

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 0234a7fd5437d1c2a9c0424b9e2bb51d309a4490
2017-12-22 04:50:16 -06:00
..
docs servo: Merge #18635 - Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things (from servo:RENAME-ALL-THE-THINGS); r=emilio 2017-09-26 03:20:05 -05:00
dom servo: Merge #19256 - Paint worklets: Implement timeout for worklet painter threads (from yati-sagade:master); r=asajeffrey 2017-12-22 04:50:16 -06:00
task_source servo: Merge #18670 - added time to interactive metrics (from avadacatavra:interactive-metrics); r=jdm 2017-10-25 15:53:57 -05:00
CMakeLists.txt servo: Merge #13410 - Fix doc build by resurrecting generation of supported DOM APIs.h (from jdm:doc_fix); r=Ms2ger 2016-09-26 23:33:53 -05:00
Cargo.toml servo: Merge #19611 - Bump mozjs to 0.1.9 (from Xanewok:bump-mozjs); r=jdm 2017-12-20 12:09:20 -06:00
body.rs servo: Merge #18938 - Replace all uses of the `heapsize` crate with `malloc_size_of` (from nnethercote:bug-1409255); r=SimonSapin 2017-10-18 13:56:05 -05:00
build.rs servo: Merge #18971 - Use env::var_os to read paths from the environment (from mbrubeck:var); r=emilio 2017-10-21 08:09:22 -05:00
clipboard_provider.rs servo: Merge #17425 - cleanup embedder/compositor/constellation/script messages (from paulrouget:attach-pipeline-2); r=asajeffrey 2017-08-15 02:20:10 -05:00
devtools.rs servo: Merge #18967 - Bump bitflags to 1.0 (from Eijebong:bitflags2.0); r=mbrubeck 2017-10-30 18:25:45 -05:00
document_loader.rs servo: Merge #19569 - Add a topLevelDomComplete metric (from asajeffrey:script-perf-measure-topLevelDomComplete); r=jdm 2017-12-14 17:02:44 -06:00
fetch.rs servo: Merge #19329 - Add RAII guard for cancelling fetch when the consumer no longer cares about it (from Manishearth:fetchcanceller); r=jdm 2017-11-22 18:30:57 -06:00
layout_image.rs servo: Merge #18981 - Merge request type and destination (from KiChjang:fold-type-destination); r=avadacatavra 2017-10-24 17:02:18 -05:00
lib.rs servo: Merge #19559 - implement valid week string (from tigercosmos:t1); r=KiChjang 2017-12-17 03:50:33 -06:00
mem.rs servo: Merge #18938 - Replace all uses of the `heapsize` crate with `malloc_size_of` (from nnethercote:bug-1409255); r=SimonSapin 2017-10-18 13:56:05 -05:00
microtask.rs servo: Merge #18938 - Replace all uses of the `heapsize` crate with `malloc_size_of` (from nnethercote:bug-1409255); r=SimonSapin 2017-10-18 13:56:05 -05:00
network_listener.rs servo: Merge #18573 - Introduce TaskOnce (from servo:TASKS); r=SimonSapin 2017-09-20 05:17:12 -05:00
script_runtime.rs servo: Merge #18967 - Bump bitflags to 1.0 (from Eijebong:bitflags2.0); r=mbrubeck 2017-10-30 18:25:45 -05:00
script_thread.rs servo: Merge #19516 - Print url of recorded PWM (from ferjm:pwm.url); r=jdm 2017-12-07 14:54:03 -06:00
serviceworker_manager.rs servo: Merge #17749 - Extra space check (from SergeevPavel:extra-space-check); r=jdm 2017-07-19 16:03:51 -07:00
serviceworkerjob.rs servo: Merge #18670 - added time to interactive metrics (from avadacatavra:interactive-metrics); r=jdm 2017-10-25 15:53:57 -05:00
stylesheet_loader.rs servo: Merge #19073 - Use encoding-rs instead of rust-encoding (from servo:encoding-rs); r=SimonSapin 2017-11-01 06:37:54 -05:00
task.rs servo: Merge #18875 - Remove the need for rust-mozjs to use unstable Rust features (from servo:stable-js); r=nox,jdm 2017-10-16 17:07:50 -05:00
test.rs servo: Merge #18716 - Parse srcset attribute values (from jdm:parseSrcset); r=jdm 2017-10-04 07:32:53 -05:00
textinput.rs servo: Merge #19461 - Handle cases where selection API doesn't apply (from jonleighton:issue-19171-4); r=KiChjang 2017-12-10 18:37:58 -06:00
timers.rs servo: Merge #18938 - Replace all uses of the `heapsize` crate with `malloc_size_of` (from nnethercote:bug-1409255); r=SimonSapin 2017-10-18 13:56:05 -05:00
unpremultiplytable.rs servo: Merge #8086 - add (un)premultiply tables for canvas {Get,Put}ImageData operations (from froydnj:premultiply-tables); r=jdm 2015-10-21 17:48:49 -06:00
webdriver_handlers.rs servo: Merge #18635 - Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things (from servo:RENAME-ALL-THE-THINGS); r=emilio 2017-09-26 03:20:05 -05:00