[Webkit-unassigned] [Bug 275145] Incorrect source location for TDZ error in modules when thrown before other statements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 5 01:58:52 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=275145

--- Comment #1 from Jarred Sumner <jarred at jarredsumner.com> ---
One way to fix it: call `emitExpressionInfo` before the `emitTDZCheckIfNecessary` call in `ResolveNode::emitBytecode`:

https://github.com/WebKit/WebKit/blob/d7759dc9cbb90b3fda92a54521c132c18cc5a0df/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp#L263
```
        JSTextPosition divot = m_start + m_ident.length();
        generator.emitExpressionInfo(divot, m_start, divot);
```

I'm guessing this is hot code though. There's probably a way to do this only when  no expression info has been emitted before

-- 
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/20240605/b8b76f2c/attachment.htm>


More information about the webkit-unassigned mailing list