Closed Bug 1544796 Opened 6 years ago Closed 6 years ago

Column number in errors from dynamically loaded scripts is wrong

Categories

(Firefox :: Untriaged, defect)

66 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: hugo.amiard, Unassigned, NeedInfo)

Details

Attachments

(1 file)

Attached file issue.html

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

Steps to reproduce:

  • Create a javascript string with a function containing errors
  • Load the script dynamically by adding a script element to the page
  • Run the function with errors from that script
  • Catch an error and inspect the column number reported in both the stack trace and the columnNumber field of the Error object
  • That number is wrong

The attached file reproduces the issue.

Actual results:

Reported column number is 5 for both tested scripts, in both stack and columNumber field of the Error object.

Expected results:

Actual column numbers reported should most probably be 11 and 20 respectively, for each tested scripts.

Hello Hugo, I managed to reproduce this issue In Firefox Release 66.0.3 using your html example, but In our latest Beta and Nightly builds I'm getting different column numbers 12 respectively 21 and I'm not sure if they are correct or not, Can you please try our latest Beta and Nightly builds you can find them here :

https://nightly.mozilla.org/

https://www.mozilla.org/ro/firefox/channel/desktop/

and retest this issue to see if its been fixed already by our developers.

Flags: needinfo?(hugo.amiard)

I think this issue has been fixed in our latest builds and since the reporter didn't respond anymore I'm inclined to think its been fixed on his side as well. If the issue still occurs in our Beta or Nightly builds please reopen this issue.

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

Attachment

General

Creator:
Created:
Updated:
Size: