Skip to content

source_maps: check bounds earlier. - #2483

Open
davidmorgan wants to merge 1 commit into
dart-lang:mainfrom
davidmorgan:source-maps-bounds
Open

source_maps: check bounds earlier.#2483
davidmorgan wants to merge 1 commit into
dart-lang:mainfrom
davidmorgan:source-maps-bounds

Conversation

@davidmorgan

@davidmorgan davidmorgan commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fail earlier if a source map is invalid.

Prepare to release.

@davidmorgan
davidmorgan requested a review from a team as a code owner July 31, 2026 17:14
@davidmorgan
davidmorgan marked this pull request as draft July 31, 2026 17:15

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds validation to prevent negative source URL and source name IDs during source map parsing in pkgs/source_maps/lib/parser.dart, throwing a StateError if they are out of bounds. It also adds corresponding unit tests in pkgs/source_maps/test/parser_test.dart to verify this behavior. There are no review comments, and I have no additional feedback to provide.

@davidmorgan
davidmorgan marked this pull request as ready for review July 31, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants