Commit 4cb3c5cb authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[tools][profiler] Fix JsonProfile script url

Use new Script.prototype.update method to set the url and the script
source.

Bug: v8:11850
Change-Id: I555d4d0158cdacb7cb42efa385371454542fc2f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2944438Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74985}
parent a6207b54
......@@ -48,8 +48,9 @@ export class SourcePosition {
}
export class Script {
name;
url;
source;
name;
// Map<line, Map<column, SourcePosition>>
lineToColumn = new Map();
_entries = [];
......@@ -1222,7 +1223,9 @@ JsonProfile.prototype.addSourcePositions = function (
};
JsonProfile.prototype.addScriptSource = function (id, url, source) {
this.scripts_[id] = new Script(id, url, source);
const script = new Script(id);
script.update(url, source);
this.scripts_[id] = script;
};
JsonProfile.prototype.deoptCode = function (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment