Skip to content

[ffigen] ObjCBlock.listener refcounting issues #835

Closed
@liamappelbe

Description

@liamappelbe

ObjCBlock.listener lets ObjC code invoke Dart callbacks that live in other isolates. If they pass an object arg, it's possible that it gets refcounted and destroyed before the Dart callback runs (the Dart code calls retain, but it may be too late). So while these listener callbacks let us get rid of a lot of NativePort boilerplate, they don't totally eliminate the need for native code.

These trampolines are super simple and can be automatically generated by ffigen. But automatically compiling them relies on native_assets.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions