[Webkit-unassigned] [Bug 239491] New: Wrong column number in window.onerror handler in code with template literals
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 19 04:31:19 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=239491
Bug ID: 239491
Summary: Wrong column number in window.onerror handler in code
with template literals
Product: WebKit
Version: Safari Technology Preview
Hardware: All
OS: All
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: michal64128 at gmail.com
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220419/7a57fcb4/attachment-0001.htm>
More information about the webkit-unassigned
mailing list