-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Refactor JSNumber.toDart and Object.toJS #129436
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
Conversation
@eyebrowsoffire These are the framework changes - PTAL when you get a chance, thanks! |
c6334d5
to
7d4ed54
Compare
@eyebrowsoffire FYI - I changed the |
JSNumber.toDart will now be two functions: toDartDouble and toDartInt. There was code that did an Object.toJS. This has been changed to use Function.toJS as well to make it consistent with the code in flutter/packages: https://github.com/flutter/packages/blob/0ef393811d0c2653e68ac135733353fcad8fffa9/packages/web_benchmarks/lib/src/recorder.dart#L1223
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
(Triage): Is this good to be submitted? If so, can you throw on the auto-submit label? |
Kind of. I'm waiting to submit this and flutter/engine#43363 at roughly the same time so that I can land the Dart CL that removes some of these members right after. I want to avoid a situation where these members are used in newer code (thus resulting in another CL) before I get to remove them. |
This reverts commit dce75ab. This also makes some small changes to make onBenchmark a JSExportedDartFunction instead of a JSBoxedDartObject. This is for changes in flutter/flutter#129436 and to account for the fact that flutter/packages provides an `allowInterop`'d function. Benchmarks tests pass with this CL. ## 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] and the [C++, Objective-C, Java style guides]. - [X] 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. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I signed the [CLA]. - [ ] All existing and new tests are passing.
flutter/flutter@544d30d...c40173f 2023-07-13 [email protected] Revert "Roll Flutter Engine from 16e2ab7e986c to 1b1ccdd1f527 (13 revisions)" (flutter/flutter#130479) 2023-07-13 [email protected] Roll Flutter Engine from 16e2ab7e986c to 1b1ccdd1f527 (13 revisions) (flutter/flutter#130458) 2023-07-13 [email protected] Exclude `Tooltip`'s overlay child from SelectableRegion (flutter/flutter#130181) 2023-07-12 [email protected] Update `Checkbox` tests for M2/M3 (flutter/flutter#130351) 2023-07-12 [email protected] Refactor JSNumber.toDart and Object.toJS (flutter/flutter#129436) 2023-07-12 [email protected] Reland [a11y] CupertinoSwitch On/Off labels (flutter/flutter#130173) 2023-07-12 [email protected] Add missing links to examples that aren't linked anywhere (flutter/flutter#130422) 2023-07-12 [email protected] Use platform specific line separator in gen-l10n (flutter/flutter#130090) 2023-07-12 [email protected] Update `Divider`/`VerticalDivider` and theme tests for M2/M3 (flutter/flutter#130415) 2023-07-12 [email protected] Roll Flutter Engine from 5c887028810d to 16e2ab7e986c (2 revisions) (flutter/flutter#130421) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages 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 Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
JSNumber.toDart will now be two functions: toDartDouble and toDartInt. There was code that did an Object.toJS. This has been changed to use Function.toJS as well to make it consistent with the code in flutter/packages: https://github.com/flutter/packages/blob/0ef393811d0c2653e68ac135733353fcad8fffa9/packages/web_benchmarks/lib/src/recorder.dart#L1223 This is to help land this CL: https://dart-review.googlesource.com/c/sdk/+/309082 https://dart-review.googlesource.com/c/sdk/+/309081 is the CL that added the new methods. ## 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 `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] All existing and new tests are passing.
This reverts commit dce75ab. This also makes some small changes to make onBenchmark a JSExportedDartFunction instead of a JSBoxedDartObject. This is for changes in flutter/flutter#129436 and to account for the fact that flutter/packages provides an `allowInterop`'d function. Benchmarks tests pass with this CL. ## 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] and the [C++, Objective-C, Java style guides]. - [X] 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. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I signed the [CLA]. - [ ] All existing and new tests are passing.
JSNumber.toDart will now be two functions: toDartDouble and toDartInt.
There was code that did an Object.toJS. This has been changed to
use Function.toJS as well to make it consistent with the code
in flutter/packages: https://github.com/flutter/packages/blob/0ef393811d0c2653e68ac135733353fcad8fffa9/packages/web_benchmarks/lib/src/recorder.dart#L1223
This is to help land this CL: https://dart-review.googlesource.com/c/sdk/+/309082
https://dart-review.googlesource.com/c/sdk/+/309081 is the CL that added the new methods.
Pre-launch Checklist
///
).