Unverified Commit fc59f01e authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] ensure allowExistingDdsInstance param is always non-null (#74091)

parent e7aced17
......@@ -222,7 +222,7 @@ class FlutterDevice {
int ddsPort,
bool disableServiceAuthCodes = false,
bool disableDds = false,
bool allowExistingDdsInstance = false,
@required bool allowExistingDdsInstance,
bool ipv6 = false,
}) {
final Completer<void> completer = Completer<void>();
......@@ -1217,7 +1217,7 @@ abstract class ResidentRunner {
Restart restart,
CompileExpression compileExpression,
GetSkSLMethod getSkSLMethod,
bool allowExistingDdsInstance,
@required bool allowExistingDdsInstance,
}) async {
if (!debuggingOptions.debuggingEnabled) {
throw 'The service protocol is not enabled.';
......
......@@ -73,7 +73,9 @@ class ColdRunner extends ResidentRunner {
if (debuggingOptions.debuggingEnabled) {
try {
await Future.wait(<Future<void>>[
connectToServiceProtocol(),
connectToServiceProtocol(
allowExistingDdsInstance: false,
),
serveDevToolsGracefully(
devToolsServerAddress: debuggingOptions.devToolsServerAddress,
),
......
......@@ -197,6 +197,7 @@ void main() {
restart: anyNamed('restart'),
compileExpression: anyNamed('compileExpression'),
getSkSLMethod: anyNamed('getSkSLMethod'),
allowExistingDdsInstance: anyNamed('allowExistingDdsInstance'),
)).thenAnswer((Invocation invocation) async { });
when(mockFlutterDevice.setupDevFS(any, any))
.thenAnswer((Invocation invocation) async {
......@@ -2815,7 +2816,7 @@ void main() {
observatoryUris: Stream<Uri>.value(testUri),
);
await flutterDevice.connect();
await flutterDevice.connect(allowExistingDdsInstance: true);
verify(mockLogReader.connectedVMService = mockVMService);
}, overrides: <Type, Generator>{
VMServiceConnector: () => (Uri httpUri, {
......
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