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

Unified Diff: runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart

Issue 509563004: Give instances their own model class; move DartErrors out of instance-ref into their own error-ref. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart
diff --git a/runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart b/runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart
index 71e768a7672eae0c4bd25fd0dfad06022be8c50b..859bd160c45d924dcc32bc0c7bbd97c86e5c1641 100644
--- a/runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart
+++ b/runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart
@@ -111,63 +111,4 @@ class ObservatoryElement extends PolymerElement {
}
int parseInt(String value) => int.parse(value);
-
- bool isNull(ref) {
- return ref != null && ref.serviceType == 'Null' && ref.id == 'objects/null';
- }
-
- bool isPsuedoNull(ref) {
- return ref != null && ref.serviceType == 'Null' && ref.id != 'objects/null';
- }
-
- bool isError(ref) {
- return ref != null && ref.serviceType == 'Error';
- }
-
- bool isInt(ref) {
- return ref != null && (ref.serviceType == 'Smi' ||
- ref.serviceType == 'Mint' ||
- ref.serviceType == 'Bigint');
- }
-
- bool isBool(ref) {
- return ref != null && ref.serviceType == 'Bool';
- }
-
- bool isString(ref) {
- return ref != null && ref.serviceType == 'String';
- }
-
- bool isInstance(ref) {
- return ref != null && ref.serviceType == 'Instance';
- }
-
- bool isDouble(ref) {
- return ref != null && ref.serviceType == 'Double';
- }
-
- bool isList(ref) {
- return ref != null && (ref.serviceType == 'GrowableObjectArray' ||
- ref.serviceType == 'Array');
- }
-
- bool isType(ref) {
- return ref != null && (ref.serviceType == 'Type');
- }
-
- bool isUnexpected(ref) {
- if (ref == null) return false;
- return (!['Null',
- 'Smi',
- 'Mint',
- 'Bigint',
- 'Bool',
- 'String',
- 'Double',
- 'Instance',
- 'GrowableObjectArray',
- 'Array',
- 'Type',
- 'Error'].contains(ref.serviceType));
- }
}

Powered by Google App Engine
This is Rietveld 408576698