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

Side by Side Diff: runtime/observatory/lib/src/service/object.dart

Issue 1076003004: Fix all Observatory warnings/errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of service; 5 part of service;
6 6
7 /// A [ServiceObject] represents a persistent object within the vm. 7 /// A [ServiceObject] represents a persistent object within the vm.
8 abstract class ServiceObject extends Observable { 8 abstract class ServiceObject extends Observable {
9 static int LexicalSortName(ServiceObject o1, ServiceObject o2) { 9 static int LexicalSortName(ServiceObject o1, ServiceObject o2) {
10 return o1.name.compareTo(o2.name); 10 return o1.name.compareTo(o2.name);
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 new StreamController.broadcast(); 370 new StreamController.broadcast();
371 371
372 void postServiceEvent(String response, ByteData data) { 372 void postServiceEvent(String response, ByteData data) {
373 var map; 373 var map;
374 try { 374 try {
375 map = _parseJSON(response); 375 map = _parseJSON(response);
376 assert(!map.containsKey('_data')); 376 assert(!map.containsKey('_data'));
377 if (data != null) { 377 if (data != null) {
378 map['_data'] = data; 378 map['_data'] = data;
379 } 379 }
380 } catch (e, st) { 380 } catch (_) {
381 Logger.root.severe('Ignoring malformed event response: ${response}'); 381 Logger.root.severe('Ignoring malformed event response: ${response}');
382 return; 382 return;
383 } 383 }
384 if (map['type'] != 'ServiceEvent') { 384 if (map['type'] != 'ServiceEvent') {
385 Logger.root.severe( 385 Logger.root.severe(
386 "Expected 'ServiceEvent' but found '${map['type']}'"); 386 "Expected 'ServiceEvent' but found '${map['type']}'");
387 return; 387 return;
388 } 388 }
389 389
390 var eventIsolate = map['isolate']; 390 var eventIsolate = map['isolate'];
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 name = map['name']; 1893 name = map['name'];
1894 vmName = (map.containsKey('vmName') ? map['vmName'] : name); 1894 vmName = (map.containsKey('vmName') ? map['vmName'] : name);
1895 1895
1896 _upgradeCollection(map, isolate); 1896 _upgradeCollection(map, isolate);
1897 1897
1898 dartOwner = map['owner']; 1898 dartOwner = map['owner'];
1899 kind = FunctionKind.fromJSON(map['kind']); 1899 kind = FunctionKind.fromJSON(map['kind']);
1900 isDart = !kind.isSynthetic(); 1900 isDart = !kind.isSynthetic();
1901 1901
1902 if (dartOwner is ServiceFunction) { 1902 if (dartOwner is ServiceFunction) {
1903 library = dartOwner.library; 1903 ServiceFunction ownerFunction = dartOwner;
1904 qualifiedName = "${dartOwner.qualifiedName}.${name}"; 1904 library = ownerFunction.library;
1905 qualifiedName = "${ownerFunction.qualifiedName}.${name}";
1905 1906
1906 } else if (dartOwner is Class) { 1907 } else if (dartOwner is Class) {
1907 library = dartOwner.library; 1908 Class ownerClass = dartOwner;
1908 qualifiedName = "${dartOwner.name}.${name}"; 1909 library = ownerClass.library;
1910 qualifiedName = "${ownerClass.name}.${name}";
1909 1911
1910 } else { 1912 } else {
1911 library = dartOwner; 1913 library = dartOwner;
1912 qualifiedName = name; 1914 qualifiedName = name;
1913 } 1915 }
1914 1916
1915 if (mapIsRef) { 1917 if (mapIsRef) {
1916 return; 1918 return;
1917 } 1919 }
1918 1920
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 name = map['name']; 1961 name = map['name'];
1960 vmName = (map.containsKey('vmName') ? map['vmName'] : name); 1962 vmName = (map.containsKey('vmName') ? map['vmName'] : name);
1961 dartOwner = map['owner']; 1963 dartOwner = map['owner'];
1962 declaredType = map['declaredType']; 1964 declaredType = map['declaredType'];
1963 isStatic = map['static']; 1965 isStatic = map['static'];
1964 isFinal = map['final']; 1966 isFinal = map['final'];
1965 isConst = map['const']; 1967 isConst = map['const'];
1966 value = map['value']; 1968 value = map['value'];
1967 1969
1968 if (dartOwner is Class) { 1970 if (dartOwner is Class) {
1969 library = dartOwner.library; 1971 Class ownerClass = dartOwner;
1972 library = ownerClass.library;
1970 1973
1971 } else { 1974 } else {
1972 library = dartOwner; 1975 library = dartOwner;
1973 } 1976 }
1974 1977
1975 if (mapIsRef) { 1978 if (mapIsRef) {
1976 return; 1979 return;
1977 } 1980 }
1978 1981
1979 guardNullable = map['_guardNullable']; 1982 guardNullable = map['_guardNullable'];
1980 guardClass = map['_guardClass']; 1983 guardClass = map['_guardClass'];
1981 guardLength = map['_guardLength']; 1984 guardLength = map['_guardLength'];
1982 script = map['script']; 1985 script = map['script'];
1983 tokenPos = map['tokenPos']; 1986 tokenPos = map['tokenPos'];
1984 1987
1985 _loaded = true; 1988 _loaded = true;
1986 } 1989 }
1987 1990
1988 String toString() => 'Field(${darOwner.name}.$name)'; 1991 String toString() => 'Field(${dartOwner.name}.$name)';
1989 } 1992 }
1990 1993
1991 1994
1992 class ScriptLine extends Observable { 1995 class ScriptLine extends Observable {
1993 final Script script; 1996 final Script script;
1994 final int line; 1997 final int line;
1995 final String text; 1998 final String text;
1996 @observable int hits; 1999 @observable int hits;
1997 @observable bool possibleBpt = true; 2000 @observable bool possibleBpt = true;
1998 @observable bool breakpointResolved = false; 2001 @observable bool breakpointResolved = false;
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2937 var v = list[i]; 2940 var v = list[i];
2938 if ((v is ObservableMap) && _isServiceMap(v)) { 2941 if ((v is ObservableMap) && _isServiceMap(v)) {
2939 list[i] = owner.getFromMap(v); 2942 list[i] = owner.getFromMap(v);
2940 } else if (v is ObservableList) { 2943 } else if (v is ObservableList) {
2941 _upgradeObservableList(v, owner); 2944 _upgradeObservableList(v, owner);
2942 } else if (v is ObservableMap) { 2945 } else if (v is ObservableMap) {
2943 _upgradeObservableMap(v, owner); 2946 _upgradeObservableMap(v, owner);
2944 } 2947 }
2945 } 2948 }
2946 } 2949 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698