TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

JavaScript: Servo’s only garbage collector

304 pointsby brsonover 10 years ago

6 comments

aboodmanover 10 years ago
This is similarly motivated, and a similar approach to Oilpan in Chromium (<a href="http://www.chromium.org/blink/blink-gc" rel="nofollow">http:&#x2F;&#x2F;www.chromium.org&#x2F;blink&#x2F;blink-gc</a>).<p>But because Oilpan is written in C++, there is still some manual annotation of GC&#x27;d members that needs to be done.
评论 #8229085 未加载
mercurialover 10 years ago
Awesome writeup. It&#x27;s really interesting to see how some classes of errors can disappear entirely with the right technology.
评论 #8232567 未加载
habermanover 10 years ago
Does this suggest that &quot;Encodable&quot; isn&#x27;t the right name for this trait, if it&#x27;s being used for something that has nothing to do with encoding?<p>Visitable?
评论 #8229261 未加载
评论 #8229266 未加载
评论 #8229216 未加载
userbinatorover 10 years ago
The interaction between native code and JS on the DOM is certainly an area of complexity and plenty of chance for subtle bugs in a browser implementation - I wonder if the observation that native code can only manipulate the DOM in a limited fashion compared to JS could be used to simplify things.<p>For example, the initial DOM tree will be created (by native code) when loading the document, and it needs to be freed as a whole when another (or the same) page is loaded. On the other hand, JS can create&#x2F;add&#x2F;remove objects on it, but they must not be freed if some parts of the tree still reference them. This suggests to me that some sort of ownership scheme is appropriate, and in the case of Servo they&#x27;ve decided to make the GC own everything - which certainly makes a lot of things easy - but it might be interesting to think of whether being able to transfer object ownership between GC and something else would have any advantages, e.g. &quot;all objects in the DOM tree of the document are owned by their parent, and objects not in the DOM tree because they&#x27;ve either been removed from it or newly created by JS are owned by the GC.&quot;
评论 #8231858 未加载
stonemetalover 10 years ago
Is there any plan to write a javascript engine in Rust as part of the servo project?
评论 #8233380 未加载
getsetgowebover 10 years ago
Easy to use
评论 #8230602 未加载