Unverified Commit 25d2cdaa authored by Sam Rawlins's avatar Sam Rawlins Committed by GitHub

Null-assert the value given to a Completer expecting a non-null value (#136776)

The code with out the null assertion is legal as per the type signature, but will throw a runtime exception if the nullable value is null. To make this exception more explicit, the value must be null-checked before completing the completer with the value.

The analyzer will soon enforce such checks. See https://github.com/dart-lang/sdk/issues/53253.

Fixes https://github.com/flutter/flutter/issues/136775
parent 189196d1
......@@ -964,7 +964,7 @@ class FlutterVmService {
if (event.kind == vm_service.EventKind.kServiceExtensionAdded
&& event.extensionRPC == extensionName) {
isolateEvents.cancel();
extensionAdded.complete(event.isolate);
extensionAdded.complete(event.isolate!);
}
});
......
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