Skip to content

Fix identityHashCode in Wasm - #2913

Merged
Oleksandr Karpovich (eymar) merged 1 commit into
JetBrains:jb-mainfrom
ApoloApps:fixIdentityHasCodeWasm
Mar 25, 2026
Merged

Fix identityHashCode in Wasm#2913
Oleksandr Karpovich (eymar) merged 1 commit into
JetBrains:jb-mainfrom
ApoloApps:fixIdentityHasCodeWasm

Conversation

@ApoloApps

@ApoloApps Apolo (ApoloApps) commented Mar 24, 2026

Copy link
Copy Markdown

Fixes issue where WeakMap.get() was returning 0 instead of null when the value for the specified key was not found. In Js target this works correctly but not for Wasm for some reason. This is applying these changes that where made in the Wasm source set in upstream Compose Runtime
It should fix some recompositions for stable types since the indentity is now working correctly if cached. Maybe there are more obscure bugs that are affected by this that should be fixed

Release Notes

Fixes - Web

  • Fix identity hash code not being correctly cached
…even though it should return null. Js target correctly returns null and so '?:' correctly triggers
@ApoloApps

Copy link
Copy Markdown
Author
@eymar

Copy link
Copy Markdown
Member

Thanks!

@eymar
Oleksandr Karpovich (eymar) merged commit 8feb278 into JetBrains:jb-main Mar 25, 2026
24 of 26 checks passed
@ApoloApps
Apolo (ApoloApps) deleted the fixIdentityHasCodeWasm branch March 25, 2026 17:14
Zahari Zahariev (harryzz) pushed a commit to harryzz/compose-multiplatform-core that referenced this pull request Jul 28, 2026
Fixes issue where WeakMap.get() was returning 0 instead of null when the
value for the specified key was not found. In Js target this works
correctly but not for Wasm for some reason. This is applying these
[changes that where made in the Wasm source set in upstream Compose
Runtime](https://android-review.googlesource.com/c/platform/frameworks/support/+/3987016)
It should fix some recompositions for stable types since the indentity
is now working correctly if cached. Maybe there are more obscure bugs
that are affected by this that should be fixed

## Release Notes
### Fixes - Web
- Fixes identity hash code not being correctly cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants