Skip to content

Compiled function token has no original name mapping in produced source map #52483

Open
@kamilogorek

Description

@kamilogorek

It appears that produced source map mappings are generated in a quite odd name. The produced function token doesn't have a valid reference to its original name, however, brackets that are part of that scope do, eg:

Foo.prototype={
abc(){...}
// ^     ^
// |     | closing brace of fn body
// | opening paren of argument list
}

Or a more concrete example:

A.Tt.prototype={
$0(){throw A.c(A.c2("Test exception"))},
$S:0}

The A.Tt.prototype.$0 scope can’t be resolved, but columns 3 (open paren), 6 (throw), 16 (the second A), and 39 (closing brace) in the second line refer to the correct name.

We worked around this in our processing pipeline here getsentry/symbolic#786 but would be great to understand how is this exactly produced, how should we interpret this, and potentially fix (if one applies) this in future releases.

I was asked to do so, thus cc: @sigmundch

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.web-dart2js

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions