RESOLVED DUPLICATE of bug 235607 Bug 239491
Wrong column number in window.onerror handler in code with template literals
https://bugs.webkit.org/show_bug.cgi?id=239491
Summary Wrong column number in window.onerror handler in code with template literals
Michal Polko
Reported 2022-04-19 04:31:19 PDT
Suppose we have the following JavaScript: const a = ` query test { field1 field2 field3 } `;const b = f(); If there is an error during call to f() function, Safari reports correct row number (line 7), but the column number is wrong (column 100 does not exist on line 7) - it seems that line breaks inside the template literal are ignored when calculating the column number. Chrome and Firefox both correctly reports the error happened on column 13. This issue breaks displaying stacktraces in Sentry if the source code contains template literals with line breaks. Link to reproduction: https://benevolent-hotteok-d24077.netlify.app/ Reproduced in latest Safari Technology Preview (143) and also in Safari 14.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-04-26 04:32:13 PDT
Yusuke Suzuki
Comment 2 2022-04-26 12:40:21 PDT
Thanks for your report! It is fixed in bug 235607, which is not included in STP yet. *** This bug has been marked as a duplicate of bug 235607 ***
Note You need to log in before you can comment on or make changes to this bug.