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

Unified Diff: dart/lib/compiler/implementation/lib/core_patch.dart

Issue 10943027: Handle backslashes and newlines when escaping strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | dart/lib/core/errors.dart » ('j') | dart/lib/core/errors.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/lib/core_patch.dart
diff --git a/dart/lib/compiler/implementation/lib/core_patch.dart b/dart/lib/compiler/implementation/lib/core_patch.dart
index eeabd1c3c27df7e4cde6766b5e0102871c515ec8..72f4ddff434a871ab787207276244abe0b1cacd3 100644
--- a/dart/lib/compiler/implementation/lib/core_patch.dart
+++ b/dart/lib/compiler/implementation/lib/core_patch.dart
@@ -72,14 +72,7 @@ patch class double {
}
patch class NoSuchMethodError {
- patch static String safeToString(Object object) {
- if (object is int || object is double || object is bool || null == object) {
- return object.toString();
- }
- if (object is String) {
- String escaped = object.replaceAll('"', '\\"');
- return '"$escaped"';
- }
+ patch static String _objectToString(Object object) {
return Primitives.objectToString(object);
}
}
« no previous file with comments | « no previous file | dart/lib/core/errors.dart » ('j') | dart/lib/core/errors.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698