Fuzzy search in source maps should find the closest mapping that is greater than or equal to

RESOLVED FIXED

Status

RESOLVED FIXED
4 years ago
4 months ago

People

(Reporter: ejpbruel, Assigned: ejpbruel)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

4 years ago
Currently, fuzzy search in source maps finds the closest mapping that is less than or equal to. According to fitzgen, this was chosen randomly over finding the closest mapping that is greater than or equal to.

The latter fits better with how we actually use source maps in practice. When setting a column breakpoint on column 0 of an indented line for instance, we expect the breakpoint to slide to the right, so we want to find the closest mapping to the right on that line. Currently, the breakpoint slides to the left, onto the previous line, which is not what we want.

I will submit the patch itself as a pull request on https://github.com/mozilla/source-map/. I've opened this bug for merging the changes back into fx-team once the patch lands there.
(Assignee)

Comment 1

3 years ago
This was already fixed and merged a long time ago ;-)
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

4 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.