Skip to content

[EH] Add more explanation to EXPORT_EXCEPTION_HANDLING_HELPERS deprecation#26517

Merged
aheejin merged 4 commits intoemscripten-core:mainfrom
aheejin:deprecate_explain
Mar 21, 2026
Merged

[EH] Add more explanation to EXPORT_EXCEPTION_HANDLING_HELPERS deprecation#26517
aheejin merged 4 commits intoemscripten-core:mainfrom
aheejin:deprecate_explain

Conversation

@aheejin
Copy link
Member

@aheejin aheejin commented Mar 21, 2026

Like WebAssembly/binaryen#8507, there can be people who use this methods at -O1 or above. This adds more explanation of the workaround in ChangeeLog, site docs, and the deprecation message. You don't strictly need
decrementExceptionRefcount to use getExceptionMessage, but you need it if you care about asan, because exceptions thrown in Wasm and caught in JS don't get freed unless you explicitly decrement the refcount.

…ation

Like WebAssembly/binaryen#8507, there can be
people who use this methods at `-O1` or above. This adds more
explanation of the workaround in ChangeeLog, site docs, and the
deprecation message. You don't strictly need
`decrementExceptionRefcount` to use `getExceptionMessage`, but you need
it if you care about asan, because exceptions thrown in Wasm and caught
in JS don't get freed unless you explicitly decrement the refcount.
@aheejin aheejin requested a review from sbc100 March 21, 2026 21:50
@aheejin
Copy link
Member Author

aheejin commented Mar 21, 2026

Come to think of it, I'm not sure if it was really a good idea to deprecate the setting, because there may be more people who use those methods at -O1 or above. We can revert the deprecation, because it's been only a few days. WDYT @sbc100 ?

@aheejin aheejin changed the title [EH] Add more explanation to EXPORT_EXCEPTION_HANDLING_HELPERS deprec… [EH] Add more explanation to EXPORT_EXCEPTION_HANDLING_HELPERS deprecation Mar 21, 2026
@aheejin
Copy link
Member Author

aheejin commented Mar 21, 2026

Any opinions on the deprecation itself?

@aheejin aheejin merged commit 62e2265 into emscripten-core:main Mar 21, 2026
38 checks passed
@aheejin aheejin deleted the deprecate_explain branch March 21, 2026 23:39
@sbc100
Copy link
Collaborator

sbc100 commented Mar 21, 2026

I don't feel too strongly since I don't think many folks will be likely using this setting.

If just exporting getExceptionMessage instead works for folks (like it did for binaryen) then that seems pretty straight forward as a replacement.

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.

2 participants