Chromium Code Reviews| Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| index 835ead6f55a006461877ef6cb31680a4c128fc5c..c7a5d0d963c5ae8844b203e4e63d1d3d67a4ec7b 100644 |
| --- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| +++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart |
| @@ -701,11 +701,9 @@ map(values, [K, V]) => JS( |
| })()'''); |
| @JSExportName('assert') |
| -assert_(condition, [message]) => JS( |
| - '', |
| - '''(() => { |
| - if (!$condition) $throwAssertionError(message); |
| -})()'''); |
| +assert_(condition, message) { |
| + if (JS('bool', '!#', condition)) throwAssertionError(message); |
|
vsm
2017/07/07 12:38:47
If the static type of condition is `dynamic`, we w
|
| +} |
| /// Store a JS error for an exception. For non-primitives, we store as an |
| /// expando. For primitive, we use a side cache. To limit memory leakage, we |