Skip to content
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

JSClosure will be overriden from other closure #218

Closed
sidepelican opened this issue Dec 19, 2022 · 1 comment · Fixed by #219
Closed

JSClosure will be overriden from other closure #218

sidepelican opened this issue Dec 19, 2022 · 1 comment · Fixed by #219

Comments

@sidepelican
Copy link

JSClosure stores its identifier and tell it to JS for bridging, but the identifiers has a trouble.
hashValue is used for the identifier, but hashValue is not guaranteed to be unique.

hostFuncRef = JavaScriptHostFuncRef(bitPattern: Int32(ObjectIdentifier(self).hashValue))

@j-f1
Copy link
Member

j-f1 commented Dec 19, 2022

Hm, good point! Looking at the relevant implementations I think that should be replaced with the UInt(bitPattern:) initializer which can take an ObjectIdentifier.

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 a pull request may close this issue.

2 participants