[webkit-dev] number of wrapped objects in JSC
ggaren at apple.com
Mon Mar 19 13:47:20 PDT 2012
> I intend to add a graph in the inspector's timeline panel that shows the number of global handles for V8. The V8 bindings use maps for WebCore objects to global handles to V8 wrapper objects. A steady increase of global handles is often a sign of a memory leak within v8 bindings.
Are you sure that all wrappers go into a map? What about wrappers for ScriptWrappable objects?
You could read the length of JSC::HandleHeap::m_weakList. Since that's an expensive operation, I'd suggest computing the length during garbage collection and then caching it.
More information about the webkit-dev