From 51f75d3772f7fbf9a07d3454a11030cabda7a2fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marja=20H=C3=B6ltt=C3=A4?= Date: Thu, 29 Nov 2018 11:44:15 +0100 Subject: [PATCH] [tools] Add file positions to map-explorer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NOTRY=true Change-Id: I076e2f6c39674a98827e5939c9527678a5f81368 Reviewed-on: https://chromium-review.googlesource.com/c/1354882 Commit-Queue: Marja Hölttä Reviewed-by: Camillo Bruni Cr-Commit-Position: refs/heads/master@{#57931} --- tools/map-processor.html | 1 + tools/map-processor.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/map-processor.html b/tools/map-processor.html index f52d3801ba..ec0ae53ecd 100644 --- a/tools/map-processor.html +++ b/tools/map-processor.html @@ -665,6 +665,7 @@ class View { let details = ""; if (this.map) { details += "ID: " + this.map.id; + details += "\nSource location: " + this.map.filePosition; details += "\n" + this.map.description; } $("mapDetails").innerText = details; diff --git a/tools/map-processor.js b/tools/map-processor.js index ad9aae4534..7e8572af8c 100644 --- a/tools/map-processor.js +++ b/tools/map-processor.js @@ -151,7 +151,7 @@ class MapProcessor extends LogReader { from = this.getExistingMap(from, time); to = this.getExistingMap(to, time); let edge = new Edge(type, name, reason, time, from, to); - edge.filePosition = this.formatPC(pc, line, column); + to.filePosition = this.formatPC(pc, line, column); edge.finishSetup(); } @@ -209,6 +209,7 @@ class V8Map { V8Map.set(id, this); this.leftId = 0; this.rightId = 0; + this.filePosition = ""; } finalize(id) { @@ -319,7 +320,6 @@ class Edge { this.time = time; this.from = from; this.to = to; - this.filePosition = ""; } finishSetup() {