Page MenuHomePhabricator

[CommRustModule] improve params capturing
ClosedPublic

Authored by kamil on Jan 5 2024, 2:22 AM.
Tags
None
Referenced Files
F5260434: D10550.diff
Sun, Apr 6, 12:54 PM
Unknown Object (File)
Wed, Apr 2, 11:14 PM
Unknown Object (File)
Mar 6 2025, 3:05 AM
Unknown Object (File)
Mar 4 2025, 3:51 PM
Unknown Object (File)
Feb 20 2025, 6:14 PM
Unknown Object (File)
Feb 20 2025, 6:14 PM
Unknown Object (File)
Feb 20 2025, 6:14 PM
Unknown Object (File)
Feb 20 2025, 6:14 PM
Subscribers

Details

Summary

Addresses https://phab.comm.dev/D10510#inline-64080.

Alternative is using std::shared_ptr, but I don't think is safe because as far as I know jsi::* objects lifetime is managed by the JavaScript runtime, is tied to the JavaScript garbage collector, not by C++ here itself, so I am afraid it could potentially lead to dangling pointers.

Depends on D10530

Test Plan

Test entire stack (it uses methods here).

Diff Detail

Repository
rCOMM Comm
Branch
publish-olm-stack-3
Lint
No Lint Coverage
Unit
No Test Coverage