File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1488,9 +1488,14 @@ impl<VatId> ConnectionState<VatId> {
1488
1488
let client: Box < Client < VatId > > = Box :: new ( import_client. into ( ) ) ;
1489
1489
let client: Box < dyn ClientHook > = client;
1490
1490
1491
- // XXX do I need something like this?
1492
- // Make sure the import is not destroyed while this promise exists.
1493
- // let promise = promise.attach(client.add_ref());
1491
+ // Here the C++ implementation does something like:
1492
+ // ```
1493
+ // // Make sure the import is not destroyed while this promise exists.
1494
+ // let promise = promise.attach(client.add_ref());
1495
+ // ```
1496
+ // However, as far as I can tell that is unnecessary, because the
1497
+ // PromiseClient holds `client` until it resolves, after which point
1498
+ // there is no reason to keep the import alive.
1494
1499
1495
1500
let client = PromiseClient :: new ( & connection_state, client, Some ( import_id) ) ;
1496
1501
You can’t perform that action at this time.
0 commit comments