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

Unified Diff: runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.dart

Issue 164183003: Add expandable instances and lists to the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 10 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
Index: runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.dart
diff --git a/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.dart b/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.dart
index 90ff72ab41360198bb2007665b21c142669b8781..acd06464d0594a6a85dd259efa07e71f8f52cfcb 100644
--- a/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.dart
+++ b/runtime/bin/vmservice/client/lib/src/observatory_elements/observatory_element.dart
@@ -94,4 +94,43 @@ class ObservatoryElement extends PolymerElement {
var shortFile = file.substring(file.lastIndexOf('/') + 1);
return "${shortFile}:${frame['line']}";
}
+
+ bool isNullRef(String type) {
+ return type == '@Null';
+ }
+
+ bool isIntRef(String type) {
+ return (type == '@Smi' ||
+ type == '@Mint' ||
+ type == '@Bigint');
+ }
+
+ bool isBoolRef(String type) {
+ return type == '@Bool';
+ }
+
+ bool isStringRef(String type) {
+ return type == '@String';
+ }
+
+ bool isInstanceRef(String type) {
+ return type == '@Instance';
+ }
+
+ bool isListRef(String type) {
+ return (type == '@GrowableObjectArray' ||
+ type == '@Array');
+ }
+
+ bool isUnexpectedRef(String type) {
+ return (!['@Null',
+ '@Smi',
+ '@Mint',
+ '@Biginit',
+ '@Bool',
+ '@String',
+ '@Instance',
+ '@GrowableObjectArray'
+ '@Array'].contains(type));
+ }
}

Powered by Google App Engine
This is Rietveld 408576698