Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@srujzs
Copy link
Contributor

@srujzs srujzs commented Jul 25, 2024

This only addresses the following:

  • Removes JSVoid in favor of void. JSVoid, which is just a typedef, should be deprecated and removed eventually.
  • Removes extra interop methods that were needed to make sure arity was correct. These are no longer needed as interop methods are invocation-sensitive and calls to them do not forward more arguments than were passed by the user.
  • Removes unnecessary annotations on extensions.

Still left to do (not comprehensive):

  • Migrate to extension types.
  • Remove forwarding methods that are only used to convert primitives in favor of changing the interop method to include the Dart primitive type. It might be a bit slower in dart2wasm to do this, but will need to verify and fix it if that's the case.
  • Remove usage of js_util.
  • See if we can replace types with their package:web equivalent for easier maintenance.

srujzs added 3 commits July 24, 2024 16:35
These were needed for when we lowered things
on the procedure side, but since we have
invocation-sensitive lowerings, we don't need to
worry about accidentally providing more arguments
than were passed by the interop method caller.
@srujzs srujzs requested a review from ditman July 25, 2024 00:12
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jul 25, 2024
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

LGTM!

QQ: Can we make "JSVoid" @Deprecated('Use void instead')?

(/cc @eyebrowsoffire FYI)

@ditman
Copy link
Member

ditman commented Jul 25, 2024

I think the code in dom.dart should be indirectly tested by the tests of the web engine (that run in browser)

@srujzs
Copy link
Contributor Author

srujzs commented Jul 25, 2024

Thanks!

QQ: Can we make "JSVoid" @Deprecated('Use void instead')?

Yup! Right now it just has a TODO on it, but I want to make this a proper deprecation.

@srujzs srujzs merged commit 1a490c3 into flutter:main Jul 25, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 25, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 26, 2024
…152344)

flutter/engine@d665bf8...21629ec

2024-07-25 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.12 to 3.25.13 (flutter/engine#54039)
2024-07-25 [email protected] Initial pass to cleanup dom.dart to use newer JS interop styles (flutter/engine#54093)
2024-07-25 [email protected] Roll buildroot to e92499322525306bd637eb79d1e6dd507d5f3062 (flutter/engine#54113)
2024-07-25 [email protected] [iOS] enable FlutterMetalLayer. (flutter/engine#54121)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…lutter#152344)

flutter/engine@d665bf8...21629ec

2024-07-25 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.12 to 3.25.13 (flutter/engine#54039)
2024-07-25 [email protected] Initial pass to cleanup dom.dart to use newer JS interop styles (flutter/engine#54093)
2024-07-25 [email protected] Roll buildroot to e92499322525306bd637eb79d1e6dd507d5f3062 (flutter/engine#54113)
2024-07-25 [email protected] [iOS] enable FlutterMetalLayer. (flutter/engine#54121)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#152344)

flutter/engine@d665bf8...21629ec

2024-07-25 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.12 to 3.25.13 (flutter/engine#54039)
2024-07-25 [email protected] Initial pass to cleanup dom.dart to use newer JS interop styles (flutter/engine#54093)
2024-07-25 [email protected] Roll buildroot to e92499322525306bd637eb79d1e6dd507d5f3062 (flutter/engine#54113)
2024-07-25 [email protected] [iOS] enable FlutterMetalLayer. (flutter/engine#54121)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants