[VM/Service] Clarify documentation of RetainingObject

I checked if the retaining paths displayed on Observatory currently made sense, and they do. So, I think that the `getRetainingPath` responses currently being produced are correct, but they are not described well in the spec.

TEST=N/A

Change-Id: I6809ea9ea20574fd18bf5ee3d7d2c190aad62e7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/268820
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
This commit is contained in:
Derek Xu 2022-11-10 17:08:45 +00:00 committed by Commit Queue
parent 1a3215fc03
commit ba503c19af
2 changed files with 12 additions and 6 deletions

View file

@ -7120,15 +7120,18 @@ class RetainingObject {
/// An object that is part of a retaining path.
ObjRef? value;
/// The offset of the retaining object in a containing list.
/// If `value` is a List, `parentListIndex` is the index where the previous
/// object on the retaining path is located.
@optional
int? parentListIndex;
/// The key mapping to the retaining object in a containing map.
/// If `value` is a Map, `parentMapKey` is the key mapping to the previous
/// object on the retaining path.
@optional
ObjRef? parentMapKey;
/// The name of the field containing the retaining object within an object.
/// If `value` is a non-List, non-Map object, `parentField` is the name of the
/// field containing the previous object on the retaining path.
@optional
String? parentField;

View file

@ -3742,13 +3742,16 @@ class RetainingObject {
// An object that is part of a retaining path.
@Object value;
// The offset of the retaining object in a containing list.
// If `value` is a List, `parentListIndex` is the index where the previous
// object on the retaining path is located.
int parentListIndex [optional];
// The key mapping to the retaining object in a containing map.
// If `value` is a Map, `parentMapKey` is the key mapping to the previous
// object on the retaining path.
@Object parentMapKey [optional];
// The name of the field containing the retaining object within an object.
// If `value` is a non-List, non-Map object, `parentField` is the name of the
// field containing the previous object on the retaining path.
string parentField [optional];
}
```