-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[breaking change][vm] Add class modifiers to dart:nativewrappers
#51896
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
Comments
This has been punted from 3.0, and will be done as a breaking change later. |
Split off https://dart-review.googlesource.com/c/sdk/+/291761. Landing separately, so that the breaking change itself is a smaller CL. TEST=ci build (see touched _test files) bug: #51896 Change-Id: Ic8d218845ccb6a277689e911b2c34c44639e13cf Cq-Include-Trybots: luci.dart.try:flutter-linux-try,vm-aot-linux-debug-x64c-try,vm-ffi-android-debug-arm-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292000 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Daco Harkes <[email protected]>
…tend) [NativeFieldWrapperClass] There are currently users that implement classes (e.g. for mocking purposes) that implement/extend NativeFieldWrappers and send such objects across isolates. This CL ensures such mocks can be sent across isolates again (which was disabled in breaking change in [0]) as long as mocks do not extend NFW (and therefore have actual native fields). In the future the [NativeFieldWrapperClass]s will be marked as `base` and therefore prevent implementing them, see issue [1]. => At this point this CL can be reverted again. [0] https://dart-review.googlesource.com/c/sdk/+/289027 [1] #51896 TEST=adjusted isolate tests Change-Id: I5fe1110e7046761e3606927063d3ad5e2b4bf4e0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/292320 Reviewed-by: Daco Harkes <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
Now that Flutter has migrated flutter/flutter#123756, we should land the breaking change https://dart-review.googlesource.com/c/sdk/+/291761. cc @itsjustkevin for breaking change process. |
CC: @MaryaBelanger as this did not use the breaking change template and may need more information. |
Intended change in behaviorMark This was punted from 3.0, because Flutter couldn't migrate in time. Justification for making the changeImplementing subtypes can lead to issues when passing such native wrapper to a native call, as it will try to unwrap a native field that doesn't exist (likely leading to a segfault). Expected impactThis change is likely to impact a very small amount of code. (Flutter is already migrated.) Steps for mitigating the changeUsers need to go and mark subclasses of |
dart:nativewrappers
dart:nativewrappers
I don't see any ACX usage so SGTM. |
lgtm |
Friendly ping. |
Marking this as approved for now. @Hixie if you disagree, please remove the |
The
NativeWrapperClass
es should be markedbase
so that none of their subtypes can be implemented.Implementing subtypes can lead to issues when passing such native wrapper to a native call, as it will try to unwrap a native field that doesn't exist (likely leading to a segfault).
CL: https://dart-review.googlesource.com/c/sdk/+/291761
Flutter has classes which extend
NativeWrapperClass
es and are mocked in tests.And Flutter has already opted in to 3.0, so adding the class modifiers to
dart:nativewrappers
is a breaking change for Flutter.NativeWrapperClass
es flutter/flutter#123756log
The text was updated successfully, but these errors were encountered: