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

Change JSBoxedDartObject to JSAny #51634

Merged
merged 1 commit into from Mar 26, 2024
Merged

Conversation

srujzs
Copy link
Contributor

@srujzs srujzs commented Mar 22, 2024

Closes dart-lang/sdk#55256

fda5c69 added code to avoid the less performant boxing of JSBoxedDartObject and instead use backend-specific logic to externalize and internalize the UniqueRef until we get a better solution from dart:js_interop. On the JS backends, this relied on casting to and from JSAny, as its representation type is just Object. However, this callback that takes in the UniqueRef as an arg is still typed as accepting JSBoxedDartObject, leading to a cast failure on the JS backends, since the representation type is JSObject.

The fix is to use JSAny. On dart2wasm, this makes no difference, as the underlying representation type does not change.

Closes dart-lang/sdk#55256

flutter@fda5c69
added code to avoid the less performant boxing of JSBoxedDartObject
and instead use backend-specific logic to externalize and internalize
the UniqueRef until we get a better solution from dart:js_interop.
On the JS backends, this relied on casting to and from JSAny, as its
representation type is just Object. However, this callback that takes
in the UniqueRef as an arg is still JSBoxedDartObject, leading to a
cast failure on the JS backends.

The fix is to use JSAny. On dart2wasm, this makes no difference, as the
underlying representation type does not 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 "@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 Mar 22, 2024
@polina-c polina-c added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 25, 2024
@auto-submit auto-submit bot merged commit b2d93a6 into flutter:main Mar 26, 2024
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 26, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 26, 2024
…145759)

flutter/engine@3c881b7...b2d93a6

2024-03-26 58529443+srujzs@users.noreply.github.com Change JSBoxedDartObject to JSAny (flutter/engine#51634)

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 jacksongardner@google.com,rmistry@google.com,zra@google.com 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
auto-submit bot pushed a commit to flutter/devtools that referenced this pull request Mar 26, 2024
We want this commit to be included into release build:

flutter/engine#51634

flutter/flutter@55528ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
3 participants