Skip to content

[EH] Don't write to readonly Exception.stack property #21065

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 2 commits into from
Jan 12, 2024

Conversation

aheejin
Copy link
Member

@aheejin aheejin commented Jan 11, 2024

Apparently WebAssembly.Exception.stack has been readonly all along and I wasn't aware. While I'm not sure if this should be readonly and this may change in the future, for now writing to this property is not spec compliant, so this removes the routine that tidies up the stack trace, which is not the end of the world.

Fixes #21044.

Apparently `WebAssembly.Exception.stack` has been `readonly` all along
and I wasn't aware. While I'm not sure if this should be `readonly` and
this may change in the future, for now writing to this property is not
spec compliant, so this removes the routine that tidies up the stack
trace, which is not the end of the world.

Fixes emscripten-core#21044.
@aheejin
Copy link
Member Author

aheejin commented Jan 11, 2024

It is hard to add a FireFox test because, as I said in #21050 (comment), because the test fails anyway (due to a thrown exception), the only way to check if FF works is to check the error message, but SpiderMonkey doesn't emit any error message even if a non-writable property is set anyway. (Also this PR removes the property-setting routine, so it's not even clear what we should check for..)

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, no test needed, I agree.

@aheejin aheejin merged commit 12b814a into emscripten-core:main Jan 12, 2024
@aheejin aheejin deleted the stack_no_write branch January 12, 2024 02:55
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.

setting getter-only property "stack"
3 participants