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

Unified Diff: pkg/serialization/lib/src/serialization_helpers.dart

Issue 23513010: Make HashMap constructor a factory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 7 years, 3 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 | runtime/lib/collection_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/lib/src/serialization_helpers.dart
diff --git a/pkg/serialization/lib/src/serialization_helpers.dart b/pkg/serialization/lib/src/serialization_helpers.dart
index 015215c4aede12be2b49a200b7bac7704b2fe6ca..ec898574730d0cbba7d0ad886adf306d80a6cb88 100644
--- a/pkg/serialization/lib/src/serialization_helpers.dart
+++ b/pkg/serialization/lib/src/serialization_helpers.dart
@@ -209,9 +209,11 @@ class _IdentityMapKey {
* wrapped objects. It also treats equal primitive values as identical
* to conserve space.
*/
-class IdentityMap<K, V> extends HashMap<K, V> {
+class IdentityMap<K, V> extends LinkedHashMap<K, V> {
// TODO(alanknight): Replace with a system identity-based map once
// one is available. Issue 4161.
+// TODO(lrn): Replace with identity map when custom hash maps are introduced
+// (which is soon).
// Check before wrapping because some methods may call others, e.g. on
// dart2js putIfAbsent calls containsKey, so without this we wrap forever.
« no previous file with comments | « no previous file | runtime/lib/collection_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698