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

Unified Diff: frog/leg/lib/js_helper.dart

Issue 9632018: Switch-implementation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add missing handling of default in unparser. Created 8 years, 9 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: frog/leg/lib/js_helper.dart
diff --git a/frog/leg/lib/js_helper.dart b/frog/leg/lib/js_helper.dart
index b6ff89060e426cc9a57743f913920daf8c524af4..b127efe432d67d4318bc640a981f0d4a5be7e2b0 100644
--- a/frog/leg/lib/js_helper.dart
+++ b/frog/leg/lib/js_helper.dart
@@ -1377,3 +1377,15 @@ bool jsHasOwnProperty(var jsObject, String property) {
jsPropertyAccess(var jsObject, String property) {
return JS('var', @'$0[$1]', jsObject, property);
}
+
+
ahe 2012/03/13 10:17:15 Extra line.
Lasse Reichstein Nielsen 2012/03/13 12:09:38 Done.
+// Called at the end of unaborted switch cases to get the (unique)
ahe 2012/03/13 10:17:15 Documentation comment.
ahe 2012/03/13 10:17:15 Did you mean "singleton" instead of "unique"?
Lasse Reichstein Nielsen 2012/03/13 12:09:38 Done.
Lasse Reichstein Nielsen 2012/03/13 12:09:38 Singleton is fine too.
+// FallThroughError exception that will be thrown.
+FallThroughError fallThroughErrorInstance = null;
+getFallThroughError() {
+ // TODO(lrn): Redo when we support "const FallThroughError()".
ahe 2012/03/13 10:17:15 I think this is done.
Lasse Reichstein Nielsen 2012/03/13 12:09:38 Let's see if it works now.
+ if (fallThroughErrorInstance === null) {
+ fallThroughErrorInstance = new FallThroughError();
+ }
+ return fallThroughErrorInstance;
+}

Powered by Google App Engine
This is Rietveld 408576698