Closed Bug 1897964 Opened 2 years ago Closed 1 year ago

Support startLine, startColumn, endLine, and endColumn query parameters in `Debugger.findScripts`

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: arai, Assigned: bthrall)

References

(Blocks 3 open bugs)

Details

Attachments

(9 files)

SourceActor._findDebuggeeScripts in DevTools performs the following:

  1. findScripts to list all scripts for given source
  2. filter out all non-outer-most scripts
  3. traverse all child scripts and find scripts that matches given line and column

this is almost what findScripts itself provides with query, except that it only supports single line.
Adding start/end line/column query parameters can replace the !forBreakpointPositions case of _findDebuggeeScripts.

See Also: → 1897966
Blocks: js-debugger
Blocks: 1874411
See Also: 1874411

It's simpler to require that 'start' and 'end' be both present than to define
what happens when only one or the other is present. Based on current DevTools
usage, this should be fine.

Assignee: nobody → bthrall
Attachment #9422943 - Attachment description: WIP: Bug 1897964 - Add 'start' and 'end' query params to findScripts() → Bug 1897964 - Add 'start' and 'end' query params to findScripts() r=ochameau,arai!
Status: NEW → ASSIGNED

In the check for the 'line' property, 'lineEnd' needs to be set to 'line'
because 'line' is implemented as 'start.line' and 'end.line' having the same
value.

To improve readability of parseQuery()

Attachment #9424417 - Attachment description: Bug 1897964 - Extract ScriptQuery::parseStartProperty() and parseEndProperty() r=ochameau,arai! → Bug 1897964 - Extract ScriptQuery::parseLineColumnObject() r=ochameau,arai!
Pushed by bthrall@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6e4673119a7b Add 'start' and 'end' query params to findScripts() r=arai https://hg.mozilla.org/integration/autoland/rev/8cc4773cf657 Add 'start.column' and 'end.column' query params to findScripts() r=arai https://hg.mozilla.org/integration/autoland/rev/004ee290b7a5 Require 'start.line' >= 'end.line' r=arai https://hg.mozilla.org/integration/autoland/rev/4c97b411c7bf Extract ScriptQuery::parseLineColumnObject() r=arai https://hg.mozilla.org/integration/autoland/rev/897f9534b4b6 Require displayUrl/url/source with start/end r=arai https://hg.mozilla.org/integration/autoland/rev/4dd56efa4143 Correct error messages for start/end case r=arai https://hg.mozilla.org/integration/autoland/rev/b0727ea04c48 Extract parsePositiveNumber() r=arai https://hg.mozilla.org/integration/autoland/rev/80e2abc3001d Document findScripts() new query parameters r=arai https://hg.mozilla.org/integration/autoland/rev/f120ce31576f Precisely check start column in findScripts() r=arai
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: