[Webkit-unassigned] [Bug 137297] Allowing eval'ed code to be named in stack traces
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 21 08:45:41 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=137297
Sam Verschueren <sam.verschueren at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sam.verschueren at gmail.com
--- Comment #11 from Sam Verschueren <sam.verschueren at gmail.com> ---
Hey everyone! I'm a developer at StackBlitz (https://stackblitz.com) and we're doing our best to support WebContainers (https://blog.stackblitz.com/posts/introducing-webcontainers/) on all browser engines. Basically allowing you to run Node.js in the browser.
We're now running into an issue where we need the information out of a stack trace, which comes from eval'd code.
A small example looks like this
```
eval(`
function bar() {
console.log(new Error().stack);
}
bar();
//# sourceURL=foo-bar.js
`)
```
The stack trace currently logs the following
```
bar@
eval code@
eval@[native code]
module code at http://localhost:3000/foo.js:1:5
```
While it should be
```
bar at foo-bar.js:3:21
eval code at foo-bar.js:6:5
eval@[native code]
module code at http://localhost:3000/foo.js:1:5
```
In Firefox and Chrome this works perfectly fine. It would be great if this just worked in Safari as well.
--
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/20230621/739a23c6/attachment.htm>
More information about the webkit-unassigned
mailing list