Column number in errors from dynamically loaded scripts is wrong
Categories
(Firefox :: Untriaged, defect)
Tracking
()
People
(Reporter: hugo.amiard, Unassigned, NeedInfo)
Details
Attachments
(1 file)
1.80 KB,
text/html
|
Details |
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.
Comment 1•6 years ago
|
||
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://www.mozilla.org/ro/firefox/channel/desktop/
and retest this issue to see if its been fixed already by our developers.
Comment 2•6 years ago
|
||
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.
Description
•