Merge branch 'vm_service' of github.com:flutter/flutter into vm_service
diff --git a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
index 7a85d0e..2a5211e 100644
--- a/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
+++ b/packages/fuchsia_remote_debug_protocol/lib/src/fuchsia_remote_connection.dart
@@ -509,19 +509,21 @@
 
   /// Helper for getDeviceServicePorts() to extract the vm_service_port from
   /// json response.
-  List<int> getVmServicePortFromInspectSnapshot(List<dynamic> inspectSnapshot) {
+  List<int> getVmServicePortFromInspectSnapshot(dynamic inspectSnapshot) {
     final ports = <int>[];
-    for (final item in inspectSnapshot) {
-      if (item['payload'] == null || !(item as Map).containsKey('payload')) continue;
+    for (final item in inspectSnapshot as List<dynamic>) {
+      if (item['payload'] == null || !(item as Map).containsKey('payload'))
+        continue;
       final payload = item['payload'];
 
-      if (payload['root'] == null || !(payload as Map).containsKey('root')) continue;
+      if (payload['root'] == null || !(payload as Map).containsKey('root'))
+        continue;
       final root = payload['root'];
 
       if (root['vm_service_port'] == null ||
           !(root as Map).containsKey('vm_service_port')) continue;
 
-      final int? port = int.tryParse(root['vm_service_port']);
+      final int? port = int.tryParse(root['vm_service_port'] as String);
       if (port != null) {
         ports.add(port);
       }
diff --git a/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart b/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart
index a7e681f..c85b969 100644
--- a/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart
+++ b/packages/fuchsia_remote_debug_protocol/test/fuchsia_remote_connection_test.dart
@@ -111,7 +111,7 @@
         '       "component_url": "fuchsia-pkg://fuchsia.com/flutter_aot_runner#meta/flutter_runner.cm",',
         '       "timestamp": 12345678901234',
         '     },',
-        '     "moniker": "core/session-manager/session\:session/flutter_runner",',
+        '     "moniker": "core/session-manager/flutter_runner",',
         '     "payload": {',
         '       "root": {',
         '         "vm_service_port": "12345",',
@@ -201,7 +201,7 @@
         '       "component_url": "fuchsia-pkg://fuchsia.com/flutter_aot_runner#meta/flutter_runner.cm",',
         '       "timestamp": 12345678901234',
         '     },',
-        '     "moniker": "core/session-manager/session\:session/flutter_runner",',
+        '     "moniker": "core/session-manager/flutter_runner",',
         '     "payload": {',
         '       "root": {',
         '         "vm_service_port": "12345",',
@@ -286,7 +286,7 @@
         '       "component_url": "fuchsia-pkg://fuchsia.com/flutter_aot_runner#meta/flutter_runner.cm",',
         '       "timestamp": 12345678901234',
         '     },',
-        '     "moniker": "core/session-manager/session\:session/flutter_runner",',
+        '     "moniker": "core/session-manager/flutter_runner",',
         '     "payload": {',
         '       "root": {',
         '         "vm_service_port": "12345",',