Skip to content

Fix js-optimizer crash on empty array destructuring element #20843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 5, 2023

Followup to #20835.

Fixes: #20818

@sbc100
Copy link
Collaborator Author

sbc100 commented Dec 5, 2023

I reverted the extra asserts

@sbc100 sbc100 merged commit f813f42 into emscripten-core:main Dec 5, 2023
@sbc100 sbc100 deleted the fix_js_optimizer branch December 5, 2023 19:25
nsfisis added a commit to nsfisis/emscripten that referenced this pull request Mar 10, 2024
…ement in function parameters

It will fix a problem similar to emscripten-core#20843.

emscripten-core#20843 fixed this case:

```javascript
[, a] = x;
```

This commit will fix this case:

```javascript
function ([, a]) { }
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid assertion in acorn-optimizer
2 participants