Skip to content

Commit a407cc1

Browse files
authored
Remove unset clientFuture (#2718)
Use `client` field instead. See 382ff42#r171048941. - Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any relevant issues, and review the contribution guidelines below. --- <details> <summary>Contribution guidelines:</summary><br> - See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger or significant changes should be discussed in an issue before creating a PR. - Contributions to our repos should follow the [Dart style guide](https://dart.dev/guides/language/effective-dart) and use `dart format`. - Most changes should add an entry to the changelog and may need to [rev the pubspec package version](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md#making-a-change). - Changes to packages require [corresponding tests](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md#Testing). Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback. **Note**: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer. </details>
1 parent 71c052c commit a407cc1

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

dwds/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 26.2.3-wip
22

33
- Bump `build_web_compilers` to ^4.4.1.
4+
- Remove unused `clientFuture` arg from `DwdsVmClient` methods.
45

56
## 26.2.2
67

dwds/lib/src/dwds_vm_client.dart

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,12 @@ abstract base class DwdsVmClient<
134134
required Stream<VmRequest> requestStream,
135135
required StreamSink<VmRequest> requestSink,
136136
DwdsStats? dwdsStats,
137-
Future<VmService>? clientFuture,
138137
}) {
139138
responseStream.listen((request) async {
140139
final response = await _maybeHandleServiceExtensionRequest(
141140
request,
142141
proxyService: proxyService,
143142
dwdsStats: dwdsStats,
144-
clientFuture: clientFuture,
145143
);
146144
if (response != null) {
147145
requestSink.add(response);
@@ -169,13 +167,11 @@ abstract base class DwdsVmClient<
169167
VmResponse request, {
170168
required T proxyService,
171169
required DwdsStats? dwdsStats,
172-
required Future<VmService>? clientFuture,
173170
}) async {
174171
final response = await maybeHandleServiceExtensionRequestImpl(
175172
request,
176173
proxyService: proxyService,
177174
dwdsStats: dwdsStats,
178-
clientFuture: clientFuture,
179175
);
180176
if (response != null) {
181177
response['id'] = request['id'] as String;
@@ -192,7 +188,6 @@ abstract base class DwdsVmClient<
192188
VmResponse request, {
193189
required T proxyService,
194190
DwdsStats? dwdsStats,
195-
Future<VmService>? clientFuture,
196191
});
197192

198193
@mustBeOverridden
@@ -351,7 +346,6 @@ final class ChromeDwdsVmClient
351346
VmResponse request, {
352347
required ChromeProxyService proxyService,
353348
DwdsStats? dwdsStats,
354-
Future<VmService>? clientFuture,
355349
}) async {
356350
VmRequest? response;
357351
final method = request['method'];
@@ -362,8 +356,7 @@ final class ChromeDwdsVmClient
362356
} else if (method == _NamespacedServiceExtension.extDwdsReload.method) {
363357
response = await _extDwdsReloadHandler(proxyService);
364358
} else if (method == _NamespacedServiceExtension.extDwdsRestart.method) {
365-
final client = await clientFuture;
366-
response = await _extDwdsRestartHandler(proxyService, client!);
359+
response = await _extDwdsRestartHandler(proxyService, client);
367360
} else if (method == _NamespacedServiceExtension.extDwdsSendEvent.method) {
368361
response = await extDwdsSendEventHandler(request, dwdsStats, logger);
369362
} else if (method == _NamespacedServiceExtension.extDwdsScreenshot.method) {
@@ -638,7 +631,6 @@ final class WebSocketDwdsVmClient
638631
VmResponse request, {
639632
required WebSocketProxyService proxyService,
640633
DwdsStats? dwdsStats,
641-
Future<void>? clientFuture,
642634
}) async {
643635
VmRequest? response;
644636
final method = request['method'];

0 commit comments

Comments
 (0)