Skip to content

module: port source map sorting logic from chromium

Rodrigo Muino Tomonari requested to merge github/fork/bcoe/sort-source-maps into master

Digging in to the delta between V8's source map library, and chromium's the most significant difference that jumped out at me was that we were failing to sort generated columns. Since negative offsets are not restricted in the spec, this can lead to bugs.

fixes: #31286 (closed)


Reading through the Chromium source map implementation, this was the most significant logic that jumped out at me as missing. Given the number of additional dependencies Chromium's implementation has, I think we'd do better to fix this bug, and stick with the source map class we have.

@jridgewell does this logic look correct to you, I used your tests as a starting point.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading