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

Unified Diff: sdk/lib/_internal/lib/js_helper.dart

Issue 252693003: Allow a closure to be torn off from itself via .call. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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/js_helper.dart
diff --git a/sdk/lib/_internal/lib/js_helper.dart b/sdk/lib/_internal/lib/js_helper.dart
index 9147ae536e3aae27091536c0a31b24355b6255a4..4bd23f166cfa50cecf1cc27f7b6630233c5fdd40 100644
--- a/sdk/lib/_internal/lib/js_helper.dart
+++ b/sdk/lib/_internal/lib/js_helper.dart
@@ -2261,6 +2261,13 @@ abstract class Closure implements Function {
'}');
}
+ // Note that the backend adds the below special getter to allow for tearing
+ // off a closure from itself. We do this magically in the backend, as we do
+ // not want this getter to be visisble to resolution and the generation of
karlklose 2014/04/28 07:04:23 'visisble' -> 'visible'. Please add that we comme
+ // extra stubs.
+ //
+ // Closure get call => this;
+
String toString() => "Closure";
}

Powered by Google App Engine
This is Rietveld 408576698