Call refreshViews after every restart (#5479)

This commit is contained in:
John McCutchan 2016-08-18 16:01:18 -07:00 committed by GitHub
parent e683cb2157
commit 83ab5f8345
3 changed files with 10 additions and 1 deletions

View File

@ -70,7 +70,9 @@ class RunCommand extends RunCommandBase {
// Option to write the pid to a file.
argParser.addOption('pid-file',
help: 'Specify a file to write the process id to.');
help: 'Specify a file to write the process id to.'
'You can send SIGUSR1 to trigger a hot reload '
'and SIGUSR2 to trigger a full restart.');
// Hidden option to enable a benchmarking mode. This will run the given

View File

@ -47,10 +47,16 @@ abstract class ResidentRunner {
}
Future<Null> _debugDumpApp() async {
if (vmService != null)
await vmService.vm.refreshViews();
await currentView.uiIsolate.flutterDebugDumpApp();
}
Future<Null> _debugDumpRenderTree() async {
if (vmService != null)
await vmService.vm.refreshViews();
await currentView.uiIsolate.flutterDebugDumpRenderTree();
}

View File

@ -886,6 +886,7 @@ class FlutterView extends ServiceObject {
packagesPath,
assetsDirectoryPath);
await completer.future;
await owner.vm.refreshViews();
await subscription.cancel();
}