On Mon, Feb 18, 2013 at 11:01 AM, Patrick Walton <pwal...@mozilla.com>wrote:
> This is a good point. There are two issues here: > > (1) Ensuring that layout does not retain strong references to DOM nodes > across layout requests. Since JS GC is not concurrent, we need this > invariant, as layout runs in a separate task. Currently layout places > references to DOM nodes inside RenderBoxes. These need to become true weak > references. > That doesn't sound quite right. When node has been removed from the DOM you need to explicitly destroy its RenderBoxes and update layout. So an obvious approach would be to track nodes that have been removed and list them in the next layout request so the layout task can tear down the RenderBoxes. Then layout can ack the request and the JS task can drop its references. No weak references required. (2) Ensuring that the Rust code in the script task does not retain strong > references to DOM nodes that are invisible to JS GC. One way to do that > would be to use the JS GC for the Rust GC in that task. > That sounds like it could be great! Rob -- Wrfhf pnyyrq gurz gbtrgure naq fnvq, “Lbh xabj gung gur ehyref bs gur Tragvyrf ybeq vg bire gurz, naq gurve uvtu bssvpvnyf rkrepvfr nhgubevgl bire gurz. Abg fb jvgu lbh. Vafgrnq, jubrire jnagf gb orpbzr terng nzbat lbh zhfg or lbhe freinag, naq jubrire jnagf gb or svefg zhfg or lbhe fynir — whfg nf gur Fba bs Zna qvq abg pbzr gb or freirq, ohg gb freir, naq gb tvir uvf yvsr nf n enafbz sbe znal.” [Znggurj 20:25-28] _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo