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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_helper.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 | « sdk/lib/_internal/compiler/js_lib/core_patch.dart ('k') | sdk/lib/core/errors.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/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
index 9f1c892fd7179eeb7ce3f5879f343a56a35cebb9..ae5c853600943defef468fb654bffc37ce95a962 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -3238,6 +3238,10 @@ int random64() {
return int32a + int32b * 0x100000000;
}
+String jsonEncodeNative(String string) {
+ return JS("String", "JSON.stringify(#)", string);
+}
+
/**
* Returns a property name for placing data on JavaScript objects shared between
* DOM isolates. This happens when multiple programs are loaded in the same
« no previous file with comments | « sdk/lib/_internal/compiler/js_lib/core_patch.dart ('k') | sdk/lib/core/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698