Skip to content

[web] Test that Firefox < 147 rejects dart2wasm before Wasm capability checks - #193667

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
kevmoo:firefox-wasm-fallback-test
Oct 2, 2026
Merged

auto-submit[bot] merged 4 commits into
flutter:masterfrom
kevmoo:firefox-wasm-fallback-test

Conversation

@kevmoo

@kevmoo kevmoo commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Adds a regression test in fallbacks_test.dart (firefox-fallbacks suite) verifying the Firefox < 147 version gate added in #193180 (and its precedence over _flutter.supportsDart2Wasm in #193271):

  1. Firefox 146 (< 147): Even when wasmAllowList: { gecko: true } is configured, _flutter.supportsDart2Wasm is true, and WebAssembly.validate returns true, FlutterLoader.load rejects dart2wasm builds before invoking WebAssembly.validate (validateCalls == 0).
  2. Firefox 147 (>= 147): Passes the Firefox version gate and proceeds to evaluate WebAssembly.validate (validateCalls > 0).

Related to #143603 and #186619

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

…y checks

Verifies in `firefox-fallbacks` (`fallbacks_test.dart`) that:
1. Firefox 146 (`< 147`) rejects `dart2wasm` builds before evaluating `WebAssembly.validate` or `_flutter.supportsDart2Wasm` even when `wasmAllowList: { gecko: true }` is configured.
2. Firefox 147 (`>= 147`) passes the Firefox version gate and proceeds to evaluate `WebAssembly.validate`.

Related to flutter#143603 and flutter#186619
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a test to verify that the loader rejects dart2wasm on Firefox versions older than 147 before evaluating Wasm capabilities. Feedback on the test implementation suggests deleting the supportsDart2Wasm property in the finally block to properly restore the global state, and removing a redundant redefinition of supportsDart2Wasm in the second step of the test.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team labels Oct 1, 2026
@kevmoo
kevmoo requested a review from mdebbar October 1, 2026 18:52
mdebbar
mdebbar previously approved these changes Oct 1, 2026
@kevmoo kevmoo added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 2, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Oct 2, 2026
Merged via the queue into flutter:master with commit 3732d52 Oct 2, 2026
23 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 2, 2026
@kevmoo
kevmoo deleted the firefox-wasm-fallback-test branch October 5, 2026 16:55
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
…y checks (flutter#193667)

Adds a regression test in `fallbacks_test.dart` (`firefox-fallbacks`
suite) verifying the `Firefox < 147` version gate added in flutter#193180 (and
its precedence over `_flutter.supportsDart2Wasm` in flutter#193271):

1. **Firefox 146 (`< 147`)**: Even when `wasmAllowList: { gecko: true }`
is configured, `_flutter.supportsDart2Wasm` is `true`, and
`WebAssembly.validate` returns `true`, `FlutterLoader.load` rejects
`dart2wasm` builds before invoking `WebAssembly.validate`
(`validateCalls == 0`).
2. **Firefox 147 (`>= 147`)**: Passes the Firefox version gate and
proceeds to evaluate `WebAssembly.validate` (`validateCalls > 0`).

Related to flutter#143603 and flutter#186619

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants