Skip to content

Commit d128fea

Browse files
derekxu16Commit Queue
authored and
Commit Queue
committed
[VM/Service] Improve documentation of getInstancesAsList
This CL addresses some of the feedback in https://dart-review.googlesource.com/c/sdk/+/283380/comment/b86443cf_5d0f91bf/ TEST=CI Issue: #51497 Change-Id: I26622287df8834bbacbe3fdfb95490350cecd4bb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284724 Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Derek Xu <[email protected]>
1 parent be76c1b commit d128fea

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pkg/vm_service/lib/src/vm_service.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,9 @@ abstract class VmServiceInterface {
643643

644644
/// The `getInstancesAsList` RPC is used to retrieve a set of instances which
645645
/// are of a specific class. This RPC returns an `InstanceRef` corresponding
646-
/// to a Dart `List` that contains the requested instances. This is what
647-
/// distinguishes this RPC from `getInstances`, which returns an
646+
/// to a Dart `List<dynamic>` that contains the requested instances. This
647+
/// `List` is not growable, but it is otherwise mutable. The response type is
648+
/// what distinguishes this RPC from `getInstances`, which returns an
648649
/// `InstanceSet`.
649650
///
650651
/// The order of the instances is undefined (i.e., not related to allocation

runtime/vm/service/service.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -882,9 +882,10 @@ See [InstanceSet](#instanceset).
882882
```
883883

884884
The _getInstancesAsList_ RPC is used to retrieve a set of instances which are of
885-
a specific class. This RPC returns an `@Instance` corresponding to a Dart `List`
886-
that contains the requested instances. This is what distinguishes this RPC from
887-
`getInstances`, which returns an `InstanceSet`.
885+
a specific class. This RPC returns an `@Instance` corresponding to a Dart
886+
`List<dynamic>` that contains the requested instances. This `List` is not
887+
growable, but it is otherwise mutable. The response type is what distinguishes
888+
this RPC from `getInstances`, which returns an `InstanceSet`.
888889

889890
The order of the instances is undefined (i.e., not related to allocation order)
890891
and unstable (i.e., multiple invocations of this method against the same class

0 commit comments

Comments
 (0)