OLD | NEW |
---|---|
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 /// An RpcException represents an exceptional event that happened | 7 /// An RpcException represents an exceptional event that happened |
8 /// while invoking an rpc. | 8 /// while invoking an rpc. |
9 abstract class RpcException implements Exception { | 9 abstract class RpcException implements Exception { |
10 RpcException(this.message); | 10 RpcException(this.message); |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1258 } | 1258 } |
1259 | 1259 |
1260 Future stepOut() { | 1260 Future stepOut() { |
1261 return invokeRpc('resume', {'step': 'Out'}); | 1261 return invokeRpc('resume', {'step': 'Out'}); |
1262 } | 1262 } |
1263 | 1263 |
1264 Future setName(String newName) { | 1264 Future setName(String newName) { |
1265 return invokeRpc('setName', {'name': newName}); | 1265 return invokeRpc('setName', {'name': newName}); |
1266 } | 1266 } |
1267 | 1267 |
1268 Future getExceptionPauseInfo() { | |
1269 return invokeRpc('_getExceptionPauseInfo', {}); | |
1270 } | |
1271 | |
1272 Future setExceptionPauseInfo(String exceptions) { | |
1273 return invokeRpc('_setExceptionPauseInfo', {'exceptions': exceptions}); | |
1274 } | |
1275 | |
1268 Future<ServiceMap> getStack() { | 1276 Future<ServiceMap> getStack() { |
1269 return invokeRpc('getStack', {}); | 1277 return invokeRpc('getStack', {}); |
1270 } | 1278 } |
1271 | 1279 |
1272 Future<ServiceObject> _eval(ServiceObject target, | 1280 Future<ServiceObject> _eval(ServiceObject target, |
1273 String expression) { | 1281 String expression) { |
1274 Map params = { | 1282 Map params = { |
1275 'targetId': target.id, | 1283 'targetId': target.id, |
1276 'expression': expression, | 1284 'expression': expression, |
1277 }; | 1285 }; |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1474 | 1482 |
1475 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); | 1483 ServiceEvent._empty(ServiceObjectOwner owner) : super._empty(owner); |
1476 | 1484 |
1477 ServiceEvent.connectionClosed(this.reason) : super._empty(null) { | 1485 ServiceEvent.connectionClosed(this.reason) : super._empty(null) { |
1478 kind = kConnectionClosed; | 1486 kind = kConnectionClosed; |
1479 } | 1487 } |
1480 | 1488 |
1481 @observable String kind; | 1489 @observable String kind; |
1482 @observable Breakpoint breakpoint; | 1490 @observable Breakpoint breakpoint; |
1483 @observable Frame topFrame; | 1491 @observable Frame topFrame; |
1484 @observable ServiceMap exception; | 1492 @observable Instance exception; |
1485 @observable ServiceObject inspectee; | 1493 @observable ServiceObject inspectee; |
1486 @observable ByteData data; | 1494 @observable ByteData data; |
1487 @observable int count; | 1495 @observable int count; |
1488 @observable String reason; | 1496 @observable String reason; |
1489 int chunkIndex, chunkCount, nodeCount; | 1497 int chunkIndex, chunkCount, nodeCount; |
1490 | 1498 |
1491 @observable bool get isPauseEvent { | 1499 @observable bool get isPauseEvent { |
1492 return (kind == kPauseStart || | 1500 return (kind == kPauseStart || |
1493 kind == kPauseExit || | 1501 kind == kPauseExit || |
1494 kind == kPauseBreakpoint || | 1502 kind == kPauseBreakpoint || |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2337 Set<CallSite> callSites = new Set<CallSite>(); | 2345 Set<CallSite> callSites = new Set<CallSite>(); |
2338 final lines = new ObservableList<ScriptLine>(); | 2346 final lines = new ObservableList<ScriptLine>(); |
2339 final _hits = new Map<int, int>(); | 2347 final _hits = new Map<int, int>(); |
2340 @observable String uri; | 2348 @observable String uri; |
2341 @observable String kind; | 2349 @observable String kind; |
2342 @observable int firstTokenPos; | 2350 @observable int firstTokenPos; |
2343 @observable int lastTokenPos; | 2351 @observable int lastTokenPos; |
2344 @observable int lineOffset; | 2352 @observable int lineOffset; |
2345 @observable int columnOffset; | 2353 @observable int columnOffset; |
2346 @observable Library library; | 2354 @observable Library library; |
2347 bool get canCache => true; | 2355 |
2356 bool get canCache => !_id.startsWith(ServiceMap.objectIdRingPrefix); | |
rmacnak
2015/06/11 17:31:17
This still doesn't pass the assert on 309.
Cutch
2015/06/11 21:20:12
example of the assert on 309 failing?
rmacnak
2015/06/12 00:09:38
Nvm, I needed to do this for function as well (eva
| |
2348 bool get immutable => true; | 2357 bool get immutable => true; |
2349 | 2358 |
2350 String _shortUri; | 2359 String _shortUri; |
2351 | 2360 |
2352 Script._empty(ServiceObjectOwner owner) : super._empty(owner); | 2361 Script._empty(ServiceObjectOwner owner) : super._empty(owner); |
2353 | 2362 |
2354 ScriptLine getLine(int line) { | 2363 ScriptLine getLine(int line) { |
2355 assert(_loaded); | 2364 assert(_loaded); |
2356 assert(line >= 1); | 2365 assert(line >= 1); |
2357 return lines[line - lineOffset - 1]; | 2366 return lines[line - lineOffset - 1]; |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3247 void _update(ObservableMap map, bool mapIsRef) { | 3256 void _update(ObservableMap map, bool mapIsRef) { |
3248 assert(!mapIsRef); | 3257 assert(!mapIsRef); |
3249 _loaded = true; | 3258 _loaded = true; |
3250 _upgradeCollection(map, owner); | 3259 _upgradeCollection(map, owner); |
3251 this.index = map['index']; | 3260 this.index = map['index']; |
3252 this.function = map['function']; | 3261 this.function = map['function']; |
3253 this.location = map['location']; | 3262 this.location = map['location']; |
3254 this.code = map['code']; | 3263 this.code = map['code']; |
3255 this.variables = map['vars']; | 3264 this.variables = map['vars']; |
3256 } | 3265 } |
3266 | |
3267 String toString() => "Frame(${function.qualifiedName})"; | |
3257 } | 3268 } |
3258 | 3269 |
3259 | 3270 |
3260 class ServiceMessage extends ServiceObject { | 3271 class ServiceMessage extends ServiceObject { |
3261 @observable int index; | 3272 @observable int index; |
3262 @observable String messageObjectId; | 3273 @observable String messageObjectId; |
3263 @observable int size; | 3274 @observable int size; |
3264 @observable ServiceFunction handler; | 3275 @observable ServiceFunction handler; |
3265 @observable SourceLocation location; | 3276 @observable SourceLocation location; |
3266 | 3277 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3319 var v = list[i]; | 3330 var v = list[i]; |
3320 if ((v is ObservableMap) && _isServiceMap(v)) { | 3331 if ((v is ObservableMap) && _isServiceMap(v)) { |
3321 list[i] = owner.getFromMap(v); | 3332 list[i] = owner.getFromMap(v); |
3322 } else if (v is ObservableList) { | 3333 } else if (v is ObservableList) { |
3323 _upgradeObservableList(v, owner); | 3334 _upgradeObservableList(v, owner); |
3324 } else if (v is ObservableMap) { | 3335 } else if (v is ObservableMap) { |
3325 _upgradeObservableMap(v, owner); | 3336 _upgradeObservableMap(v, owner); |
3326 } | 3337 } |
3327 } | 3338 } |
3328 } | 3339 } |
OLD | NEW |