mirror of
https://github.com/flutter/flutter
synced 2024-10-13 03:32:55 +00:00
[flutter_tools] ensure allowExistingDdsInstance param is always non-null (#74091)
This commit is contained in:
parent
e7aced17db
commit
fc59f01ea8
|
@ -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, {
|
||||
|
|
Loading…
Reference in a new issue