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

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

Issue 2521413002: Revert "Implement rewind: drop one or more frames from the debugger." (Closed)
Patch Set: Created 4 years, 1 month 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;
46 static const kIsolateIsReloading = 1000; 45 static const kIsolateIsReloading = 1000;
47 static const kFileSystemAlreadyExists = 1001; 46 static const kFileSystemAlreadyExists = 1001;
48 static const kFileSystemDoesNotExist = 1002; 47 static const kFileSystemDoesNotExist = 1002;
49 static const kFileDoesNotExist = 1003; 48 static const kFileDoesNotExist = 1003;
50 static const kIsolateReloadFailed = 1004; 49 static const kIsolateReloadFailed = 1004;
51 static const kIsolateReloadBarred = 1005;
52 50
53 int code; 51 int code;
54 Map data; 52 Map data;
55 53
56 static _getMessage(Map errorMap) { 54 static _getMessage(Map errorMap) {
57 Map data = errorMap['data']; 55 Map data = errorMap['data'];
58 if (data != null && data['details'] != null) { 56 if (data != null && data['details'] != null) {
59 return data['details']; 57 return data['details'];
60 } else { 58 } else {
61 return errorMap['message']; 59 return errorMap['message'];
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 idle = (!paused && topFrame == null); 1272 idle = (!paused && topFrame == null);
1275 } 1273 }
1276 1274
1277 M.DebugEvent pauseEvent = null; 1275 M.DebugEvent pauseEvent = null;
1278 bool paused = false; 1276 bool paused = false;
1279 bool running = false; 1277 bool running = false;
1280 bool idle = false; 1278 bool idle = false;
1281 bool loading = true; 1279 bool loading = true;
1282 bool runnable = false; 1280 bool runnable = false;
1283 bool ioEnabled = false; 1281 bool ioEnabled = false;
1282 bool reloading = false;
1284 M.IsolateStatus get status { 1283 M.IsolateStatus get status {
1285 if (paused) { 1284 if (paused) {
1286 return M.IsolateStatus.paused; 1285 return M.IsolateStatus.paused;
1287 } 1286 }
1288 if (running) { 1287 if (running) {
1289 return M.IsolateStatus.running; 1288 return M.IsolateStatus.running;
1290 } 1289 }
1291 if (idle) { 1290 if (idle) {
1292 return M.IsolateStatus.idle; 1291 return M.IsolateStatus.idle;
1293 } 1292 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 {String rootLibUri, 1337 {String rootLibUri,
1339 bool pause}) { 1338 bool pause}) {
1340 Map<String, dynamic> params = <String, dynamic>{}; 1339 Map<String, dynamic> params = <String, dynamic>{};
1341 if (rootLibUri != null) { 1340 if (rootLibUri != null) {
1342 params['rootLibUri'] = rootLibUri; 1341 params['rootLibUri'] = rootLibUri;
1343 } 1342 }
1344 if (pause != null) { 1343 if (pause != null) {
1345 params['pause'] = pause; 1344 params['pause'] = pause;
1346 } 1345 }
1347 return invokeRpc('reloadSources', params).then((result) { 1346 return invokeRpc('reloadSources', params).then((result) {
1348 _cache.clear(); 1347 reloading = true;
1349 return result; 1348 return result;
1350 }); 1349 });
1351 } 1350 }
1352 1351
1353 void _handleIsolateReloadEvent(ServiceEvent event) { 1352 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
1775 Future setName(String newName) { 1771 Future setName(String newName) {
1776 return invokeRpc('setName', {'name': newName}); 1772 return invokeRpc('setName', {'name': newName});
1777 } 1773 }
1778 1774
1779 Future setExceptionPauseMode(String mode) { 1775 Future setExceptionPauseMode(String mode) {
1780 return invokeRpc('setExceptionPauseMode', {'mode': mode}); 1776 return invokeRpc('setExceptionPauseMode', {'mode': mode});
1781 } 1777 }
1782 1778
1783 Future<ServiceMap> getStack() { 1779 Future<ServiceMap> getStack() {
1784 return invokeRpc('getStack', {}); 1780 return invokeRpc('getStack', {});
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
4411 var v = list[i]; 4407 var v = list[i];
4412 if ((v is Map) && _isServiceMap(v)) { 4408 if ((v is Map) && _isServiceMap(v)) {
4413 list[i] = owner.getFromMap(v); 4409 list[i] = owner.getFromMap(v);
4414 } else if (v is List) { 4410 } else if (v is List) {
4415 _upgradeList(v, owner); 4411 _upgradeList(v, owner);
4416 } else if (v is Map) { 4412 } else if (v is Map) {
4417 _upgradeMap(v, owner); 4413 _upgradeMap(v, owner);
4418 } 4414 }
4419 } 4415 }
4420 } 4416 }
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