[tools] Fix script source position clobbering
Change-Id: Ic917bf0e6a3d5f6624f77c72cb9d16626d6508fa Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145418 Auto-Submit: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Patrick Thier <pthier@chromium.org> Reviewed-by: Patrick Thier <pthier@chromium.org> Cr-Commit-Position: refs/heads/main@{#76717}
This commit is contained in:
parent
0b28f2602e
commit
398f0314b3
@ -116,8 +116,9 @@ export class Script {
|
||||
sourcePosition = new SourcePosition(this, line, column,)
|
||||
this._addSourcePosition(line, column, sourcePosition);
|
||||
}
|
||||
if (entry.entry?.type == "Script") {
|
||||
// Mark the source position of scripts, for inline scripts which
|
||||
if (this.sourcePosition === undefined && entry.entry?.type === "Script") {
|
||||
// Mark the source position of scripts, for inline scripts which don't
|
||||
// start at line 1.
|
||||
this.sourcePosition = sourcePosition;
|
||||
}
|
||||
sourcePosition.addEntry(entry);
|
||||
|
Loading…
Reference in New Issue
Block a user