[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/+/2944438 Reviewed-by: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#74985}
This commit is contained in:
parent
a6207b54d0
commit
4cb3c5cb27
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user