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

Unified Diff: pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart

Issue 2542723003: Sprinkle some types on the SDK like the static typing fairy. (Closed)
Patch Set: Created 4 years 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: pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
index dfc883a382de4498aad513b79d8869732722b04e..b49a23b6a350f6ac28ef00b24d178c7bc369066c 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
@@ -16,6 +16,9 @@ import 'dart:_isolate_helper' show
import 'dart:_foreign_helper' show JS;
+typedef void _Callback();
+typedef void _TakeCallback(_Callback callback);
+
@patch
class _AsyncRun {
@patch
@@ -24,10 +27,10 @@ class _AsyncRun {
}
// Lazily initialized.
- static final Function _scheduleImmediateClosure =
+ static final _TakeCallback _scheduleImmediateClosure =
_initializeScheduleImmediate();
- static Function _initializeScheduleImmediate() {
+ static _TakeCallback _initializeScheduleImmediate() {
// TODO(rnystrom): Not needed by dev_compiler.
// requiresPreamble();
if (JS('', 'self.scheduleImmediate') != null) {
@@ -38,7 +41,7 @@ class _AsyncRun {
// Use mutationObservers.
var div = JS('', 'self.document.createElement("div")');
var span = JS('', 'self.document.createElement("span")');
- var storedCallback;
+ _Callback storedCallback;
internalCallback(_) {
leaveJsAsync();

Powered by Google App Engine
This is Rietveld 408576698