Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bdd8ad2d8ad91441e12753da6dbb79c487de1b15
https://github.com/WebKit/WebKit/commit/bdd8ad2d8ad91441e12753da6dbb79c487de1b15
Author: Ahmad Saleem <[email protected]>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
A
LayoutTests/inspector/heap/collection-diff-across-node-layouts-expected.txt
A LayoutTests/inspector/heap/collection-diff-across-node-layouts.html
M Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js
Log Message:
-----------
[Web Inspector] Heap snapshot collection diff strides previous snapshot by
wrong node field count
https://bugs.webkit.org/show_bug.cgi?id=319347
rdar://182161230
Reviewed by Devin Rousso.
HeapSnapshot.updateDeadNodesAndGatherCollectionData() walked
previousSnapshot._nodes but strided by this._nodeFieldCount, the current
snapshot's field count. _nodeFieldCount is per-instance (4 for an
"Inspector" snapshot, 7 for a "GCDebugging" one), so when the two
snapshots had different layouts the loop read node identifiers from
misaligned offsets and produced a garbage collected-nodes set.
Stride the previous snapshot's node list by its own field count instead.
Test: inspector/heap/collection-diff-across-node-layouts.html
* LayoutTests/inspector/heap/collection-diff-across-node-layouts-expected.txt:
Added.
* LayoutTests/inspector/heap/collection-diff-across-node-layouts.html: Added.
* Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
(HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
Canonical link: https://commits.webkit.org/317156@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications