mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 16:59:47 +00:00
5d664b4bd4
The dart closures for the then/onError callbacks we use on a JS promise will not flow back into dart. There's therefore no reason to use the very heavyweight `allowInterop` mechanism. This makes (after [0]) asynchronous calls to JS from Dart more than 2x as fast. This also aligns the `promiseToFuture` implementation with the extension on `JSPromise` (see sdk/lib/_internal/wasm/lib/js_interop_patch.dart) modulo the fact that the API doesn't work on interop types but Dart types and needs therefore the full JS<->Dart conversion. => Maybe it would make sense to deprecate `promiseToFuture` / not offer it in dart2wasm and make users use instead the extension on `JSPromise` instead? [0] https://dart-review.googlesource.com/c/sdk/+/352520 Change-Id: Ibc80bf083e7ec817f000257d6995108954060277 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352521 Reviewed-by: Srujan Gaddam <srujzs@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com> |
||
---|---|---|
.. | ||
_http | ||
_internal | ||
_macros | ||
_wasm | ||
async | ||
cli | ||
collection | ||
convert | ||
core | ||
developer | ||
ffi | ||
html | ||
indexed_db | ||
internal | ||
io | ||
isolate | ||
js | ||
js_interop | ||
js_interop_unsafe | ||
js_util | ||
math | ||
mirrors | ||
svg | ||
typed_data | ||
vmservice | ||
web_audio | ||
web_gl | ||
web_sql | ||
analysis_options.yaml | ||
libraries.json | ||
libraries.yaml | ||
PRESUBMIT.py | ||
vmservice_libraries.json | ||
vmservice_libraries.yaml |