Yesterday I landed support for a way to dump and inspect a GC heap snapshot. 
This work was motivated by the need to have easier ways to debug Document 
leaks, especially those involving GC.

The basic idea is that you do some steps that trigger a document leak, then get 
a heap dump. Typically this involves loading the test page, then navigating 
away, clearing caches, triggering a GC and capturing a snapshot. The snapshot 
is dumped as JSON file in /tmp; you can then drag this snapshot into the view 
which lives in Tools/GCHeapInspector, and see why objects are referencing the 
leaked document.

This is documented on 

Let me know if you have questions. Improvements to the inspector page are 


webkit-dev mailing list

Reply via email to