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

Unified Diff: runtime/observatory/lib/src/service/object.dart

Issue 2270013002: Converted Observatory context-view element (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed access to instance function Created 4 years, 4 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 | « runtime/observatory/lib/src/repositories/context.dart ('k') | runtime/observatory/observatory_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « runtime/observatory/lib/src/repositories/context.dart ('k') | runtime/observatory/observatory_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698