Skip to content

Bridge: implement managed references, identity, and lifetime semantics #159

Description

@chrisbbreuer

Parent: #138
Depends on: Objective-C inventory and core behavior children

Implement cycle-safe Objective-C/JavaScript ownership rather than relying on incidental NSObject or arena lifetime.

Acceptance:

  • Implement JSManagedValue factory/init/value behavior and conditional clearing after collection.
  • Implement JSVirtualMachine addManagedReference:withOwner: and removeManagedReference:withOwner: with exact owner/object pair semantics.
  • Make wrapper caches preserve Objective-C/JavaScript identity without creating permanent retain cycles.
  • Define VM/context/thread/autorelease ownership, teardown order, cross-VM rejection, and weak/strong transitions.
  • Add forced-GC, autorelease-pool, nested graph, duplicate add/remove, owner death, context death, and long-running leak/finalization tests.
  • Add fault-injection coverage for every bridge allocation/registration rollback path.
    Child issue:
  • Bridge: add collection epochs and arena reachability for managed values #161 — collection epochs and arena reachability for conditional managed-value clearing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions