Closed Bug 1864783 Opened 10 months ago Closed 10 months ago

Use 1-based column number in custom formatter

Categories

(DevTools :: Debugger, task)

task

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1862693

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(2 obsolete files)

nsIScriptError has been using a mix of 0-based and 1-based column number.

Custom formatter had been using 0-based column number for nsIScriptError.

https://searchfox.org/mozilla-central/rev/90dce6b0223b4dc17bb10f1125b44f70951585f9/devtools/server/actors/utils/custom-formatters.js#355,358,360-365

function logCustomFormatterError(window, errorMsg, script) {
...
  const { url, source, startLine, startColumn } = script ?? {};
...
  scriptError.initWithWindowID(
    `Custom formatter failed: ${errorMsg}`,
    url,
    source,
    startLine,
    startColumn,

bug 1862693 changes the Debugger API to use 1-based column number, while keeping the consumer to use 0-based.
bug 1864168 patches are going to modify other nsIScriptError consumers to use 1-based column number,
so it would be nice to align with it.

The Bugbug bot thinks this bug should belong to the 'DevTools::Debugger' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Debugger

Comment on attachment 9364281 [details]
Bug 1864783 - Use 1-based column number in tracer and DevToolsStartup command line handling. r?ochameau!

Revision D193981 was moved to bug 1865005. Setting attachment 9364281 [details] to obsolete.

Attachment #9364281 - Attachment is obsolete: true
Attachment #9364280 - Attachment is obsolete: true

Given this doesn't block bug 1862693 change, the patch will be folded into bug 1862693 patch.

Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Duplicate of bug: 1862693
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: