Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: runtime/vm/json_stream.h

Issue 1653183002: getObject now supports specifying offset,count for strings. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/tests/service/get_object_rpc_test.dart ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 95d2041a8d79e01ae70f6f8d96b3dada8832c547..245ab3036b6df4160f1e2640a9fed61e59133cb4 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -159,7 +159,7 @@ class JSONStream : ValueObject {
void PrintValue(Metric* metric);
void PrintValue(MessageQueue* queue);
void PrintValue(Isolate* isolate, bool ref = true);
- bool PrintValueStr(const String& s, intptr_t limit);
+ bool PrintValueStr(const String& s, intptr_t offset, intptr_t count);
void PrintValue(TimelineEvent* timeline_event);
void PrintValueVM(bool ref = true);
@@ -174,7 +174,8 @@ class JSONStream : ValueObject {
const uint8_t* bytes,
intptr_t length);
void PrintProperty(const char* name, const char* s);
- bool PrintPropertyStr(const char* name, const String& s, intptr_t limit);
+ bool PrintPropertyStr(const char* name, const String& s,
+ intptr_t offset, intptr_t count);
void PrintPropertyNoEscape(const char* name, const char* s);
void PrintfProperty(const char* name, const char* format, ...)
PRINTF_ATTRIBUTE(3, 4);
@@ -191,7 +192,7 @@ class JSONStream : ValueObject {
void PrintCommaIfNeeded();
bool NeedComma();
- bool AddDartString(const String& s, intptr_t limit);
+ bool AddDartString(const String& s, intptr_t offset, intptr_t count);
void AddEscapedUTF8String(const char* s);
void AddEscapedUTF8String(const char* s, intptr_t len);
@@ -276,8 +277,9 @@ class JSONObject : public ValueObject {
}
bool AddPropertyStr(const char* name,
const String& s,
- intptr_t limit = -1) const {
- return stream_->PrintPropertyStr(name, s, limit);
+ intptr_t offset = 0,
+ intptr_t count = -1) const {
+ return stream_->PrintPropertyStr(name, s, offset, count);
}
void AddPropertyNoEscape(const char* name, const char* s) const {
stream_->PrintPropertyNoEscape(name, s);
« no previous file with comments | « runtime/observatory/tests/service/get_object_rpc_test.dart ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698