Index: runtime/vm/service.cc |
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc |
index b2205cf48ddb80c0cb4e50e6a013315580e0e8c0..9761106e8cc48e540ccf602b6347e5fa7b59242f 100644 |
--- a/runtime/vm/service.cc |
+++ b/runtime/vm/service.cc |
@@ -2830,6 +2830,8 @@ static bool RespondWithMalformedObject(Isolate* isolate, |
static const MethodParameter* get_object_params[] = { |
ISOLATE_PARAMETER, |
+ new UIntParameter("offset", false), |
+ new UIntParameter("count", false), |
NULL, |
}; |
@@ -2840,6 +2842,22 @@ static bool GetObject(Isolate* isolate, JSONStream* js) { |
PrintMissingParamError(js, "objectId"); |
return true; |
} |
+ if (js->HasParam("offset")) { |
+ intptr_t value = UIntParameter::Parse(js->LookupParam("offset")); |
+ if (value < 0) { |
+ PrintInvalidParamError(js, "offset"); |
+ return true; |
+ } |
+ js->set_offset(value); |
+ } |
+ if (js->HasParam("count")) { |
+ intptr_t value = UIntParameter::Parse(js->LookupParam("count")); |
+ if (value < 1) { |
Cutch
2015/10/14 17:58:09
Consider allowing queries of the container with a
turnidge
2015/10/14 18:02:42
Done.
|
+ PrintInvalidParamError(js, "count"); |
+ return true; |
+ } |
+ js->set_count(value); |
+ } |
// Handle heap objects. |
ObjectIdRing::LookupResult lookup_result; |