Index: runtime/observatory/lib/src/service/object.dart |
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart |
index fa01f834563552576c48b1f2bafae1f17cb4fdda..e0cd037b0e69b7a9012ec1cd141b12534bde8df3 100644 |
--- a/runtime/observatory/lib/src/service/object.dart |
+++ b/runtime/observatory/lib/src/service/object.dart |
@@ -2763,7 +2763,7 @@ class Instance extends HeapObject implements M.Instance { |
class Context extends HeapObject implements M.Context { |
@observable Context parentContext; |
@observable int length; |
- @observable var variables; |
+ @observable Iterable<ContextElement> variables; |
Context._empty(ServiceObjectOwner owner) : super._empty(owner); |
@@ -2779,7 +2779,8 @@ class Context extends HeapObject implements M.Context { |
return; |
} |
- variables = map['variables']; |
+ variables = (map['variables'] ?? const []).map((element) => |
+ new ContextElement(element)); |
// We are fully loaded. |
_loaded = true; |
@@ -2788,6 +2789,13 @@ class Context extends HeapObject implements M.Context { |
String toString() => 'Context($length)'; |
} |
+class ContextElement extends M.ContextElement { |
+ final Guarded<Instance> value; |
+ |
+ ContextElement(ServiceMap map) |
+ : value = new Guarded<Instance>(map['value']); |
+} |
+ |
M.FunctionKind stringToFunctionKind(String value) { |
switch(value) { |
case 'RegularFunction': return M.FunctionKind.regular; |