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

Unified Diff: sdk/lib/_internal/lib/async_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
Index: sdk/lib/_internal/lib/async_patch.dart
diff --git a/sdk/lib/_internal/lib/async_patch.dart b/sdk/lib/_internal/lib/async_patch.dart
index c67b3ff7dbe4f31a9d7cb1a385dee1558323fd53..dede2552bcd8ef04daadcd494e7869eb89f362fa 100644
--- a/sdk/lib/_internal/lib/async_patch.dart
+++ b/sdk/lib/_internal/lib/async_patch.dart
@@ -5,6 +5,7 @@
// Patch file for the dart:async library.
import 'dart:_js_helper' show
+ patch,
Primitives,
convertDartClosureToJS,
loadDeferredLibrary;
@@ -18,21 +19,25 @@ import 'dart:_isolate_helper' show
import 'dart:_foreign_helper' show JS;
-patch Timer _createTimer(Duration duration, void callback()) {
+@patch
+Timer _createTimer(Duration duration, void callback()) {
int milliseconds = duration.inMilliseconds;
if (milliseconds < 0) milliseconds = 0;
return new TimerImpl(milliseconds, callback);
}
-patch Timer _createPeriodicTimer(Duration duration,
- void callback(Timer timer)) {
+@patch
+Timer _createPeriodicTimer(Duration duration,
+ void callback(Timer timer)) {
int milliseconds = duration.inMilliseconds;
if (milliseconds < 0) milliseconds = 0;
return new TimerImpl.periodic(milliseconds, callback);
}
-patch class _AsyncRun {
- patch static void _scheduleImmediate(void callback()) {
+@patch
+class _AsyncRun {
+ @patch
+ static void _scheduleImmediate(void callback()) {
scheduleImmediateClosure(callback);
}
@@ -65,8 +70,10 @@ patch class _AsyncRun {
}
}
-patch class DeferredLibrary {
- patch Future<Null> load() {
+@patch
+class DeferredLibrary {
+ @patch
+ Future<Null> load() {
return loadDeferredLibrary(libraryName, uri);
}
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/patch_parser.dart ('k') | sdk/lib/_internal/lib/collection_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698