[Webkit-unassigned] [Bug 244981] New: Can't find variable but only when Inspector is closed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 9 08:10:04 PDT 2022
https://bugs.webkit.org/show_bug.cgi?id=244981
Bug ID: 244981
Summary: Can't find variable but only when Inspector is closed
Product: WebKit
Version: Safari 15
Hardware: Mac (Intel)
OS: macOS 12
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: eryk.piast at gmail.com
Created attachment 462231
--> https://bugs.webkit.org/attachment.cgi?id=462231&action=review
Video demonstrating how the error disappears after opening Inspector
The code below throws an error `ReferenceError: Can't find variable: methodFactory`.
```
(() => {
function methodFactory() {}
class BrokenClass {
classMethod = methodFactory((() => {}))
}
new BrokenClass();
})();
```
It happens only when the page loads normally, without the developer tools open. Once you open the inspector and refresh, the error disappears.
It's also impossible to reproduce the issue by pasting the code into the developer console.
The only way to see it is to load the page directly and observe the error after.
Here you can find an example, for convenience I've added an error handler so it prints out the message to HTML.
https://9wu2z2.sse.codesandbox.io
Tested on Safari 15.5 and 15.6.
--
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/20220909/2c9e889b/attachment.htm>
More information about the webkit-unassigned
mailing list