Skip to content

Handle edge-cases for signed values in source map VLQ decoder. - #2565

Merged
gbrail merged 1 commit into
mozilla:masterfrom
0xe:scratch/s/vlqdecoder-fixes
Nov 7, 2026
Merged

gbrail merged 1 commit into
mozilla:masterfrom
0xe:scratch/s/vlqdecoder-fixes

Conversation

@0xe

@0xe 0xe commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

From sec 6.1 VLQSignedValue of the spec: https://tc39.es/ecma426/#sec-VLQSignedValue

6.1 VLQSignedValue
...
5. If value is 0 and sign is -1, return -2**31.
6. If value is ≥ 2**31, throw an error.

Added tests in tc39/source-map-tests#45.

@gbrail

gbrail commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

Looks good, thanks!

@gbrail
gbrail merged commit 9a9be81 into mozilla:master Nov 7, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants