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

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: 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
Index: runtime/vm/json_stream.h
diff --git a/runtime/vm/json_stream.h b/runtime/vm/json_stream.h
index 1e843680a8e79610fcb3b556e76691058911a1e7..8316853899c50b4e5166fe63ef7c3e14be82ac97 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 PrintValueS(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 PrintPropertyS(const char* name, const String& s, intptr_t limit);
turnidge 2014/09/10 19:55:28 S -> Str?
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,8 @@ 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 AddPropertyS(const char* name, const String& s, intptr_t limit) const {
+ return stream_->PrintPropertyS(name, s, limit);
}
void AddPropertyNoEscape(const char* name, const char* s) const {
stream_->PrintPropertyNoEscape(name, s);

Powered by Google App Engine
This is Rietveld 408576698