Skip to content

[wasm] JSObject parameters of callback from JS to managed are not released and stay inFlight #56303

@pavelsavara

Description

@pavelsavara

In my PR #54453 I introduced reference counter for objects InFlight across the JS/managed boundary.
The method extract_mono_obj increases the inflight refcount and it is decreased on managed side for return values.
But we do not decrease refcount for JSObjects passed as parameters to callbacks.

Example scenario is OnMessage callback of WebSocket. It passes Event object, which is marshaled as JSObject.
Since the callback delegate is pointing directly to the user code, we currently don't have platform place which could decrease the inflight ref count.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions