Chromium Code Reviews| Index: runtime/vm/object.h |
| =================================================================== |
| --- runtime/vm/object.h (revision 30973) |
| +++ runtime/vm/object.h (working copy) |
| @@ -3962,6 +3962,10 @@ |
| // error object if evaluating the expression fails. |
| RawObject* Evaluate(const String& expr) const; |
| + // Returns this a string representation of this instance in a form |
| + // that is suitable for an end user. |
| + virtual const char* ToUserCString() const; |
|
hausner
2013/12/09 16:53:38
DBC: should ToUserCString() take a maxLen paramete
turnidge
2013/12/09 19:44:14
Done, and I've added a test for this case.
|
| + |
| static intptr_t InstanceSize() { |
| return RoundedAllocationSize(sizeof(RawInstance)); |
| } |
| @@ -4894,6 +4898,9 @@ |
| void* peer, |
| Dart_PeerFinalizer cback) const; |
| + // Produces a quoted, escaped, (possibly) truncated string. |
| + const char* ToUserCString() const; |
| + |
| // Creates a new String object from a C string that is assumed to contain |
| // UTF-8 encoded characters and '\0' is considered a termination character. |
| // TODO(7123) - Rename this to FromCString(....). |
| @@ -5018,6 +5025,9 @@ |
| CallbackType new_symbol, |
| Snapshot::Kind kind); |
| + intptr_t EscapedString(char* buffer, int maxLen) const; |
| + intptr_t EscapedStringLen(intptr_t tooLong) const; |
| + |
| FINAL_HEAP_OBJECT_IMPLEMENTATION(String, Instance); |
| friend class Class; |