diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-03 07:07:40 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-03 07:07:40 +0530 |
commit | 4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5 (patch) | |
tree | 538d53a61aaefbaa33f71dacb0b7d971b4eecbf2 /components/script/script_task.rs | |
parent | db1163b1eceb5fef6463c4425e99d974a85a50a8 (diff) | |
parent | df7fb8fa326e2b061e2da8c833cc558273db5f37 (diff) | |
download | servo-4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5.tar.gz servo-4f51710ed387baa1ad0a6e4cdb0fc5eee44093d5.zip |
Auto merge of #8056 - eefriedman:trace-refcell, r=jdm
Fix the implementation of JSTraceable for RefCell.
The existing implementation could panic; make sure that doesn't
happen by requiring that the contents of a RefCell are trivially
traceable (i.e. the value don't contain any traceable objects).
I'm not sure whether the TriviallyJSTraceable trait is actually
worthwhile; maybe we should just never use RefCell in the DOM.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8056)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r-- | components/script/script_task.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs index 4939a58e086..cd4a4a09308 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -414,7 +414,7 @@ pub struct ScriptTask { mouse_over_targets: DOMRefCell<Vec<JS<Element>>>, /// List of pipelines that have been owned and closed by this script task. - closed_pipelines: RefCell<HashSet<PipelineId>>, + closed_pipelines: DOMRefCell<HashSet<PipelineId>>, scheduler_chan: Sender<TimerEventRequest>, timer_event_chan: Sender<TimerEvent>, @@ -643,7 +643,7 @@ impl ScriptTask { js_runtime: Rc::new(runtime), mouse_over_targets: DOMRefCell::new(vec!()), - closed_pipelines: RefCell::new(HashSet::new()), + closed_pipelines: DOMRefCell::new(HashSet::new()), scheduler_chan: state.scheduler_chan, timer_event_chan: timer_event_chan, |