On 07/12/2013 02:33 PM, Patrick Walton wrote:
* What is the plan to handle cycles between the DOM and JS?

The JavaScript garbage collector handles all DOM objects, so the JS
garbage collector will trace all DOM-JS cycles and clean them up.

What does this mean precisely? Are we going to need to add trace hooks to every DOM object, ensuring that we trace the JS wrappers of any other DOM objects that are owned? Off the top of my head that sounds like it should catch all possible cycles, but someone like Kyle Huey can probably confirm.

* What's the status of allocating DOM objects on the JS heap and/or
using the JS GC for the DOM task?

The DOM task doesn't use `@` pointers very much, but where it does,
they're in the Rust heap and can't have strong references to DOM nodes
(other than the root of the document).

When you say "very much", I get worried. All codegen'ed DOM code uses @ pointers, and I don't understand what you mean by "can't have strong references to DOM nodes"; consider events we eventually want to dispatch that are targeted at DOM nodes and have properties by which this target can be retrieved.

_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to