fix(browser): treat module-import initiator positions as script positions

An empty script_id also marks a script-type initiator, such as a module
import, whose url is the importing script file. Its position is a real
script position without a session-script association. The previous
wording called every empty-ID callsite parser markup with "no script
position" and excluded it from the external-script conversion. Describe
the empty ID as a missing session-script association, which only rules
out joining captured source or resource_start, and keep the
external-script conversion for script-file positions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-08 16:44:25 +00:00
co-authored by Claude Opus 5.5
parent 3c157b4ec6
commit 99d31ee24a
3 changed files with 12 additions and 12 deletions
+1 -3
View File
@@ -20,9 +20,7 @@ describe("web runtime coordinate contract", () => {
),
});
expect(location.script_id).toMatchObject({
description: expect.stringContaining(
"empty for a position taken from a request initiator",
),
description: expect.stringContaining("no session-script association"),
});
expect(location.column_number).toMatchObject({
description: expect.stringContaining("Zero-based UTF-16 column"),