[VM/Service] Ignore offset and count for record requests

TEST=CI

Issue: https://github.com/dart-lang/sdk/issues/49724
Change-Id: I995bd7f76a39f7dc281ed25b4ec20c2efe0468d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267660
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
This commit is contained in:
Derek Xu 2022-11-03 15:22:38 +00:00 committed by Commit Queue
parent b9dfd1a651
commit e3d6f448f2

View file

@ -1669,18 +1669,15 @@ void Record::PrintJSONImpl(JSONStream* stream, bool ref) const {
if (ref) {
return;
}
intptr_t offset;
intptr_t count;
stream->ComputeOffsetAndCount(num_fields(), &offset, &count);
intptr_t limit = offset + count;
ASSERT(limit <= num_fields());
{
JSONArray jsarr(&jsobj, "fields");
String& name = String::Handle();
Object& value = Object::Handle();
const intptr_t num_fields = this->num_fields();
const intptr_t num_positional_fields = NumPositionalFields();
const Array& field_names = Array::Handle(this->field_names());
for (intptr_t index = offset; index < limit; ++index) {
for (intptr_t index = 0; index < num_fields; ++index) {
JSONObject jsfield(&jsarr);
// TODO(derekx): Remove this because BoundField isn't a response type in
// the spec.