[webkit-dev] Breaking cycles in mutation observers in JSC
esprehn at chromium.org
Thu Aug 23 12:39:09 PDT 2012
I'm trying to fix the memory leaks in MutationObservers (
This is easy in V8 where I've put a hidden property on the MutationObserver
wrapper, and the V8MutationCallback object accesses this hidden property.
The MutationObserver is then an ActiveDOMObject which keeps the wrapper
alive as long as the observer has DOM nodes it's listening on, even if it's
unreachable from JS.
In the JSC side I'm not sure how to handle the cycle problem. Do I need to
use a JSC::Weak in JSMutationCallback and then use visitChildren on the
JSMutationObserver to call
In general if someone could explain visitChildren and
isReachableFromOpaqueRoots and when I want slotVistor.append or
addOpaqueRoot etc. it would be very helpful.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev