* SUMMARY Programmatically mark/paint objects for heap snapshot. Great idea from Mark Lam! With Heap Snapshots, it would be very useful to programmatically mark objects. Things that could be done when marking an individual object: - easily filter the snapshot for marked objects with the tag/label/color - fine grained control over tracking the objects the developer is most interested in - could allow Inspector to save memory for things like allocation tracking if we can fallback to only tracking marked objects - easily identify objects in the snapshot and anywhere else in Inspector if they are marked - debugger watchpoints for specific objects One approach would be public properties on the object that the Inspector can use in its Heap Profile, similar to `displayName` used by JavaScript Profiles: let myView = new View(...); myView.inspectorMarker = label; Another approach would be a console paint/mark function that puts private properties on the object that the Inspector can use/access: let myView = new View(...); console.mark(myView, {label, color, otherJsonData}); Or, like we've considered for documentation, a mix of public/private using a well known Symbol. let myView = new View(...); myView[console.mark] = label; // console.mark would be a built-in Symbol("console-mark") * RELATED <https://webkit.org/b/154407> Web Inspector: We should have a way to capture heap snapshots programatically. <https://webkit.org/b/142658> Web Inspector: Show Documentation for Prototype Functions in Object Tree API view
<rdar://problem/24726885>