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

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

Issue 192443004: Complete the switch to ServiceObject (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/elements/observatory_element.dart
diff --git a/runtime/bin/vmservice/client/lib/src/elements/observatory_element.dart b/runtime/bin/vmservice/client/lib/src/elements/observatory_element.dart
index a5537a015559427d17c0a0b2e9a4caf491e9d670..210aa01a67c52a3046098871ed3404e0b027b078 100644
--- a/runtime/bin/vmservice/client/lib/src/elements/observatory_element.dart
+++ b/runtime/bin/vmservice/client/lib/src/elements/observatory_element.dart
@@ -64,6 +64,11 @@ class ObservatoryElement extends PolymerElement {
}
+ String formatSeconds(double x) {
+ return x.toStringAsFixed(2);
+ }
+
+
String formatSize(int bytes) {
const int bytesPerKB = 1024;
const int bytesPerMB = 1024 * bytesPerKB;
@@ -89,47 +94,47 @@ class ObservatoryElement extends PolymerElement {
return "${shortFile}:${frame['line']}";
}
- bool isNullRef(String type) {
- return type == '@Null';
+ bool isNull(String type) {
+ return type == 'Null';
}
- bool isIntRef(String type) {
- return (type == '@Smi' ||
- type == '@Mint' ||
- type == '@Bigint');
+ bool isInt(String type) {
+ return (type == 'Smi' ||
+ type == 'Mint' ||
+ type == 'Bigint');
}
- bool isBoolRef(String type) {
- return type == '@Bool';
+ bool isBool(String type) {
+ return type == 'Bool';
}
- bool isStringRef(String type) {
- return type == '@String';
+ bool isString(String type) {
+ return type == 'String';
}
- bool isInstanceRef(String type) {
- return type == '@Instance';
+ bool isInstance(String type) {
+ return type == 'Instance';
}
- bool isClosureRef(String type) {
- return type == '@Closure';
+ bool isClosure(String type) {
+ return type == 'Closure';
}
- bool isListRef(String type) {
- return (type == '@GrowableObjectArray' ||
- type == '@Array');
+ bool isList(String type) {
+ return (type == 'GrowableObjectArray' ||
+ type == 'Array');
}
- bool isUnexpectedRef(String type) {
- return (!['@Null',
- '@Smi',
- '@Mint',
- '@Biginit',
- '@Bool',
- '@String',
- '@Closure',
- '@Instance',
- '@GrowableObjectArray',
- '@Array'].contains(type));
+ bool isUnexpected(String type) {
+ return (!['Null',
+ 'Smi',
+ 'Mint',
+ 'Biginit',
+ 'Bool',
+ 'String',
+ 'Closure',
+ 'Instance',
+ 'GrowableObjectArray',
+ 'Array'].contains(type));
}
}

Powered by Google App Engine
This is Rietveld 408576698