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

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

Issue 2523053002: Implement rewind: drop one or more frames from the debugger. (Closed)
Patch Set: code review Created 4 years 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
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 // Some value smaller than the object ring, so requesting a large array 7 // Some value smaller than the object ring, so requesting a large array
8 // doesn't result in an expired ref because the elements lapped it in the 8 // doesn't result in an expired ref because the elements lapped it in the
9 // object ring. 9 // object ring.
10 const int kDefaultFieldLimit = 100; 10 const int kDefaultFieldLimit = 100;
(...skipping 24 matching lines...) Expand all
35 static const kInvalidRequest = -32600; 35 static const kInvalidRequest = -32600;
36 static const kMethodNotFound = -32601; 36 static const kMethodNotFound = -32601;
37 static const kInvalidParams = -32602; 37 static const kInvalidParams = -32602;
38 static const kInternalError = -32603; 38 static const kInternalError = -32603;
39 static const kFeatureDisabled = 100; 39 static const kFeatureDisabled = 100;
40 static const kCannotAddBreakpoint = 102; 40 static const kCannotAddBreakpoint = 102;
41 static const kStreamAlreadySubscribed = 103; 41 static const kStreamAlreadySubscribed = 103;
42 static const kStreamNotSubscribed = 104; 42 static const kStreamNotSubscribed = 104;
43 static const kIsolateMustBeRunnable = 105; 43 static const kIsolateMustBeRunnable = 105;
44 static const kIsolateMustBePaused = 106; 44 static const kIsolateMustBePaused = 106;
45 static const kCannotResume = 107;
45 static const kIsolateIsReloading = 1000; 46 static const kIsolateIsReloading = 1000;
46 static const kFileSystemAlreadyExists = 1001; 47 static const kFileSystemAlreadyExists = 1001;
47 static const kFileSystemDoesNotExist = 1002; 48 static const kFileSystemDoesNotExist = 1002;
48 static const kFileDoesNotExist = 1003; 49 static const kFileDoesNotExist = 1003;
49 static const kIsolateReloadFailed = 1004; 50 static const kIsolateReloadFailed = 1004;
51 static const kIsolateReloadBarred = 1005;
50 52
51 int code; 53 int code;
52 Map data; 54 Map data;
53 55
54 static _getMessage(Map errorMap) { 56 static _getMessage(Map errorMap) {
55 Map data = errorMap['data']; 57 Map data = errorMap['data'];
56 if (data != null && data['details'] != null) { 58 if (data != null && data['details'] != null) {
57 return data['details']; 59 return data['details'];
58 } else { 60 } else {
59 return errorMap['message']; 61 return errorMap['message'];
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 idle = (!paused && topFrame == null); 1274 idle = (!paused && topFrame == null);
1273 } 1275 }
1274 1276
1275 M.DebugEvent pauseEvent = null; 1277 M.DebugEvent pauseEvent = null;
1276 bool paused = false; 1278 bool paused = false;
1277 bool running = false; 1279 bool running = false;
1278 bool idle = false; 1280 bool idle = false;
1279 bool loading = true; 1281 bool loading = true;
1280 bool runnable = false; 1282 bool runnable = false;
1281 bool ioEnabled = false; 1283 bool ioEnabled = false;
1282 bool reloading = false;
1283 M.IsolateStatus get status { 1284 M.IsolateStatus get status {
1284 if (paused) { 1285 if (paused) {
1285 return M.IsolateStatus.paused; 1286 return M.IsolateStatus.paused;
1286 } 1287 }
1287 if (running) { 1288 if (running) {
1288 return M.IsolateStatus.running; 1289 return M.IsolateStatus.running;
1289 } 1290 }
1290 if (idle) { 1291 if (idle) {
1291 return M.IsolateStatus.idle; 1292 return M.IsolateStatus.idle;
1292 } 1293 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 {String rootLibUri, 1338 {String rootLibUri,
1338 bool pause}) { 1339 bool pause}) {
1339 Map<String, dynamic> params = <String, dynamic>{}; 1340 Map<String, dynamic> params = <String, dynamic>{};
1340 if (rootLibUri != null) { 1341 if (rootLibUri != null) {
1341 params['rootLibUri'] = rootLibUri; 1342 params['rootLibUri'] = rootLibUri;
1342 } 1343 }
1343 if (pause != null) { 1344 if (pause != null) {
1344 params['pause'] = pause; 1345 params['pause'] = pause;
1345 } 1346 }
1346 return invokeRpc('reloadSources', params).then((result) { 1347 return invokeRpc('reloadSources', params).then((result) {
1347 reloading = true; 1348 _cache.clear();
1348 return result; 1349 return result;
1349 }); 1350 });
1350 } 1351 }
1351 1352
1352 void _handleIsolateReloadEvent(ServiceEvent event) { 1353 void _handleIsolateReloadEvent(ServiceEvent event) {
1353 reloading = false;
1354 if (event.reloadError != null) { 1354 if (event.reloadError != null) {
1355 // Failure. 1355 // Failure.
1356 print('Reload failed: ${event.reloadError}'); 1356 print('Reload failed: ${event.reloadError}');
1357 } else { 1357 } else {
1358 _cache.clear(); 1358 _cache.clear();
1359 } 1359 }
1360 } 1360 }
1361 1361
1362 /// Fetches and builds the class hierarchy for this isolate. Returns the 1362 /// Fetches and builds the class hierarchy for this isolate. Returns the
1363 /// Object class object. 1363 /// Object class object.
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 } 1761 }
1762 1762
1763 Future stepOverAsyncSuspension() { 1763 Future stepOverAsyncSuspension() {
1764 return invokeRpc('resume', {'step': 'OverAsyncSuspension'}); 1764 return invokeRpc('resume', {'step': 'OverAsyncSuspension'});
1765 } 1765 }
1766 1766
1767 Future stepOut() { 1767 Future stepOut() {
1768 return invokeRpc('resume', {'step': 'Out'}); 1768 return invokeRpc('resume', {'step': 'Out'});
1769 } 1769 }
1770 1770
1771 Future rewind(int count) {
1772 return invokeRpc('resume', {'step': 'Rewind', 'frameIndex': count});
1773 }
1774
1771 Future setName(String newName) { 1775 Future setName(String newName) {
1772 return invokeRpc('setName', {'name': newName}); 1776 return invokeRpc('setName', {'name': newName});
1773 } 1777 }
1774 1778
1775 Future setExceptionPauseMode(String mode) { 1779 Future setExceptionPauseMode(String mode) {
1776 return invokeRpc('setExceptionPauseMode', {'mode': mode}); 1780 return invokeRpc('setExceptionPauseMode', {'mode': mode});
1777 } 1781 }
1778 1782
1779 Future<ServiceMap> getStack() { 1783 Future<ServiceMap> getStack() {
1780 return invokeRpc('getStack', {}); 1784 return invokeRpc('getStack', {});
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
4407 var v = list[i]; 4411 var v = list[i];
4408 if ((v is Map) && _isServiceMap(v)) { 4412 if ((v is Map) && _isServiceMap(v)) {
4409 list[i] = owner.getFromMap(v); 4413 list[i] = owner.getFromMap(v);
4410 } else if (v is List) { 4414 } else if (v is List) {
4411 _upgradeList(v, owner); 4415 _upgradeList(v, owner);
4412 } else if (v is Map) { 4416 } else if (v is Map) {
4413 _upgradeMap(v, owner); 4417 _upgradeMap(v, owner);
4414 } 4418 }
4415 } 4419 }
4416 } 4420 }
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.dart ('k') | runtime/observatory/tests/service/pause_idle_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698