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

Unified Diff: sdk/lib/_internal/js_runtime/lib/convert_patch.dart

Issue 2906443002: Reapply convert fixes for dart2js (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/convert_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
index e88ac32b3ad3c482dfb165a0170045684b280384..2b8a38e876d156ceabc00935afadefa2f43bda6c 100644
--- a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
@@ -181,7 +181,7 @@ class _JsonMap implements Map<String, dynamic> {
}
}
- void addAll(Map other) {
+ void addAll(Map<String, dynamic> other) {
other.forEach((key, value) {
this[key] = value;
});
@@ -230,7 +230,7 @@ class _JsonMap implements Map<String, dynamic> {
}
}
- void forEach(void f(key, value)) {
+ void forEach(void f(String key, value)) {
if (_isUpgraded) return _upgradedMap.forEach(f);
List<String> keys = _computeKeys();
for (int i = 0; i < keys.length; i++) {
@@ -263,7 +263,7 @@ class _JsonMap implements Map<String, dynamic> {
bool get _isUpgraded => _processed == null;
- Map get _upgradedMap {
+ Map<String, dynamic> get _upgradedMap {
assert(_isUpgraded);
// 'cast' the union type to LinkedHashMap. It would be even better if we
// could 'cast' to the implementation type, since LinkedHashMap includes
@@ -285,7 +285,7 @@ class _JsonMap implements Map<String, dynamic> {
// Copy all the (key, value) pairs to a freshly allocated
// linked hash map thus preserving the ordering.
- Map result = <String, dynamic>{};
+ var result = <String, dynamic>{};
List<String> keys = _computeKeys();
for (int i = 0; i < keys.length; i++) {
String key = keys[i];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698