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 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1326 } | 1326 } |
| 1327 if (startPos != null) { | 1327 if (startPos != null) { |
| 1328 params['tokenPos'] = startPos; | 1328 params['tokenPos'] = startPos; |
| 1329 } | 1329 } |
| 1330 if (endPos != null) { | 1330 if (endPos != null) { |
| 1331 params['endTokenPos'] = endPos; | 1331 params['endTokenPos'] = endPos; |
| 1332 } | 1332 } |
| 1333 return invokeRpc('getSourceReport', params); | 1333 return invokeRpc('getSourceReport', params); |
| 1334 } | 1334 } |
| 1335 | 1335 |
| 1336 Future<ServiceMap> reloadSources() { | 1336 Future<ServiceMap> reloadSources( |
| 1337 return invokeRpc('_reloadSources', {}).then((_) { | 1337 [Map<String, dynamic> params]) { |
|
turnidge
2016/11/18 19:23:10
I would prefer a named optional parameter for "roo
Cutch
2016/11/18 20:23:19
Done.
| |
| 1338 if (params == null) { | |
| 1339 params = <String, dynamic>{}; | |
| 1340 } | |
| 1341 return invokeRpc('reloadSources', params).then((result) { | |
| 1338 reloading = true; | 1342 reloading = true; |
| 1343 return result; | |
| 1339 }); | 1344 }); |
| 1340 } | 1345 } |
| 1341 | 1346 |
| 1342 void _handleIsolateReloadEvent(ServiceEvent event) { | 1347 void _handleIsolateReloadEvent(ServiceEvent event) { |
| 1343 reloading = false; | 1348 reloading = false; |
| 1344 if (event.reloadError != null) { | 1349 if (event.reloadError != null) { |
| 1345 // Failure. | 1350 // Failure. |
| 1346 print('Reload failed: ${event.reloadError}'); | 1351 print('Reload failed: ${event.reloadError}'); |
| 1347 } else { | 1352 } else { |
| 1348 _cache.clear(); | 1353 _cache.clear(); |
| (...skipping 3048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4397 var v = list[i]; | 4402 var v = list[i]; |
| 4398 if ((v is Map) && _isServiceMap(v)) { | 4403 if ((v is Map) && _isServiceMap(v)) { |
| 4399 list[i] = owner.getFromMap(v); | 4404 list[i] = owner.getFromMap(v); |
| 4400 } else if (v is List) { | 4405 } else if (v is List) { |
| 4401 _upgradeList(v, owner); | 4406 _upgradeList(v, owner); |
| 4402 } else if (v is Map) { | 4407 } else if (v is Map) { |
| 4403 _upgradeMap(v, owner); | 4408 _upgradeMap(v, owner); |
| 4404 } | 4409 } |
| 4405 } | 4410 } |
| 4406 } | 4411 } |
| OLD | NEW |