Chromium Code Reviews| 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 // 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 Loading... | |
| 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 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1337 {String rootLibUri, | 1339 {String rootLibUri, |
| 1338 bool pause}) { | 1340 bool pause}) { |
| 1339 Map<String, dynamic> params = <String, dynamic>{}; | 1341 Map<String, dynamic> params = <String, dynamic>{}; |
| 1340 if (rootLibUri != null) { | 1342 if (rootLibUri != null) { |
| 1341 params['rootLibUri'] = rootLibUri; | 1343 params['rootLibUri'] = rootLibUri; |
| 1342 } | 1344 } |
| 1343 if (pause != null) { | 1345 if (pause != null) { |
| 1344 params['pause'] = pause; | 1346 params['pause'] = pause; |
| 1345 } | 1347 } |
| 1346 return invokeRpc('reloadSources', params).then((result) { | 1348 return invokeRpc('reloadSources', params).then((result) { |
| 1349 _cache.clear(); | |
| 1347 reloading = true; | 1350 reloading = true; |
|
Cutch
2016/11/22 22:27:50
why are we tracking this reloading bit?
turnidge
2016/11/22 22:54:06
Perhaps we were going to use it to track isolate s
| |
| 1348 return result; | 1351 return result; |
| 1349 }); | 1352 }); |
| 1350 } | 1353 } |
| 1351 | 1354 |
| 1352 void _handleIsolateReloadEvent(ServiceEvent event) { | 1355 void _handleIsolateReloadEvent(ServiceEvent event) { |
| 1353 reloading = false; | 1356 reloading = false; |
| 1354 if (event.reloadError != null) { | 1357 if (event.reloadError != null) { |
| 1355 // Failure. | 1358 // Failure. |
| 1356 print('Reload failed: ${event.reloadError}'); | 1359 print('Reload failed: ${event.reloadError}'); |
| 1357 } else { | 1360 } else { |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1761 } | 1764 } |
| 1762 | 1765 |
| 1763 Future stepOverAsyncSuspension() { | 1766 Future stepOverAsyncSuspension() { |
| 1764 return invokeRpc('resume', {'step': 'OverAsyncSuspension'}); | 1767 return invokeRpc('resume', {'step': 'OverAsyncSuspension'}); |
| 1765 } | 1768 } |
| 1766 | 1769 |
| 1767 Future stepOut() { | 1770 Future stepOut() { |
| 1768 return invokeRpc('resume', {'step': 'Out'}); | 1771 return invokeRpc('resume', {'step': 'Out'}); |
| 1769 } | 1772 } |
| 1770 | 1773 |
| 1774 Future rewind(int count) { | |
| 1775 return invokeRpc('resume', {'step': 'Rewind', 'frameIndex': count}); | |
| 1776 } | |
| 1777 | |
| 1771 Future setName(String newName) { | 1778 Future setName(String newName) { |
| 1772 return invokeRpc('setName', {'name': newName}); | 1779 return invokeRpc('setName', {'name': newName}); |
| 1773 } | 1780 } |
| 1774 | 1781 |
| 1775 Future setExceptionPauseMode(String mode) { | 1782 Future setExceptionPauseMode(String mode) { |
| 1776 return invokeRpc('setExceptionPauseMode', {'mode': mode}); | 1783 return invokeRpc('setExceptionPauseMode', {'mode': mode}); |
| 1777 } | 1784 } |
| 1778 | 1785 |
| 1779 Future<ServiceMap> getStack() { | 1786 Future<ServiceMap> getStack() { |
| 1780 return invokeRpc('getStack', {}); | 1787 return invokeRpc('getStack', {}); |
| (...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4407 var v = list[i]; | 4414 var v = list[i]; |
| 4408 if ((v is Map) && _isServiceMap(v)) { | 4415 if ((v is Map) && _isServiceMap(v)) { |
| 4409 list[i] = owner.getFromMap(v); | 4416 list[i] = owner.getFromMap(v); |
| 4410 } else if (v is List) { | 4417 } else if (v is List) { |
| 4411 _upgradeList(v, owner); | 4418 _upgradeList(v, owner); |
| 4412 } else if (v is Map) { | 4419 } else if (v is Map) { |
| 4413 _upgradeMap(v, owner); | 4420 _upgradeMap(v, owner); |
| 4414 } | 4421 } |
| 4415 } | 4422 } |
| 4416 } | 4423 } |
| OLD | NEW |