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

Unified Diff: runtime/lib/expando_patch.dart

Issue 1599393003: Use WeakMap to support Expando if available. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address comment Created 4 years, 11 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
« no previous file with comments | « no previous file | sdk/lib/_internal/js_runtime/lib/core_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/expando_patch.dart
diff --git a/runtime/lib/expando_patch.dart b/runtime/lib/expando_patch.dart
index 0c9427ca41c7ad1f83710b8ee453c6932f8f5c7f..df0234d4d8ab0fb01a513ea64094f20852b38e90 100644
--- a/runtime/lib/expando_patch.dart
+++ b/runtime/lib/expando_patch.dart
@@ -131,7 +131,8 @@ patch class Expando<T> {
(object is bool) ||
(object is num) ||
(object is String)) {
- throw new ArgumentError(object);
+ throw new ArgumentError.value(object,
+ "Expandos are not allowed on strings, numbers, booleans or null");
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/js_runtime/lib/core_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698