aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-05-17 16:20:42 -0500
committerGitHub <noreply@github.com>2017-05-17 16:20:42 -0500
commitac99a48aeaa184d3acdb39d249636a140c4b7393 (patch)
treef339b7786ad7bb5d89012c4cb9217581d9993d64 /components/script/dom/window.rs
parentbafaae75f47c169078132e761ed2dcfda9541a27 (diff)
parentaf8436c9be4c69c07265ab1095f89982b48cdd00 (diff)
downloadservo-ac99a48aeaa184d3acdb39d249636a140c4b7393.tar.gz
servo-ac99a48aeaa184d3acdb39d249636a140c4b7393.zip
Auto merge of #16814 - asajeffrey:script-worklets, r=jdm
Implement Houdini worklets <!-- Please describe your changes on the following line: --> This PR implements the current draft Houdini Worklets specification (https://drafts.css-houdini.org/worklets/). The implementation is intended to provide a responsive environment for worklet execution, and in particular to ensure that the primary worklet executor does not garbage collect, and does not block loading module code. The implementation does this by providing a thread pool, and performing GC and module loading in a backup thread, not in the primary thread. --- <!-- 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 #16206 - [x] There are tests for these changes <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16814) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 65d1a591adc..097f136e29c 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -49,6 +49,7 @@ use dom::screen::Screen;
use dom::storage::Storage;
use dom::testrunner::TestRunner;
use dom::windowproxy::WindowProxy;
+use dom::worklet::Worklet;
use dom_struct::dom_struct;
use euclid::{Point2D, Rect, Size2D};
use fetch;
@@ -273,6 +274,9 @@ pub struct Window {
/// Directory to store unminified scripts for this window if unminify-js
/// opt is enabled.
unminified_js_dir: DOMRefCell<Option<String>>,
+
+ /// Worklets
+ test_worklet: MutNullableJS<Worklet>,
}
impl Window {
@@ -1830,6 +1834,7 @@ impl Window {
permission_state_invocation_results: DOMRefCell::new(HashMap::new()),
pending_layout_images: DOMRefCell::new(HashMap::new()),
unminified_js_dir: DOMRefCell::new(None),
+ test_worklet: Default::default(),
};
unsafe {