The links are external to the JS heap and reported using a special mechanism. We should have a test that would check presence of the references in JS heap snapshots.
Created attachment 185460 [details] Patch
(In reply to comment #1) > Created an attachment (id=185460) [details] > Patch This patch depends on V8 change https://code.google.com/p/v8/source/detail?r=13486 which is not rolled yet.
Created attachment 185461 [details] Patch
Comment on attachment 185460 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185460&action=review > LayoutTests/inspector-protocol/heap-snapshot-with-event-listener.html:64 > + if (!window.WebInspector) > + window.WebInspector = {}; > + InspectorTest.importScript("../../../../../Source/WebCore/inspector/front-end/HeapSnapshot.js"); > + InspectorTest.importScript("../../../../../Source/WebCore/inspector/front-end/JSHeapSnapshot.js"); > + > + InspectorTest.eventHandler["Profiler.addProfileHeader"] = function(messageObject) > + { > + var profileId = messageObject["params"]["header"]["uid"]; > + InspectorTest.sendCommand("Profiler.getHeapSnapshot", { "uid": profileId }, didGetHeapSnapshot); > + > + function didGetHeapSnapshot(messageObject) > + { > + InspectorTest.log("SUCCESS: didGetHeapSnapshot"); > + InspectorTest.completeTest(); > + } > + } > + > + var chunks = []; > + InspectorTest.eventHandler["Profiler.addHeapSnapshotChunk"] = function(messageObject) > + { > + chunks.push(messageObject["params"]["chunk"]); > + } > + InspectorTest.eventHandler["Profiler.finishHeapSnapshot"] = function(messageObject) > + { > + var serializedSnapshot = chunks.join(""); > + var parsed = JSON.parse(serializedSnapshot); > + var snapshot = new WebInspector.JSHeapSnapshot(parsed); > + > + var node; > + for (var it = snapshot._allNodes(); it.hasNext(); it.next()) { > + if (it.node.type() === "closure" && it.node.name() === "myEventListener") { > + node = it.node; > + break; > + } > + } > + if (node) > + InspectorTest.log("SUCCESS: found " + node.name()); > + else { > + InspectorTest.log("FAIL: cannot find detached DOM trees root"); > + InspectorTest.completeTest(); > + return; > + } > + please extract the common part and put it into separate helper method in the test harness. > LayoutTests/platform/efl/TestExpectations:1470 > -webkit.org/b/50485 inspector-protocol/heap-snapshot-with-detached-dom-tree.html [ Skip ] > +webkit.org/b/50485 inspector-protocol/heap-snapshot-with-event-listener.html [ Skip ] please move all the heap-snapshot tests into a subfolder.
Created attachment 185484 [details] Patch
(In reply to comment #4) > (From update of attachment 185460 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=185460&action=review > > please extract the common part and put it into separate helper method in the test harness. > Done. > > LayoutTests/platform/efl/TestExpectations:1470 > > -webkit.org/b/50485 inspector-protocol/heap-snapshot-with-detached-dom-tree.html [ Skip ] > > +webkit.org/b/50485 inspector-protocol/heap-snapshot-with-event-listener.html [ Skip ] > > please move all the heap-snapshot tests into a subfolder. Done.
Comment on attachment 185484 [details] Patch lgtm
Comment on attachment 185484 [details] Patch Attachment 185484 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/16217631 New failing tests: inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html
Committed r141396: <http://trac.webkit.org/changeset/141396>