Make completeError be a proper JS function (#132492)

Function.toJS will start requiring that the function accept and return
JS types only.

Allows https://dart-review.googlesource.com/c/sdk/+/316867 to land.
This commit is contained in:
Srujan Gaddam 2023-08-15 11:50:31 -07:00 committed by GitHub
parent 32aa3128ee
commit 03b9911a07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,8 @@ class NetworkImage
}
}.toJS);
request.addEventListener('error', completer.completeError.toJS);
request.addEventListener('error',
((JSObject e) => completer.completeError(e)).toJS);
request.send();