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: sdk/lib/_internal/lib/convert_patch.dart

Issue 338103004: Use metadata for patching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « sdk/lib/_internal/lib/collection_patch.dart ('k') | sdk/lib/_internal/lib/core_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/convert_patch.dart
diff --git a/sdk/lib/_internal/lib/convert_patch.dart b/sdk/lib/_internal/lib/convert_patch.dart
index 997db6306f1f0d4ddec806a9164f5cc7ff3b3265..3fe44df3310836447752685827915eda098f7aae 100644
--- a/sdk/lib/_internal/lib/convert_patch.dart
+++ b/sdk/lib/_internal/lib/convert_patch.dart
@@ -4,6 +4,7 @@
// Patch file for dart:convert library.
+import 'dart:_js_helper' show patch;
import 'dart:_foreign_helper' show JS;
import 'dart:_interceptors' show JSExtendableArray;
@@ -23,7 +24,8 @@ import 'dart:_interceptors' show JSExtendableArray;
*
* Throws [FormatException] if the input is not valid JSON text.
*/
-patch _parseJson(String source, reviver(key, value)) {
+@patch
+_parseJson(String source, reviver(key, value)) {
if (source is! String) throw new ArgumentError(source);
var parsed;
@@ -93,7 +95,9 @@ _convertJsonToDart(json, reviver(key, value)) {
return revive(null, walk(json));
}
-patch class _Utf8Encoder {
+@patch
+class _Utf8Encoder {
// Use Uint8List when supported on all platforms.
- patch static List<int> _createBuffer(int size) => new List<int>(size);
+ @patch
+ static List<int> _createBuffer(int size) => new List<int>(size);
}
« no previous file with comments | « sdk/lib/_internal/lib/collection_patch.dart ('k') | sdk/lib/_internal/lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698