[VM/libraries] - Fix signature of waitFor.
This should fix issue 40472. Bug: 40472 Change-Id: I5cfa7cf25778b6a5430168707dd9370b202d3e6d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134565 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
eba2741166
commit
83fdfde140
@@ -111,12 +111,12 @@ class _WaitForUtils {
|
||||
* subsequent calls block waiting for a condition that is only satisfied when
|
||||
* an earlier call returns.
|
||||
*/
|
||||
T? waitFor<T>(Future<T?> future, {Duration? timeout}) {
|
||||
late T? result;
|
||||
T waitFor<T>(Future<T> future, {Duration? timeout}) {
|
||||
late T result;
|
||||
bool futureCompleted = false;
|
||||
Object? error;
|
||||
StackTrace? stacktrace;
|
||||
future.then((r) {
|
||||
future.then((T r) {
|
||||
futureCompleted = true;
|
||||
result = r;
|
||||
}, onError: (e, st) {
|
||||
|
||||
Reference in New Issue
Block a user