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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/operations.dart

Issue 2985333002: fix #30290, assertion messages that contain `yield` (Closed)
Patch Set: merge and update status Created 3 years, 5 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: 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 880d0db1adcd1316285ab24d7a8407404a9c9d44..17066d60754c0da97f28774e4fbb6dbfe98f8774 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
@@ -688,20 +688,12 @@ map(values, [K, V]) => JS('', '''(() => {
return map;
})()''');
-@JSExportName('assert')
-assert_(condition, message()) {
- if (JS('bool', '# !== true', condition)) {
- if (condition == null) _throwBooleanConversionError();
- throwAssertionError(message);
- }
-}
-
-dassert(value, message()) {
+bool dassert(value) {
if (JS('bool', '# != null && #[#] instanceof #', value, value, _runtimeType,
AbstractFunctionType)) {
value = JS('', '#(#)', dcall, value);
}
- return assert_(dtest(value), message);
+ return dtest(value);
}
/// Store a JS error for an exception. For non-primitives, we store as an

Powered by Google App Engine
This is Rietveld 408576698