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

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

Issue 2797923008: Fix updating packages map on reload and add a regression test (Closed)
Patch Set: Fix loader logic Created 3 years, 8 months 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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 } 1349 }
1350 if (startPos != null) { 1350 if (startPos != null) {
1351 params['tokenPos'] = startPos; 1351 params['tokenPos'] = startPos;
1352 } 1352 }
1353 if (endPos != null) { 1353 if (endPos != null) {
1354 params['endTokenPos'] = endPos; 1354 params['endTokenPos'] = endPos;
1355 } 1355 }
1356 return invokeRpc('getSourceReport', params); 1356 return invokeRpc('getSourceReport', params);
1357 } 1357 }
1358 1358
1359 Future<ServiceMap> reloadSources({String rootLibUri, bool pause}) { 1359 Future<ServiceMap> reloadSources(
1360 {String rootLibUri, String packagesUri, bool pause}) {
1360 Map<String, dynamic> params = <String, dynamic>{}; 1361 Map<String, dynamic> params = <String, dynamic>{};
1361 if (rootLibUri != null) { 1362 if (rootLibUri != null) {
1362 params['rootLibUri'] = rootLibUri; 1363 params['rootLibUri'] = rootLibUri;
1363 } 1364 }
1365 if (packagesUri != null) {
1366 params['packagesUri'] = packagesUri;
1367 }
1364 if (pause != null) { 1368 if (pause != null) {
1365 params['pause'] = pause; 1369 params['pause'] = pause;
1366 } 1370 }
1367 return invokeRpc('reloadSources', params).then((result) { 1371 return invokeRpc('reloadSources', params).then((result) {
1368 _cache.clear(); 1372 _cache.clear();
1369 return result; 1373 return result;
1370 }); 1374 });
1371 } 1375 }
1372 1376
1373 void _handleIsolateReloadEvent(ServiceEvent event) { 1377 void _handleIsolateReloadEvent(ServiceEvent event) {
(...skipping 3250 matching lines...) Expand 10 before | Expand all | Expand 10 after
4624 var v = list[i]; 4628 var v = list[i];
4625 if ((v is Map) && _isServiceMap(v)) { 4629 if ((v is Map) && _isServiceMap(v)) {
4626 list[i] = owner.getFromMap(v); 4630 list[i] = owner.getFromMap(v);
4627 } else if (v is List) { 4631 } else if (v is List) {
4628 _upgradeList(v, owner); 4632 _upgradeList(v, owner);
4629 } else if (v is Map) { 4633 } else if (v is Map) {
4630 _upgradeMap(v, owner); 4634 _upgradeMap(v, owner);
4631 } 4635 }
4632 } 4636 }
4633 } 4637 }
OLDNEW
« no previous file with comments | « runtime/bin/vmservice/loader.dart ('k') | runtime/observatory/tests/service/complex_reload/v2/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698