Hi Zhou.

I have a question about the objects referencing between Javasciptcore
and WebCore:

    JSNode uses m_impl to reference a Node in WebCore. And when
KJS::Collector::collect() is called the function mark() of each JSNode is
invoked to keep the corresponding Node in WebCore alive in memory.

That's not quite accurate.

m_impl is reference-counted -- nothing specific needs to happen during garbage collection in order to keep m_impl alive.

The purpose of marking JSNode objects is to keep alive the JavaScript wrapper around m_impl, to preserve custom properties set through the DOM API.

Geoff
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to