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

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

Issue 205713004: Add isolate tag-profile and better handling of errors (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/service/service.dart
diff --git a/runtime/bin/vmservice/client/lib/src/service/service.dart b/runtime/bin/vmservice/client/lib/src/service/service.dart
index 78c105dced1d6af9e80609a2492f3fc15e496fe3..8ee05019837d7ee3d31817ea0fc1cfe2ada1bc2b 100644
--- a/runtime/bin/vmservice/client/lib/src/service/service.dart
+++ b/runtime/bin/vmservice/client/lib/src/service/service.dart
@@ -44,20 +44,18 @@ void _upgradeObservableList(ObservableList list, VM vm, Isolate isolate) {
/// This acts like a factory which consumes an ObservableMap and returns
/// a fully upgraded ServiceObject.
ServiceObject _upgradeToServiceObject(VM vm, Isolate isolate, ObservableMap m) {
- if (m == null) {
- return null;
- }
- if (!ServiceObject.isServiceMap(m)) {
- Logger.root.severe("Malformed service object: $m");
- }
assert(ServiceObject.isServiceMap(m));
var type = ServiceObject.stripRef(m['type']);
+ // ServiceError and ServiceExceptions are handled before we attempt
+ // to upgrade.
+ assert(type != 'ServiceError');
+ assert(type != 'ServiceException');
switch (type) {
case 'Error':
if (isolate != null) {
- return new ServiceError.fromMap(isolate, m);
+ return new DartError.fromMap(isolate, m);
} else {
- return new ServiceError.fromMap(vm, m);
+ return new DartError.fromMap(vm, m);
}
break;
case 'Script':

Powered by Google App Engine
This is Rietveld 408576698