| Index: sky/specs/style2.md
|
| diff --git a/sky/specs/style2.md b/sky/specs/style2.md
|
| index f53498a25b0046ff35501a5bc13b869ae6f00e7c..7cf8ba22a1bc9f02dd6ff24f6eaf39351601a740 100644
|
| --- a/sky/specs/style2.md
|
| +++ b/sky/specs/style2.md
|
| @@ -58,10 +58,14 @@ import 'dart:mirrors';
|
| import 'dart:math';
|
|
|
| class WeakMap<Key, Value> {
|
| - Expando<Value> _map = new Expando<Value>();
|
| + // This is not actually a weak map right now, because Dart doesn't let us have weak references.
|
| + // We should fix that, or else we're going to keep alive every object you ever tear off through
|
| + // the StyleDeclaration API, even if you never use it again, until the StyleDeclaration object
|
| + // itself is GC'ed, which is likely when the element is GC'ed, which is likely never.
|
| + Map<Key, Value> _map = new Map<Key, Value>();
|
| operator[](Key key) => _map[key];
|
| operator[]=(Key key, Value value) => _map[key] = value;
|
| - bool containsKey(Key key) => _map[key] != null;
|
| + bool containsKey(Key key) => _map.containsKey(key);
|
| }
|
|
|
| typedef void StringSetter(Symbol propertySymbol, StyleDeclaration declaration, String value);
|
|
|