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

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

Issue 514833003: Add a new Sentinel type for sentinel responses. (They are not Null). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js, fix tests 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
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/elements/instance_view.html ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..86012aef1a0b15316ac1283ad6c2d68b3ea65e7e 100644
--- a/runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart
+++ b/runtime/bin/vmservice/observatory/lib/src/elements/observatory_element.dart
@@ -105,7 +105,7 @@ class ObservatoryElement extends PolymerElement {
String formatSize(int bytes) => Utils.formatSize(bytes);
String fileAndLine(Map frame) {
- var file = frame['script']['user_name'];
+ var file = frame['script'].name;
var shortFile = file.substring(file.lastIndexOf('/') + 1);
return "${shortFile}:${frame['line']}";
}
@@ -113,11 +113,11 @@ class ObservatoryElement extends PolymerElement {
int parseInt(String value) => int.parse(value);
bool isNull(ref) {
- return ref != null && ref.serviceType == 'Null' && ref.id == 'objects/null';
+ return ref != null && ref.serviceType == 'Null';
}
- bool isPsuedoNull(ref) {
- return ref != null && ref.serviceType == 'Null' && ref.id != 'objects/null';
+ bool isSentinel(ref) {
+ return ref != null && ref.serviceType == 'Sentinel';
}
bool isError(ref) {
@@ -158,6 +158,7 @@ class ObservatoryElement extends PolymerElement {
bool isUnexpected(ref) {
if (ref == null) return false;
return (!['Null',
+ 'Sentinel',
'Smi',
'Mint',
'Bigint',
« no previous file with comments | « runtime/bin/vmservice/observatory/lib/src/elements/instance_view.html ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698