Skip to content

Avoid using js_util.promiseToFuture, instead prefer the extension on JSPromise<> #143396

Closed

Description

@mkustermann

The flutter web engine should avoid using js_util.promiseToFuture (which operates on Dart types and therefore requires dartify() behavior) and instead use static interop via the extension on JSPromise, see JSPromiseToFuture.toDart

/cc @eyebrowsoffire @srujzs @kevmoo

Activity

  1. srujzs commented on Feb 13, 2024

    @srujzs
    Contributor

    In general, if we can migrate off of dart:js_util, we can remove Flutter from the allowlist here: https://github.com/dart-lang/sdk/blob/1c5eccdd2b258be67251719ed87595d21614545f/pkg/_js_interop_checks/lib/js_interop_checks.dart#L109. We could probably also remove the implementations of promiseToFuture and allowInterop at that time because I believe no one else is using them.

  2. added
    team-webOwned by Web platform team
    e: wasmIssues related to the wasm build of Flutter Web.
    on Feb 13, 2024
  3. added
    platform-webWeb applications specifically
    P1High-priority issues at the top of the work list
    triaged-webTriaged by Web platform team
    P2Important issues not at the top of the work list
    and removed
    P1High-priority issues at the top of the work list
    on Feb 15, 2024
  4. removed
    P2Important issues not at the top of the work list
    triaged-webTriaged by Web platform team
    on Jan 7, 2025
  5. ditman commented on Jan 7, 2025

    @ditman
    Member

    Removing labels to trigger a re-triage, we should do this. As Srujan says, we should actually remove all usages of dart:js_util and migrate to dart:js_interop. This seems to include the definition of the kIsWeb constant (which to me is the scariest part of the change :))

  6. added
    P2Important issues not at the top of the work list
    c: tech-debtTechnical debt, code quality, testing, etc.
    triaged-webTriaged by Web platform team
    on Jan 15, 2025
  7. added
    P1High-priority issues at the top of the work list
    and removed
    P2Important issues not at the top of the work list
    on Jul 10, 2025
  8. github-actions commented on Jul 30, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Jul 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.e: wasmIssues related to the wasm build of Flutter Web.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions