[tools] Add file positions to map-explorer

NOTRY=true

Change-Id: I076e2f6c39674a98827e5939c9527678a5f81368
Reviewed-on: https://chromium-review.googlesource.com/c/1354882
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57931}
This commit is contained in:
Marja Hölttä 2018-11-29 11:44:15 +01:00 committed by Commit Bot
parent 270437fd7a
commit 51f75d3772
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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() {