Page MenuHomePhabricator

[CommRustModule] improve params capturing
ClosedPublic

Authored by kamil on Jan 5 2024, 2:22 AM.
Tags
None
Referenced Files
F2150958: D10550.diff
Sun, Jun 30, 11:38 AM
Unknown Object (File)
Sat, Jun 29, 10:05 AM
Unknown Object (File)
Thu, Jun 27, 9:37 AM
Unknown Object (File)
Mon, Jun 24, 2:27 AM
Unknown Object (File)
Sat, Jun 22, 5:56 PM
Unknown Object (File)
May 31 2024, 4:42 PM
Unknown Object (File)
May 22 2024, 1:33 PM
Unknown Object (File)
May 20 2024, 8:31 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable