On Mon, Feb 18, 2013 at 7:27 AM, Patrick Walton <pwal...@mozilla.com> wrote:

> On 2/17/13 3:16 AM, smaug wrote:
>
>> Curious, how does GC manage nodes? Do we explicitly trace even those
>> nodes which don't have js wrappers or do
>> we just use GC for everything in Rust?
>>
>
> All the nodes in Servo have JS wrappers at the moment, and their lifetimes
> are managed by the JS garbage collector. The JS garbage collector traces
> all nodes. The Rust garbage collector isn't really involved as far as DOM
> nodes are concerned.


It's pretty important that we handle cycles through JS and Rust in a clean
way without having to write unsafe code. Ideally we could do it without
having to write any special code. What prevents us from integrating Rust
and JS GC so it Just Works (tm)?

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

Reply via email to