Unverified Commit 75dc45ab authored by Kenzie Schmoll's avatar Kenzie Schmoll Committed by GitHub

Fix bugs with ext.flutter.activeDevToolsServerAddress (#74423)

parent 444c954f
......@@ -1420,9 +1420,15 @@ abstract class ResidentRunner {
} on Exception {
// do nothing
}
vmService.onExtensionEvent.listen((vm_service.Event event) {
StreamSubscription<vm_service.Event> extensionStream;
extensionStream = vmService.onExtensionEvent.listen((vm_service.Event event) {
if (event.json['extensionKind'] == 'Flutter.FrameworkInitialization') {
completer.complete();
// The 'Flutter.FrameworkInitialization' event is sent on hot restart
// as well, so make sure we don't try to complete this twice.
if (!completer.isCompleted) {
completer.complete();
extensionStream.cancel();
}
}
});
final vm_service.IsolateRef isolateRef = (await vmService.getVM()).isolates.first;
......
......@@ -634,6 +634,7 @@ class HotRunner extends ResidentRunner {
if (!silent) {
globals.printStatus('Restarted application in ${getElapsedAsMilliseconds(timer.elapsed)}.');
}
unawaited(maybeCallDevToolsUriServiceExtension());
return result;
}
final OperationResult result = await _hotReloadHelper(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment