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

Unified Diff: runtime/vm/json_stream.h

Issue 558853004: Preserve the contents of Dart strings with unmatched surrogate halfs by avoiding a UTF16 -> UTF8 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: sync and build Created 6 years, 3 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/tests/vm/vm.status ('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 1e843680a8e79610fcb3b556e76691058911a1e7..8b4fc1e842e0753c9c845fc00a8c78652c826d73 100644
--- a/runtime/vm/json_stream.h
+++ b/runtime/vm/json_stream.h
@@ -93,13 +93,14 @@ class JSONStream : ValueObject {
void PrintValue(const DebuggerEvent* event);
void PrintValue(Metric* metric);
void PrintValue(Isolate* isolate, bool ref = true);
+ bool PrintValueStr(const String& s, intptr_t limit);
void PrintPropertyBool(const char* name, bool b);
void PrintProperty(const char* name, intptr_t i);
void PrintProperty64(const char* name, int64_t i);
void PrintProperty(const char* name, double d);
void PrintProperty(const char* name, const char* s);
- void PrintProperty(const char* name, const char* s, intptr_t len);
+ bool PrintPropertyStr(const char* name, const String& s, intptr_t limit);
void PrintPropertyNoEscape(const char* name, const char* s);
void PrintfProperty(const char* name, const char* format, ...)
PRINTF_ATTRIBUTE(3, 4);
@@ -113,6 +114,7 @@ class JSONStream : ValueObject {
void PrintCommaIfNeeded();
bool NeedComma();
+ bool AddDartString(const String& s, intptr_t limit);
void AddEscapedUTF8String(const char* s);
void AddEscapedUTF8String(const char* s, intptr_t len);
@@ -163,8 +165,10 @@ class JSONObject : public ValueObject {
void AddProperty(const char* name, const char* s) const {
stream_->PrintProperty(name, s);
}
- void AddProperty(const char* name, const char* s, intptr_t len) const {
- stream_->PrintProperty(name, s, len);
+ bool AddPropertyStr(const char* name,
+ const String& s,
+ intptr_t limit = -1) const {
+ return stream_->PrintPropertyStr(name, s, limit);
}
void AddPropertyNoEscape(const char* name, const char* s) const {
stream_->PrintPropertyNoEscape(name, s);
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/json_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698