Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library('js_helper'); | 5 #library('js_helper'); |
| 6 | 6 |
| 7 #import('coreimpl.dart'); | 7 #import('coreimpl.dart'); |
| 8 | 8 |
| 9 #source('constant_map.dart'); | 9 #source('constant_map.dart'); |
| 10 #source('date_helper.dart'); | 10 #source('date_helper.dart'); |
| (...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1370 String toString() => stack != null ? stack : ''; | 1370 String toString() => stack != null ? stack : ''; |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 bool jsHasOwnProperty(var jsObject, String property) { | 1373 bool jsHasOwnProperty(var jsObject, String property) { |
| 1374 return JS('bool', @'$0.hasOwnProperty($1)', jsObject, property); | 1374 return JS('bool', @'$0.hasOwnProperty($1)', jsObject, property); |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 jsPropertyAccess(var jsObject, String property) { | 1377 jsPropertyAccess(var jsObject, String property) { |
| 1378 return JS('var', @'$0[$1]', jsObject, property); | 1378 return JS('var', @'$0[$1]', jsObject, property); |
| 1379 } | 1379 } |
| 1380 | |
| 1381 | |
|
ahe
2012/03/13 10:17:15
Extra line.
Lasse Reichstein Nielsen
2012/03/13 12:09:38
Done.
| |
| 1382 // 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.
| |
| 1383 // FallThroughError exception that will be thrown. | |
| 1384 FallThroughError fallThroughErrorInstance = null; | |
| 1385 getFallThroughError() { | |
| 1386 // 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.
| |
| 1387 if (fallThroughErrorInstance === null) { | |
| 1388 fallThroughErrorInstance = new FallThroughError(); | |
| 1389 } | |
| 1390 return fallThroughErrorInstance; | |
| 1391 } | |
| OLD | NEW |