Bug 258715
| Summary: | Destructuring assignment in for-in loop throws `undefined is not a function` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | YuHao Hu <yuhao.6218> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | keith_miller, mark.lam, webkit-bug-importer, ysuzuki |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
YuHao Hu
git commit id: 8cdb27dae2a958f4ad5ff00f4900a7c235835247
```
for (const a in ",,,,,,,,,,,") {
[,,,] = a;
}
```
run args:
```
WebKitBuild/Debug/bin/jsc --useConcurrentJIT=0 --jitPolicyScale=0.001 --useFTLJIT=0 test.js
```
program output:
```
Exception: TypeError: undefined is not a function (near '...[,,,]...')
global code@test.js:2:5
```
Expected behavior should not output anything.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/111897193>
YuHao Hu
this bug still exists in the current main webkit branch(e466bf21b480e413f8d9d2220dc2b2bb9feb2d92)