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

Unified Diff: runtime/vm/object.h

Issue 542363003: Don't double-escape in strings in the VM Service, and don't use \u0000 to determine the string lengt (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/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 6bef907ae75b4b85787590a7f2be10f3ed827d71..211d5ab050102f88ccafa616d1f5e978bed3886d 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -5573,8 +5573,10 @@ class String : public Instance {
void ToUTF8(uint8_t* utf8_array, intptr_t array_len) const;
- // Produces a quoted, escaped, (possibly) truncated string.
- const char* ToUserCString(intptr_t max_len) const;
+ const char* ToCString(intptr_t *length) const;
+ const char* ToCStringTruncated(intptr_t max_len,
+ bool* did_truncate,
+ intptr_t *length) const;
// Copies the string characters into the provided external array
// and morphs the string object into an external string object.
@@ -5720,9 +5722,6 @@ class String : public Instance {
CallbackType new_symbol,
Snapshot::Kind kind);
- intptr_t EscapedString(char* buffer, int max_len) const;
- intptr_t EscapedStringLen(intptr_t tooLong) const;
-
FINAL_HEAP_OBJECT_IMPLEMENTATION(String, Instance);
friend class Class;

Powered by Google App Engine
This is Rietveld 408576698