aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/workletglobalscope.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-13 10:09:43 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-13 14:27:42 +0200
commit7f9f95b7ce7e7407b7b6b291a6ad452f48c2374b (patch)
tree3d9da16042ce97a6f7f94e0e9a018d84d26f62f6 /components/script/dom/workletglobalscope.rs
parentfe29037e89afa72c06e116b33477db8787c7330e (diff)
downloadservo-7f9f95b7ce7e7407b7b6b291a6ad452f48c2374b.tar.gz
servo-7f9f95b7ce7e7407b7b6b291a6ad452f48c2374b.zip
Store microtask queues in Rc<T>
Diffstat (limited to 'components/script/dom/workletglobalscope.rs')
-rw-r--r--components/script/dom/workletglobalscope.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/workletglobalscope.rs b/components/script/dom/workletglobalscope.rs
index c01989d746c..28c8cc27e7a 100644
--- a/components/script/dom/workletglobalscope.rs
+++ b/components/script/dom/workletglobalscope.rs
@@ -36,6 +36,7 @@ use script_traits::TimerSchedulerMsg;
use servo_url::ImmutableOrigin;
use servo_url::MutableOrigin;
use servo_url::ServoUrl;
+use std::rc::Rc;
use std::sync::Arc;
use std::sync::mpsc::Sender;
@@ -46,8 +47,9 @@ pub struct WorkletGlobalScope {
globalscope: GlobalScope,
/// The base URL for this worklet.
base_url: ServoUrl,
- /// The microtask queue for this worklet
- microtask_queue: MicrotaskQueue,
+ /// https://html.spec.whatwg.org/multipage/#microtask-queue
+ #[ignore_heap_size_of = "Rc<T> is hard"]
+ microtask_queue: Rc<MicrotaskQueue>,
/// Sender back to the script thread
#[ignore_heap_size_of = "channels are hard"]
to_script_thread_sender: Sender<MainThreadScriptMsg>,