Sitelet https://github.com/flutter/flutter/pull/189086
Skip to content

refactor(web): SkwasmPath and SkwasmPathBuilder separation - #189086

Merged
auto-submit[bot] merged 4 commits into
flutter:masterfrom
Swiftaxe:refactor_skwasmpath
Aug 13, 2026
Merged

auto-submit[bot] merged 4 commits into
flutter:masterfrom
Swiftaxe:refactor_skwasmpath

Conversation

@Swiftaxe

@Swiftaxe Swiftaxe commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

SkwasmPath was implementing both the immutable and mutable interfaces.

To separate concerns, SkwasmPath now implements the immutable interface, and a SkwasmPathBuilder class is added for the mutable interface.

Also, test coverage improved to verify that nothing breaks.

Closes #184840

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • 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.

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jul 7, 2026
@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 Jul 7, 2026
@Swiftaxe
Swiftaxe requested a review from mdebbar July 7, 2026 20:17

@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 refactors the Skwasm path implementation by separating path building logic into a new SkwasmPathBuilder class, while SkwasmPath now only represents the immutable path. It also adds comprehensive unit tests for various path-building operations. The review feedback suggests adding an assertion in SkwasmPathBuilder.build to prevent use-after-free bugs, and guarding the dispose method with an active check on _isDisposed to avoid double-free issues in release builds where assertions are disabled.

Comment thread engine/src/flutter/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart Outdated
@Swiftaxe
Swiftaxe force-pushed the refactor_skwasmpath branch 2 times, most recently from 18d90bb to 3fcf0f8 Compare July 9, 2026 16:51
@Swiftaxe
Swiftaxe force-pushed the refactor_skwasmpath branch from 3fcf0f8 to 9474827 Compare July 9, 2026 19:42

@mdebbar mdebbar 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.

Thanks for the clean refactor!

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.

[web] Refactor Skwasm to use the PathBuilder pattern

2 participants