Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add external factories for @staticInterop classes instead of synthetic constructor #37443

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented Nov 8, 2022

Per dart-lang/sdk#49941, synthetic constructors will be disallowed on @staticInterop classes. Functionally, they are lowered to the same code.

Also fixes an erroneous call to the DomHTMLStyleConstructor instead of the relevant factory method.

Migration needed to fix dart-lang/sdk#49941

These factories were added because they were caught by the flutter trybots (https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8798044738469408369/+/u/build_host_debug/stdout).

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] and the [C++, Objective-C, Java style guides].
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See [testing the engine] for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the [CLA].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Nov 8, 2022
@skia-gold
Copy link

Gold has detected about 103 new digest(s) on patchset 1.
View them at https://flutter-engine-gold.skia.org/cl/github/37443

@srujzs srujzs marked this pull request as ready for review November 9, 2022 19:28
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #37443 at sha bf4ad66

@Hixie
Copy link
Contributor

Hixie commented Nov 9, 2022

test-exemption: code refactor with no semantic change

@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 Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on 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.

…c constructor

Per dart-lang/sdk#49941, synthetic constructors
will be disallowed on @staticInterop classes. Functionally, they are lowered
to the same code.

Also fixes an erroneous call to the DomHTMLStyleConstructor instead of the
relevant factory method.
@joshualitt joshualitt merged commit 7a746dd into flutter:main Nov 10, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 10, 2022
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 10, 2022
…115048)

* 7a746dd9c Add external factories for @staticInterop classes instead of synthetic constructor (flutter/engine#37443)

* b42ed6933 Include AndroidSurfaceVulkanImpeller behind a flag (flutter/engine#37486)
schwa423 pushed a commit to schwa423/engine that referenced this pull request Nov 16, 2022
…c constructor (flutter#37443)

Per dart-lang/sdk#49941, synthetic constructors
will be disallowed on @staticInterop classes. Functionally, they are lowered
to the same code.

Also fixes an erroneous call to the DomHTMLStyleConstructor instead of the
relevant factory method.
shogohida pushed a commit to shogohida/flutter that referenced this pull request Dec 7, 2022
…lutter#115048)

* 7a746dd9c Add external factories for @staticInterop classes instead of synthetic constructor (flutter/engine#37443)

* b42ed6933 Include AndroidSurfaceVulkanImpeller behind a flag (flutter/engine#37486)
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…lutter#115048)

* 7a746dd9c Add external factories for @staticInterop classes instead of synthetic constructor (flutter/engine#37443)

* b42ed6933 Include AndroidSurfaceVulkanImpeller behind a flag (flutter/engine#37486)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tests platform-web Code specifically for the web engine will affect goldens
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pkg:js] Disallow users from using synthetic constructors for @staticInterop
5 participants