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

Unified Diff: sdk/lib/_internal/compiler/js_lib/core_patch.dart

Issue 718053003: Reduce foot-print of Error.safeToString on strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/lib/errors_patch.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/core_patch.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/core_patch.dart b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
index 77098e1dadfa834f46d625c466c2d74e9dd9d711..2e2bab921b565e4bfb634f39b82ebd753b15016c 100644
--- a/sdk/lib/_internal/compiler/js_lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/js_lib/core_patch.dart
@@ -8,6 +8,7 @@ import 'dart:_interceptors';
import 'dart:_js_helper' show patch,
checkInt,
getRuntimeType,
+ jsonEncodeNative,
JSSyntaxRegExp,
Primitives,
stringJoinUnchecked,
@@ -141,6 +142,11 @@ class Error {
}
@patch
+ static String _stringToSafeString(String string) {
+ return jsonEncodeNative(string);
+ }
+
+ @patch
StackTrace get stackTrace => Primitives.extractStackTrace(this);
}
« no previous file with comments | « runtime/lib/errors_patch.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698