Closed Bug 1649419 Opened 4 years ago Closed 4 years ago

Line and column numbers for certain Javascript errors are reported incorrectly

Categories

(DevTools :: Console, defect)

77 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1559253

People

(Reporter: regspam, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

  1. Create a new file "js.html" with these contents:
    <html>
    <body>
    <script>
    var a = 1;
    var c = 2;
    var d = 3;
    var re = /(reg/i;
    </script>
    </body>
    </html>
  2. Open the file in Firefox, open Web Console (Ctrl+Shift+K), make sure displaying Errors is enabled.

Actual results:

  1. One of the errors say "SyntaxError: unterminated parenthetical js.html:1:4"

Expected results:

The error should say "SyntaxError: unterminated parenthetical js.html:7:4", notice the line number.

Component: Untriaged → Console
Product: Firefox → DevTools

Sorry, I just now realized the column number is probably also reported incorrectly. Perhaps should be 11, but certainly not 4.

Summary: Line numbers for certain Javascript errors are reported incorrectly → Line and column numbers for certain Javascript errors are reported incorrectly

Duplicate of bug 1559253. ":1:4" is actually the line (1) and column (4) inside the regular expression: /(reg/i. Yes this should be fixed.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.